In OSS, a service template is a product that is used to create subsriptions for customers.
In this document:
In the wizard data, the defaults
section should contain three lists of components to define
the default deployment of the application in OSS:
{
"configurableProperties": [<property-1>, ...], // Global app properties
"defaults": {
"apsVersion": <APS API version>,
"appId": <APS application ID>,
"apsName": <arbitrary name>,
"apsResources": [{<aps-resource-1>}, ...], // Service profiles
"resellerProfile": {<reseller-profile>}, // Reseller profile
"resourceTypes": [{<resource-type-1>}, ...], // Resource types for service templates
"serviceTemplate": {<service-template>} // Service template
}
}
The apsResources
array contains a list of reference APS resources (service profiles) as explained
in the Product in OSS document.
The APS resource representing the APS application instance is created earlier during the APS application deployment.
That is why this APS resource is not in the apsResources
array, even though it is a reference APS resource.
The following structure provides a default configuration of an APS resource presenting a service profile:
{
"id": <ID for reference inside the wizard data>,
"apsType": <APS type ID>,
"type": "http://aps-standard.org/types/core/profile/service/1.0",
"fields": {
"profileName": <Default profile name>,
<primitive-property-1>: <Default property value>,
<structure-1>: { <property-1-1>, ... },
...
},
"relations": {
<relation-1>: "idglobals",
<relation-2>: <APS ID of the resource to relate>,
...
}
}
The above configuration contains the following elements:
id
is an ID unique inside the current wizard data. Other configuration components can refer to the APS resource
by its ID.
apsType
the APS ID of the corresponding APS type as assigned in the APS application.
type
refers to the standard APS type that defines properties, relationship, and methods for service profiles.
fields
is a named list of the service profile properties and structures as declared in the corresponding APS type.
In addition, it contains the profileName
element to assign a default name to the service profile.
relations
is a named list of relationship elements. Every element is a pair that binds a relation defined in the APS type
(first element in the pair) with the APS ID of the paired APS resource (second element in the pair).
If the paired APS resource is the root APS resource representing the APS application instance, use
the "idglobals"
value.
{
"id": "idc2922c137c7a58",
"apsType":"http://aps-standard.org/samples/vpsdemo/offer/1.0",
"type": "http://aps-standard.org/types/core/profile/service/1.0",
"fields": {
"profileName": "VPS mainstream profile"
},
"relations": {
"cloud": "idglobals"
},
}
Configuration of an APS resource presenting a reseller profile is explained in the Reseller Profile document.
The resourceTypes
array is a list of resource types to be included into service templates.
There are three kinds of APS types based on different resource classes as considered here.
The APS resources mentioned in the apsResources
section are presented in a service template
by the resources types based on the Application Service Reference resource class. In addition,
a default configuration for the reference APS resource presenting the APS application instance (root resource)
can also exist here.
The deployment configuration in the wizard data is as follows:
{
"name": <RT name>,
"id": <Digital ID unique in the present wizard data>,
"resClass": "rc.saas.service.link",
"required": <true or false>,
"rtfor": "http://aps-standard.org/types/core/profile/service/1.0",
"actParams": {
"resource_uid": "idc2922c137c7a58"
}
}
The above configuration contains the following elements:
name
is an arbitrary name assigned to the resource type in the platform. Try to use
an application specific name to avoid confusion with other resource types in the platform.
id
is a digital ID unique in scope of the present wizard data. For the sake of reliability,
assign a negative digit to avoid confusion with an ID of a resource type existing in the platform.
resClass
refers to the Application Service Reference resource class coded as "rc.saas.service.link"
.
required
specifies if the resource type is required in the service template. For example,
the resource type representing the APS application instance should be declared as required.
rtfor
refers to the standard APS type containing the service profile schema or reseller profile schema.
The set of activation parameters actParams
contains only one parameter resource_uid
referring
to the respective reference APS resource.
{
"name": "VPS mainstream configuration",
"id": -500003,
"resClass": "rc.saas.service.link",
"required": false,
"rtfor": "http://aps-standard.org/types/core/profile/service/1.0",
"actParams": {
"resource_uid": "idc2922c137c7a58"
}
}
Resource types based on the Application Service resource class are used to create application resources for customers.
The deployment configuration of a resource type in the wizard data is as follows:
{
"name": <RT name>,
"id": <Digital ID unique in the present wizard data>,
"resClass": "rc.saas.service",
"required": <true of false>,
"actParams": {
"service_id": <Service ID>,
"autoprovide_service": <1 or 0>
}
}
The above configuration contains the following elements:
name
is an arbitrary name assigned to the resource type in the platform. Try to use
an application specific name to avoid confusion with other resource types in the platform.
id
is a digital ID unique in scope of the present wizard data. For the sake of reliability,
assign a negative digit to avoid confusion with an ID of a resource type existing in the platform.
resClass
refers to the Application Service resource class coded as "rc.saas.service"
.
required
specifies if the resource type is required in the service template. For example,
the resource type representing the customer tenant (management context) should be declared as required.
The set of activation parameters actParams
contains the following parameters:
service_id
refers to the service ID as specified in the package metadata.
autoprovide_service
requires the resource auto-provisioning (1) or not (0). Normally, one of the
resource types, usually the customer tenant (management context) must require auto-provisioning.
{
"name": "VPS demo - virtual server",
"id": -500007,
"resClass": "rc.saas.service",
"required": false,
"actParams": {
"service_id": "vpses",
"autoprovide_service": 0
}
}
Resource types based on various Application Counter resource classes are used to create counters for resource consumption. A counter presents a properly configured property in an APS type. The latter typically is a type used to create a customer tenant (management context).
A counter is based on one of the following resource classes depending on the unit of measure.
rc.saas.resource
- disk or memory space measured in KB
rc.saas.resource.unit
- number of items
rc.saas.resource.mhz
- CPU frequency measured in MHz
rc.saas.resource.kbps
- channel bandwidth or speed measured in Kbps
rc.saas.resource.kba
- accumulated amount of data, for example network traffic
rc.saas.resource.unith
- accumulated number of items measured in unit-hour
rc.saas.resource.mbh
- accumulated space usage measured in MB-hour
rc.saas.resource.mhzh
- accumulated CPU power measured in MHz-hour
rc.saas.resource.kbpsh
- accumulated usage of network bandwidth measured in Kbps-hour
Get more explanation of counters and units of measure in the Resource Structures document.
{
"name": <RT name>,
"id": <Digital ID unique in the present wizard data>,
"resClass": <Resource class code>,
"required": <true or false>,
"actParams": {
"service_id": <Service ID>,
"resource_id": <Property that defines the counter>
}
}
The above configuration contains the following elements:
name
is an arbitrary name assigned to the resource type in the platform. Try to use
an application specific name to avoid confusion with other resource types in the platform.
id
is a digital ID unique in scope of the present wizard data. For the sake of reliability,
assign a negative digit to avoid confusion with an ID of a resource type existing in the platform.
resClass
refers to the Application Service Reference resource class using one of the codes
presented in the previous section.
required
specifies if the resource type is required in the service template.
The set of activation parameters actParams
contains the following parameters:
service_id
refers to the service ID as specified in the package metadata. The service must be the one
bound with the corresponding APS type.
resource_id
refers to the property in the corresponding APS type that defines the counter structure.
{
"name": "VPS demo - CPU cores",
"id": -500006,
"resClass": "rc.saas.resource.unit",
"required": false,
"actParams": {
"service_id": "contexts",
"resource_id": "cpuusagetotal"
}
}
The serviceTemplate
object contains references to resource types with a limit on each of them.
{
"name": <Default service template name>,
"id": <Digital ID unique in the present wizard data>,
"resources": [
{
"limit": <Limit value>,
"unlimited": <true or false>,
"rtID": <Resource type ID>
},
{<next resource>},
...
]
}
The above configuration contains the following elements:
name
is an arbitrary name to assign to the service template. Try to use
an application specific name to avoid confusion with other service templates in the platform.
id
is a digital ID unique in scope of the present wizard data. For the sake of reliability,
assign a negative digit to avoid confusion with an ID of a service template existing in the platform.
limit
is a limit on the resource. It works if the unlimited
property is false.
unlimited
defines if the resource consumption is unlimited.
rtID
refers to the id
of a resource type defined earlier.
{
"name": "VPS demo with the product deployment configuration",
"id": -500008,
"resources": [
{
"limit": 1,
"unlimited": false,
"rtID": -500001
},
{
"limit": 1,
"unlimited": false,
"rtID": -500002
},
{
"limit": 0,
"unlimited": false,
"rtID": -500003
},
{
"limit": 0,
"unlimited": false,
"rtID": -500004
},
{
"limit": 0,
"unlimited": true,
"rtID": -500005
},
]
}