Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/{resourceId} 
Method

DELETE

 
Path ParameterresourceIdId 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.

 ValueDescription
URLhttp://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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/{resourceId} 
Method

GET

 
ReturnList<String>ResourceInfoId, name, type, state and list of capabilities of the resourceName of the resources types supported by OpenNaaS.
Response Example
Code Block
themeEclipse
languagehtml/xml
      <?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
themeEclipse
languagehtml/xml
<?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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/type/{typeresourceId}/name/{name}status 
Method

GET

 
Path ParametertyperesourceIdType Id of the resource which id we want to retrieve.Path ParameternameName of the resource which id status we want to retrieve.
ReturnStringId 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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/{resourceId}/status/start 
Method

GETPUT

 
Path ParameterresourceIdId of the resource which status we want to retrieveto be started.
ReturnStringCurrent 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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/type/{typeresourceId}/status/namestop 
Method

GETPUT

 
Path ParameterresourceTyperesourceIdType 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
themeEclipse
languagehtml/xml
<?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.

 ValueDescription
URLhttp://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.

Type of the list of resources we want to retrieve.
 ValueDescription
URLhttp://hostname:8888/opennaas/resources/type/{type}/ 
Method

GET

 Path Parametertype
ReturnList<String>Ids Name of the resources which type matches the one set at the urltypes supported by OpenNaaS.
Response Example
Eclipse
Code Block
theme
languagehtml/xml
<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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/type/{type}/
 ValueDescription
URLhttp://hostname:8888/opennaas/resources/{resourceId} 
Method

GET

 
ReturnPath ParametertypeType of the list of resources we want to retrieve.
ReturnList<String>Ids of the resources which type matches the one set at the urlResourceInfoId, name, type, state and list of capabilities of the resource.
Response Example
Code Block
themeEclipse
languagehtml/xml
      <?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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/type/{resourceIdtype}/status/startname 
Method

PUTGET

 
Path ParameterresourceIdresourceTypeId 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.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/{resourceId}/status/stop 
Method

PUT

 
Path ParameterresourceIdId 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
themeEclipse
languagehtml/xml
<?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.

 
 ValueDescription
URLhttp://hostname:8888/opennaas/resources/type/{resourceIdtype}/statusname/forceStop{name} 
Method

PUTGET

 
Path ParametertypeType of the resource which id we want to retrieve.
Path ParameternameName of the resource which id we want to retrieve.
ReturnString-Id of the resource of type and name set in url.
Response Example
No Format
584c96d5-2221-47d0-8c51-c5d4d45f3ff4