...
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/resources/{resourceId} | |
Method | DELETE | |
Path Parameter | resourceId | Id of the resource to be removed. |
Return | - |
...
DestroyAllResources
List all the types of resources supported by Stops and removes all existing resource of the OpenNaaS instance.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/resources/ | |
Method | DELETE | |
Return | - |
GetResourceInfoById
Returns the main information from a specific resource: id, name, type, state and the list of capabilities it contains.
Value | Description | ||
---|---|---|---|
URL | http://hostname:8888/opennaas/resources/{resourceId} | ||
Method | GET | ||
Return | List<String> | ResourceInfo | Id, name, type, state and list of capabilities of the resourceName of the resources types supported by OpenNaaS. |
Response Example
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <resourcesTypes><resourceInfo> <resourceType>bod</resourceType><resourceId>584c96d5-2221-47d0-8c51-c5d4d45f3ff4</resourceId> <resourceType>roadm<<name>myre</resourceType>name> <resourceType>MACBridgeIOS<<type>router</resourceType>type> <resourceType>pdu<<state>ACTIVE</resourceType>state> <resourceType>sampleresource</resourceType><capabilities> <resourceType>quantumresource</resourceType> <resourceType>network</resourceType> <capability>ip</capability> <resourceType>powernet</resourceType> <resourceType>vnmapper</resourceType> <capability>chassis</capability> <resourceType>router</resourceType> <resourceType>openflowswitch</resourceType> <capability>bgp</capability> <resourceType>vcpenet</resourceType> <resourceType>ofnetwork</resourceType></capabilities> </resourcesTypes> |
...
resourceInfo> |
GetNameFromResourceID
Given the resourceId of an existing resource, this method return its name.
...
Response Example
No Format |
---|
myre |
GetResourceDescriptor
Given the resourceId of an existing resource, this method returns its whole resource descriptor.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <resourceDescriptor xmlns:ns2="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns3="http://www.science.uva.nl/research/sne/ndl#" xmlns:ns4="http://www.science.uva.nl/research/sne/ndl/domain#" xmlns:ns5="org.opennaas.core.resources.descriptor.vcpe"> <capabilityDescriptors> <information> <name>bgp capability</name> <type>bgp</type> </information> <capabilityProperty name="actionset.name" value="junos"> </capabilityProperty> <capabilityProperty name="actionset.version" value="10.10"> </capabilityProperty> </capabilityDescriptors> <capabilityDescriptors> <information> <name>chassis capability</name> <type>chassis</type> </information> <capabilityProperty name="actionset.name" value="junos"> </capabilityProperty> <capabilityProperty name="actionset.version" value="10.10"> </capabilityProperty> <id>0</id> </capabilityDescriptors> <capabilityDescriptors> <information> <name>ip capability</name> <type>ip</type> </information> <capabilityProperty name="actionset.name" value="junos"> </capabilityProperty> <capabilityProperty name="actionset.version" value="10.10"> </capabilityProperty> </capabilityDescriptors> <id>584c96d5-2221-47d0-8c51-c5d4d45f3ff4</id> <information> <description>Junos v10 Router</description> <name>myre</name> <type>router</type> </information> <properties/> </resourceDescriptor> |
...
GetStatus
GetIdentifierFromResourceTypeName
Given the name and the type of an existing resource, this method returns its idReturns the current lifecycle state of the resource.
Value | Description | ||||
---|---|---|---|---|---|
URL | http://hostname:8888/opennaas/resources/type/{typeresourceId}/name/{name}status | ||||
Method | GET | ||||
Path Parameter | typeresourceId | Type Id of the resource which id we want to retrieve. | Path Parameter | name | Name of the resource which id status we want to retrieve. |
Return | String | Id Current status of the resource of type and name set in url. |
Response Example
No Format |
---|
584c96d5-2221-47d0-8c51-c5d4d45f3ff4 |
GetStatus
Returns the current lifecycle state of the resource.
INITIALIZED |
StartResource
The StartResource method starts a resource, only if it's in INITIALIZED state.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/resources/{resourceId}/status/start | |
Method | GETPUT | |
Path Parameter | resourceId | Id of the resource which status we want to retrieveto be started. |
Return | String | Current status of the resource. |
Response Example
No Format |
---|
INITIALIZED |
ListResourcesNameByType
- |
StopResource
The StopResource method stops a resource, only if it's in STARTED stateReturns the list of all existing resources of a specific type.
Value | Description | |||
---|---|---|---|---|
URL | http://hostname:8888/opennaas/resources/type/{typeresourceId}/status/namestop | |||
Method | GETPUT | |||
Path Parameter | resourceTyperesourceId | Type Id of the list of resources we want to retrieveresource to be stopped. | ||
Return | - | List<String> | Name of the resources which type matches the one given by the user. |
Response Example
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<resource>dub_1_log</resource>
<resource>myre</resource>
<resource>logicalrouter1</resource>
</resources> |
DestroyAllResources
ForceStopResource
Forces a resource to get into INITIALIZED stateStops and removes all existing resource of the OpenNaaS instance.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/resources/{resourceId}/status/forceStop | |
Method | DELETEPUT | |
Return | - |
...
GetResourceTypes
Returns List all the ids types of all existing resources of a specific typeresources supported by the OpenNaaS instance.
Value | Description | ||||
---|---|---|---|---|---|
URL | http://hostname:8888/opennaas/resources/type/{type}/ | ||||
Method | GET | Path Parameter | type | Type of the list of resources we want to retrieve.||
Return | List<String> | Ids Name of the resources which type matches the one set at the urltypes supported by OpenNaaS. |
Response Example
Code Block | theme | Eclipse|
---|---|---|
| ||
<resources>
<resource>b6c3a6c9-9a2e-4bc4-9604-13d014bd508f</resource>
<resource>584c96d5-2221-47d0-8c51-c5d4d45f3ff4</resource>
</resources>
|
GetResourceInfoFromId
Returns the main information from a specific resource: id, name, type, state and the list of capabilities it contains.
<?xml version="1.0" encoding="UTF-8"?>
<resourcesTypes>
<resourceType>bod</resourceType>
<resourceType>roadm</resourceType>
<resourceType>MACBridgeIOS</resourceType>
<resourceType>pdu</resourceType>
<resourceType>sampleresource</resourceType>
<resourceType>quantumresource</resourceType>
<resourceType>network</resourceType>
<resourceType>powernet</resourceType>
<resourceType>vnmapper</resourceType>
<resourceType>router</resourceType>
<resourceType>openflowswitch</resourceType>
<resourceType>vcpenet</resourceType>
<resourceType>ofnetwork</resourceType>
</resourcesTypes> |
ListResourcesByType
Returns the ids of all existing resources of a specific type.
Value | Description | |||
---|---|---|---|---|
URL | http://hostname:8888/opennaas/resources/type/{type}/ | |||
Value | Description | |||
URL | http://hostname:8888/opennaas/resources/{resourceId} | |||
Method | GET | |||
ReturnPath Parameter | type | Type of the list of resources we want to retrieve. | ||
Return | List<String> | Ids of the resources which type matches the one set at the url | ResourceInfo | Id, name, type, state and list of capabilities of the resource. |
Response Example
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <resourceInfo> <resourceId>584c96d5<resources> <resource>b6c3a6c9-9a2e-4bc4-9604-13d014bd508f</resource> <resource>584c96d5-2221-47d0-8c51-c5d4d45f3ff4</resourceId>resource> <name>myre<</name> <type>router</type> <state>ACTIVE</state> <capabilities> <capability>ip</capability> <capability>chassis</capability> <capability>bgp</capability> </capabilities> </resourceInfo> |
StartResource
resources>
|
ListResourcesNameByType
Returns the list of all existing resources of a specific typeThe StartResource method starts a resource, only if it's in INITIALIZED state.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/resources/type/{resourceIdtype}/status/startname | |
Method | PUTGET | |
Path Parameter | resourceIdresourceType | Id Type of the resource to be startedlist of resources we want to retrieve. |
Return | - |
StopResource
The StopResource method stops a resource, only if it's in STARTED state.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/resources/{resourceId}/status/stop | |
Method | PUT | |
Path Parameter | resourceId | Id of the resource to be stopped. |
Return | - |
ForceStop
List<String> | Name of the resources which type matches the one given by the user. |
Response Example
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<resource>dub_1_log</resource>
<resource>myre</resource>
<resource>logicalrouter1</resource>
</resources> |
GetIdentifierFromResourceTypeName
Given the name and the type of an existing resource, this method returns its idForces a resource to get into INITIALIZED state.
Value | Description | ||
---|---|---|---|
URL | http://hostname:8888/opennaas/resources/type/{resourceIdtype}/statusname/forceStop{name} | ||
Method | PUTGET | ||
Path Parameter | type | Type of the resource which id we want to retrieve. | |
Path Parameter | name | Name of the resource which id we want to retrieve. | |
Return | String | - | Id of the resource of type and name set in url. |
Response Example
No Format |
---|
584c96d5-2221-47d0-8c51-c5d4d45f3ff4 |