What's on this page

Resource Type Configuration

List Resource Types

Returns a list of all resource types managed by this Resource Manager.

NOTE: The descriptor is not returned in this list. A resource type descriptor can only be obtained for a single resource type – see “Get the Descriptor of a Resource Type” below

Allowable states for the resource types are as follows:

UNPUBLISHED, PUBLISHED, DELETED

Request Format

Aspect Value
Endpoint URL /types
HTTP Method GET
Parameters None

Response Format

Aspect Value
Return Code 200 – OK
Return Code 401 – Not Authorised

Example Response

An array of Resource Type summary information expressed as JSON.

Content Type: application/json

[

​    {

​           “name”: “resource::openstack-network::1.0”,

​           “state”: “PUBLISHED”,

​           “createdAt”: “2017-05-01T11:22:33Z”,

​           “lastModifiedAt”: “2017-05-04T12:13:14+01:00”

​    }

]
Field Description Mandatory
name The name of the resource type -must follow the naming structure defined in the Assembly Specification document Yes
state The state of the resource descriptor. Currently only “PUBLISHED” is allowed. Yes
createdAt The date the resource type was created. XML Date time format Yes
lastModifiedAt The date the resource type was last changed. XML Date time format Yes

Get the Descriptor of a Resource Type

Returns information about a specific resource type, including its YAML descriptor.

Allowable states for the resource types are as follows:

Request Format

Aspect Value
Endpoint URL /types/{name}
HTTP Method GET
Parameters name - Unique name for the resource type requested

Response Format

Aspect Value
Return Code 200 – OK
Return Code 401 – Not Authorised

Example Response

An array of Type objects expressed as JSON.

Content Type: application/json

[

  {

​    "createdAt": "2019-01-06T11:22:33Z ",

​    "descriptor": "name: resource::sipp-vnfc::1.0\ndescription: SIP performance test resource\nproperties:\n\n  image:\n    type: string\n    description: \"the docker image name\"\n    default: lifecyclemanager.com:5002/sipp\n\n  mgmt_network:\n    type: string\n    descripion: id of docker management network\n    required: true\n\n  target_sip_address:\n    type: string\n    description: address of SIP server to send traffic to\n    required: true \n\n  data_network:\n    type: string\n    descripion: id of docker data network \n    required: true\n\n  mgmt_address:\n    type: string\n    description: management ip address of this vnfc\n    read-only: true\n  \n  data_address:\n    type: string\n    description: assigned ip address on voip network. This is the voip endpoint\n    read-only: true\n\n  instanceid:\n    type: string\n    description: this is here to get metric key, which is curretly the same as instance id. This will be removed soon.\n    value: ${instance.id} \n\n  hostname:\n    type: string\n    description: hostname address of this container\n    value: ${instance.name}\n\nlifecycle:\n- Install\n- Configure\n- Start\n- Integrity\n- Stop\n- Uninstall\n",

​    "lastModifiedAt": "2019-02-06T12:13:14Z",

​    "name": "resource::openstack-network::1.0",

​    "state": "PUBLISHED"

  }

]
Field Description Mandatory
name The name of the resource type -must follow the naming structure defined in the Assembly Specification document Yes
state The state of the resource descriptor. Currently only “PUBLISHED” is allowed. Yes
createdAt The date the resource type was created. XML Date time format Yes
lastModifiedAt The date the resource type was last changed. XML Date time format Yes
descriptor The YAML descriptor of the requested Resource Type. Yes

Example Descriptor

When unpacked a Descriptor looks something like this:

name: resource::sipp-vnfc::1.0

description: SIP performance test resource

properties:

 

  image:

​    type: string

​    description: "the docker image name"

​    default: lifecyclemanager.com:5002/sipp

 

  mgmt_network:

​    type: string

​    descripion: id of docker management network

​    required: true

 

  target_sip_address:

​    type: string

​    description: address of SIP server to send traffic to

​    required: true 

 

  data_network:

​    type: string

