Resource Topology
List Deployment Locations
Returns a list of all deployment locations available to this Resource Manager.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/deployment-locations |
HTTP Method | GET |
Parameters | None |
Response Format
Aspect | Value |
---|---|
Return Code | 200 - OK |
Return Code | 401 – Not Authorised |
Example Response
An array of Deployment Location names and types expressed as JSON.
Content Type: application/json
[
{
“name”: “dev-cloud”,
“type”: “default-rm::Cloud”
},
{
“name”: “test-cloud”,
“type”: “default-rm::Cloud”
}
]
Field | Description | Mandatory |
---|---|---|
name | The name of the location managed by the Resource Manager | Yes |
type | The type of location – as defined by the Resource Manager – any valid string | Yes |
Get Deployment Location
Returns information for the specified deployment location.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/deployment-locations/{name} |
HTTP Method | GET |
Parameters | name – Unique name for the deployment location requested |
Response Format
Aspect | Value |
---|---|
Return Code | 200 OK |
Return Code | 404 – Deployment Location name could not be found |
Return Code | 401 – Not Authorised |
Example Response
Content Type: application/json
{
“name”: “dev-cloud”,
“type”: “default-rm::Cloud”
}
Field | Description | Mandatory |
---|---|---|
name | The name of the location managed by the Resource Manager | Yes |
type | The type of location – as defined by the Resource Manager – any valid string | Yes |
Create or Update a Deployment Location
Creates a new deployment location or updates an existing one.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/deployment-locations/{name} |
HTTP Method | PUT |
Parameters | name – Unique name for the deployment location to create or update |
The Body of the PUT request must contain the Type and Properties for the new or updated Deployment Location expressed as a JSON string.
The {name} parameter specifies the unique name of the Deployment Location (unique within the scope of the Resource Manager). If the name already exists, then the Deployment Location will be updated with the new information. If the name does not already exist, then a new Deployment Location will be created.
Example Request
Content Type: application/json
{
"name": "dev-cloud",
"properties": {
"location_server": "192.168.56.100",
"relay_endpoint": "192.168.56.100:31285",
"almip": "192.168.56.100",
"location_user": "vagrant",
"location_pwd": "vagrant"
},
"type": "default-rm::Cloud"
}
Field | Description | Mandatory |
---|---|---|
type | The type of the deployment location – as defined by the Resource Manager – any valid string | Yes |
properties | A JSON list of key-value pairs defining the properties of the deployment location. The exact properties will vary depending on the type of the deployment location. | Yes |
Response Format
Aspect | Value |
---|---|
Return Code | 201 – Created |
Return Code | 401 – Not Authorised |
Example Response
Content Type: application/json
{
“name”: “dev-cloud”,
"properties": {
"location_server": "192.168.56.100",
"relay_endpoint": "192.168.56.100:31285",
"almip": "192.168.56.100",
"location_user": "vagrant",
"location_pwd": "vagrant"
},
“type”: “default-rm::Cloud”
}
Field | Description | Mandatory |
---|---|---|
name | The name of the deployment location managed by the Resource Manager that was created/updated | Yes |
type | The type of deployment location – as defined by the Resource Manager – any valid string | Yes |
properties | A JSON list of key-value pairs defining the properties of the deployment location. The exact properties will vary depending on the type of the deployment location. | Yes |
Delete a Deployment Location
Permanently removes the specified deployment location.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/deployment-locations/{name} |
HTTP Method | DELETE |
Parameters | name – Unique name for the deployment location to delete |
The {name} parameter specifies the unique name of the Deployment Location (unique within the scope of the Resource Manager) to be deleted
Response Format
Aspect | Value |
---|---|
Return Code | 200 – Deployment Location successfully deleted |
Return Code | 404 – Deployment Location name could not be found |
Return Code | 401 – Not Authorised |
List all available Deployment Locations
Returns a list of all Deployment locations available to this Resource Manager along with their properties.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/deployment-locations/properties |
HTTP Method | GET |
Parameters | none |
Response Format
Aspect | Value |
---|---|
Return Code | 200 – OK |
Return Code | 401 – Not Authorised |
Example Response
An array of deployment location objects expressed as JSON.
Content Type: application/json
[
{
"name": "dev-cloud",
"properties": {
"location_server": "192.168.56.100",
"relay_endpoint": "192.168.56.100:31285",
"almip": "192.168.56.100",
"location_user": "vagrant",
"location_pwd": "vagrant"
},
"type": "default-rm::Cloud"
}
]
Field | Description | Mandatory |
---|---|---|
name | The name of the deployment location managed by the Resource Manager. | Yes |
type | The type of deployment location – as defined by the Resource Manager – any valid string | Yes |
properties | A JSON list of key-value pairs defining the properties of the deployment location. The exact properties will vary depending on the type of the deployment location. | Yes |
Search for Resource Instances
Searches for resource instances managed within the specified deployment location.
The search can be restricted by the type of the resources to be returned, or a partial match on the name of the resources.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/deployment-locations/{name}/instances |
HTTP Method | GET |
Parameters | name – Unique name for the deployment location instanceType – Limits results to be of this resource type (optional, exact matches only) instanceName – Limits results to contain this string in the name (optional, partial matching) |
The {name} parameter specifies the unique name of the Deployment Location (unique within the scope of the Resource Manager).
The {instanceType} parameter allows the search to be restricted to resources of the specified type. Only one type can be supplied, and only strict textual matches against this type name are supported
The {instanceName} parameter allows the search to be restricted to resources that match the specified textual name. Only one name can be supplied but partial textual matches against this name are supported
Response Format
Aspect | Value |
---|---|
Return Code | 200 OK |
The response body contains the search results in JSON format.
Example Response
[
{
“resourceId”: “c675e0bd-9c6c-43ca-84bf-2c061d439c6b”,
“resourceName”: “dev-network”,
“resourceType”: “resource::openstack-network::1.0”,
“resourceManagerId”: “default-rm::dev”,
“deploymentLocation”: “dev-cloud”,
“properties”: {
“propertyName”: “propertyValue”
},
“createdAt”: “2017-05-01T12:00:00Z”,
“lastModifiedAt”: “2017-05-01T12:00:00Z”
}
]
Field | Description | Mandatory |
---|---|---|
resourceId | The id of the instance of a resource | Yes |
resourceName | The name of the resource | Yes |
resourceType | The name of the resource type | Yes |
resourceManagerId | The id of the Resource Manager instance. This ‘Id’ is the same attribute as “name”, which is returned in the get configuration request response | Yes |
deploymentLocation | The name of the deployment location where the instance exists | Yes |
properties | A set of key value pair with properties describing key behaviour | No |
propertyName | A name of a property to be used in the search | No |
propertyValue | The value associated with the given propertyname | No |
createdAt | The date the resource instance was created. XML Date time format | Yes |
lastModifiedAt | The date the resource instance was last changed. XML Date time format | Yes |
Get Resource Instance
Returns information for the specified resource instance. When Stratoss LM requests a Resource Manager to create a resource, the Resource Manager may instantiate several underlying virtual resources as part of implementing the resource. In the response the Resource Manager is expected to return details of any underlying virtual resources that have been instantiated. This should be put in the internalResourceInstances section of the response.
Request Format
Aspect | Value |
---|---|
Endpoint URL | /topology/instances/{id} |
HTTP Method | GET |
Parameters | id – Unique id for the resource instance |
Response Format
Aspect | Value |
---|---|
Return Code | 200 OK |
Example Response
{
“resourceId”: “default-rm://c675e0bd-9c6c-43ca-84bf-2c061d439c6b”,
“resourceName”: “dev-network”,
“resourceType”: “resource::openstack-network::1.0”,
“resourceManagerId”: “default-rm::dev”,
“deploymentLocation”: “dev-cloud”,
“properties”: {
“propertyName”: “propertyValue”
},
“createdAt”: “2017-05-01T12:00:00Z”,
“lastModifiedAt”: “2017-05-01T12:00:00Z”,
“internalResourceInstances”: [
{
“id”: “3cb7822b-fc44-46ab-8072-9c65cd778d1f”,
“name”: “MGMT-NETWORK”,
“type”: “OpenDaylight::PrivateNetwork”
}
]
}
Field | Description | Mandatory |
---|---|---|
resourceId | The id of the instance of a resource | Yes |
resourceName | The name of the resource | Yes |
resourceType | The name of the resource type | Yes |
resourceManagerId | The id of the Resource Manager instance | Yes |
deploymentLocation | The name of the deployment location where the instance exists | Yes |
properties | A set of key value pair with properties describing key behaviour | No |
propertyName | A name of a property to be used in the search | No |
propertyValue | The value associated with the propertyname | No |
createdAt | The date the resource instance was created. XML Date time format | Yes |
lastModifiedAt | The date the resource instance was last changed. XML Date time format | Yes |
internalResourceInstances | A list of resources that have created by the Resource Manager in response to the request | No |
Id | The id of the internal resource | No |
Name | The name of the internal resource | No |
Type | The type of the internal resource | No |