Versions Compared

Key

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

...

 ValueDescription
URLhttp://hostname:8888/opennaas/getResourceTypes/ 
Method

GET

 
ReturnList<String>Name of the resources types supported by OpenNaaS.

GetNameFromResourceID

Given the resourceId of an existing resource, this method return its name.

Response Example
Code Block
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elements>
	<element xsi:type="xs:string">bod</element>
	<element xsi:type="xs:string">roadm</element>
	<element xsi:type="xs:string">MACBridgeIOS</element>
	<element xsi:type="xs:string">pdu</element>
	<element xsi:type="xs:string">sampleresource</element>
	<element xsi:type="xs:string">quantumresource</element>
	<element xsi:type="xs:string">network</element>
	<element xsi:type="xs:string">powernet</element>
	<element xsi:type="xs:string">vnmapper</element>
	<element xsi:type="xs:string">router</element>
	<element xsi:type="xs:string">openflowswitch</element>
	<element xsi:type="xs:string">vcpenet</element>
	<element xsi:type="xs:string">ofnetwork</element>
</elements>

 

GetNameFromResourceID

Given the resourceId of an existing resource, this method return its name.

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

GET

 
Path ParameterresourceIdId of the resource which name we want to retrieve.
ReturnStringName of the resource identified by the given resourceId.
Response Example
No Format
myre

 

GetResourceDescriptor

Given the resourceId of an existing resource, this method returns its whole resource descriptor.

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

GET

 
Path ParameterresourceIdId of the resource which descriptor we want to retrieve
ReturnResourceDescriptorName of the resource identified by the given resourceId.
Response Example
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>

 

GetIdentifierFromResourceTypeName

Given the name and the type of an existing resource, this method returns its id.

 ValueDescription
URLhttp://hostname:8888/opennaas/resources/getId/{resourceType}/{resourceName} 
Method

GET

 
Path ParameterresourceTypeType of the resource which id we want to retrieve.
Path ParameterresourceNameName of the resource which id we want to retrieve.
ReturnResourceDescriptorName of the resource identified by the given resourceId.
Response Example
No Format
584c96d5-2221-47d0-8c51-c5d4d45f3ff4

GetStatus

Returns the current lifecycle state of the resource.

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

GET

 
Path ParameterresourceIdId of the resource which status we want to retrieve
ReturnStringCurrent status of the resource.
Response Example
No Format
INITIALIZED

ListResourcesNameByType

Returns the list of all existing resources of a specific type.

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

GET

 
Path ParameterresourceIdresourceTypeId Type of the resource which name list of resources we want to retrieve.
ReturnStringList<String>Name of the resource identified resources which type matches the one given by the given resourceIduser.

GetResourceDescriptor

Given the resourceId of an existing resource, this method returns its whole resource descriptor.

...

GET

...

Response Example
Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elements>      
	<element xsi:type="xs:string">myre</element>      
	<element xsi:type="xs:string">gsn</element>
</elements>