​    descripion: id of docker data network 

​    required: true

 

  mgmt_address:

​    type: string

​    description: management ip address of this vnfc

​    read-only: true

  

  data_address:

​    type: string

​    description: assigned ip address on voip network. This is the voip endpoint

​    read-only: true

 

  instanceid:

​    type: string

​    description: this is here to get metric key, which is currently the same as instance id. This will be removed soon.

​    value: ${instance.id} 

 

  hostname:

​    type: string

​    description: hostname address of this container

​    value: ${instance.name}

 


 

 

The available lifecycle stages are:

 

lifecycle:

- Install

- Configure

- Start

- Integrity

- Stop

- Uninstall

 

Upload a VNF Package

Uploads a VNF Package and creates it as a Resource Type within the Resource Manager.

Request Format

Aspect Value
Endpoint URL /types
HTTP Method POST
Parameters none

The form data parameters that must accompany the POST request are:

Parameter Description Data Type
resource_name The unique (within the scope of the Resource Manager) name of the Resource Type String
resource_version Version ID of the Resource Type String
upfile The VNF package file to upload file

Response Format

Aspect Value
Return Code 200 – Uploaded and created successfully
Return Code 401 – Not Authorised

Resource Type Configuration (Asynchronous)

NOTE: Stratoss LM versions up to and including R2.0 do not support asynchronous responses from a Resource Manager. However, all Resource Managers should support this aspect of the RM API so that as soon as support for asynchronous responses is added to Stratoss LM it can be used immediately without the need to update existing Resource Manager implementations.

Optionally, a Resource Manager can emit events when the definition of a resource type changes, or a new resource type is created/deleted. This allows the Resource Manager to inform Stratoss LM that a resource description has changed (this is not related to the Resource Manager supporting asynchronous responses).

Resource Type Update Message Example

{

​    “name”: “resource::openstack-network::1.0”,

​    “descriptor”: “YAML Descriptor for this resource type”,

​    “state”: “PUBLISHED”,

​    “createdAt”: “2017-05-01T11:22:33Z”,

​    “lastModifiedAt”: “2017-05-04T12:13:14+01:00”

}


Field Description Mandatory
name The name of the resource type -must follow the naming structure defined in the Assembly Specification document Yes
descriptor The resource descriptor - a valid yaml document as a string. For an example of a resource descriptor please see section 2.2.2.4 above Yes
state The state of the resource descriptor (Currently only “PUBLISHED” is allowed) Yes
createdAt The date the resource type was created. XML Date time format Yes
lastModifiedAt The date the resource type was last changed. XML Date time format Yes

Resource Type Configuration (Asynchronous)

NOTE: Stratoss LM versions up to and including R2.0 do not support asynchronous responses from a Resource Manager. However, all Resource Managers should support this aspect of the RM API so that as soon as support for asynchronous responses is added to Stratoss LM it can be used immediately without the need to update existing Resource Manager implementations.

Optionally, a Resource Manager can emit events when the definition of a resource type changes, or a new resource type is created/deleted. This allows the Resource Manager to inform Stratoss LM that a resource description has changed (this is not related to the Resource Manager supporting asynchronous responses).

Resource Type Update Message Example

{

​    “name”: “resource::openstack-network::1.0”,

​    “descriptor”: “YAML Descriptor for this resource type”,

​    “state”: “PUBLISHED”,

​    “createdAt”: “2017-05-01T11:22:33Z”,

​    “lastModifiedAt”: “2017-05-04T12:13:14+01:00”

}


Field Description Mandatory
name The name of the resource type -must follow the naming structure defined in the Assembly Specification document Yes
descriptor The resource descriptor - a valid yaml document as a string. For an example of a resource descriptor please see section 2.2.2.4 above Yes
state The state of the resource descriptor (Currently only “PUBLISHED” is allowed) Yes
createdAt The date the resource type was created. XML Date time format Yes
lastModifiedAt The date the resource type was last changed. XML Date time format Yes