Versions Compared

Key

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

...

Code Block
themeEclipse
languagehtml/xml
collapsetrue
<?xml      version="1.0" encoding="UTF-8"?>
<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:prefix1="opennaas.api" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:prefix1="opennaas.api">
   <grammars>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="opennaas.api" opennaas.api" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="opennaas.api">
         <xs:import namespace="" />
         <xs:element name="bridgeDomain" type="bridgeDomain" />
         <xs:element name="bridgeDomains" type="bridgeDomains" />
         <xs:element name="interfaceVLANOptions" type="interfaceVLANOptions" />
</      </xs:schema>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="opennaas.api" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="opennaas.api">
         <xs:complexType name="bridgeDomaininterfaceVLANOptions">
            <xs:sequence>
<xs:element minOccurs="0" name="domainName" type="xs:string"/>
               <xs:element name="vlanid" type="xs:int"/>
<xs:element minOccurs="0" name="interfacesNames">
<xs:complexType>
<xs:sequence>
vlanOptions">
                  <xs:complexType>
                     <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" name="interfaceName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="description" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="interfaceVLANOptions">
<xs:sequence>
<xs:element name="vlanOptions">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="key" type="xs:string"/>
<xs:element minOccurs="0" name="value" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="bridgeDomains">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="domainName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</grammars>
    <resources base="http://localhost:8888/opennaas/router/myre/vlanbridge/">
      <resource path="/">entry">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element minOccurs="0" name="key" type="xs:string" />
                                 <xs:element minOccurs="0" name="value" type="xs:string" />
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:sequence>
                  </xs:complexType>
               </xs:element>
            </xs:sequence>
        <method name="GET"> </xs:complexType>
          <response>
            <representation mediaType="application/xml" element="prefix1:bridgeDomains"/<xs:complexType name="bridgeDomains">
          </response>
  <xs:sequence>
      </method>
        <method name<xs:element maxOccurs="POSTunbounded">
 minOccurs="0" name="domainName"        <request>type="xs:string" />
            <representation mediaType="application/xml" element="prefix1:bridgeDomain"/>
 </xs:sequence>
         </request>xs:complexType>
          <response status<xs:complexType name="204bridgeDomain">
          </response>
        </method>  <xs:sequence>
        <resource path="vlanoptions/{iface}">
          <param name<xs:element minOccurs="iface0" stylename="templatedomainName" type="xs:string" />
           <method name="GET">
    <xs:element name="vlanid" type="xs:int" />
              <request>
 <xs:element minOccurs="0" name="interfacesNames">
             </request>     <xs:complexType>
            <response>
         <xs:sequence>
     <representation mediaType="application/xml" element="prefix1:interfaceVLANOptions"/>
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="interfaceName" type="xs:string" />
           </response>
          </method>xs:sequence>
          <method name="PUT">
        </xs:complexType>
               <request></xs:element>
               <representation mediaType="application/xml" element="prefix1:interfaceVLANOptions"<xs:element minOccurs="0" name="description" type="xs:string" />
            </request>xs:sequence>
         </xs:complexType>
   <response status="204">
  </xs:schema>
   </grammars>
       </response><resources base="http://localhost:8888/opennaas/router/myre/vlanbridge/">
          </method><resource path="/">
        </resource>
 <method name="GET">
      <resource path="{id}">      <response>
          <param name="id" style="template" type="xs:string"/>
     <representation mediaType="application/xml" element="prefix1:bridgeDomains" />
           <method name="DELETE"> </response>
         </method>
   <request>
      <method name="POST">
     </request>
       <request>
     <response status="204">
         <representation mediaType="application/xml" element="prefix1:bridgeDomain" </response>>
            </method>request>
          <method  <response namestatus="GET204" />
            <request>
            </request>method>
            <response><resource path="vlanoptions">
            <method  <representation mediaTypename="application/xml" element="prefix1:bridgeDomain"/GET">
            </response>
   <request>
       </method>
          <method <param name="iface" style="PUT"query" type="xs:string" />
              <request> </request>
               <response>
                  <representation mediaType="application/xml" element="prefix1:bridgeDomaininterfaceVLANOptions" />
               </request>response>
            <response status="204</method>
            <method name="PUT">
             </response>
  <request>
        </method>
        </resource>
  <param name="iface" style="query" type="xs:string" </resource>>
    </resources>
  </application>

Methods

GetBridgeDomains

Returns the names of all existing Bridge Domains

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/ 
MethodGET 
ReturnBridgeDomainsList of Strings representing the name of all existing Bridge Domains in the router.
Response Example

In following example the router contains two domains: vlan.2 and vlan.3

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<ns2:bridgeDomains xmlns:ns2="opennaas.api">
   <domainName>vlan.2</domainName>
   <domainName>vlan.3</domainName>
</ns2:bridgeDomains>

 

GetBridgeDomain

Returns the information of anl existing Bridge Domain

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/{domain-id} 
MethodGET 
Path Parameterdomain-idName of the bridge domain we want to retrieve information
ReturnBridgeDomainBridge domain information, consisting of its name, description, vlan and the list of interfaces composing the bridge domain.
Response Example

Following response would represent the information bridge domain "vlan.2"

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:bridgeDomain xmlns:ns2="opennaas.api">
  <domainName>vlan.2</domainName>
  <vlanid>2</vlanid>
  <interfacesNames>
    <interfaceName>fe-0/2/1.3</interfaceName>
    <interfaceName>fe-0/2/1.2</interfaceName>
  </interfacesNames>
  <description>Sample bridge domain</description>
</ns2:bridgeDomain>    

CreateBridgeDomain

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge 
MethodPOST 
Body ParameterBridgeDomainBridge domain information, consisting of its name, description, vlan and the list of interfaces composing the bridge domain.
Return- 
Body Example
              <representation mediaType="application/xml" element="prefix1:interfaceVLANOptions" />
               </request>
               <response status="204" />
            </method>
         </resource>
         <resource path="{id}">
            <param name="id" style="template" type="xs:string" />
            <method name="DELETE">
               <request />
               <response status="204" />
            </method>
            <method name="GET">
               <request />
               <response>
                  <representation mediaType="application/xml" element="prefix1:bridgeDomain" />
               </response>
            </method>
            <method name="PUT">
               <request>
                  <representation mediaType="application/xml" element="prefix1:bridgeDomain" />
               </request>
               <response status="204" />
            </method>
         </resource>
      </resource>
   </resources>
</application>

Methods

GetBridgeDomains

Returns the names of all existing Bridge Domains

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/ 
MethodGET 
ReturnBridgeDomainsList of Strings representing the name of all existing Bridge Domains in the router.
Response Example

In following example the router contains two domains: vlan.2 and vlan.3

Code Block
themeEclipse
Code Block
themeConfluence
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:bridgeDomainbridgeDomains xmlns:ns2="opennaas.api">
   <domainName>vlan.3<2</domainName>
  <vlanid>3</vlanid>
  <interfacesNames>
    <interfaceName>fe-0/1/2.1</interfaceName>
    <interfaceName>fe-0/1/3.5</interfaceName>
  </interfacesNames>
  <description>Another sample bridge domain</description>
</ns2:bridgeDomain>

 

UpdateBridgeDomain

 <domainName>vlan.3</domainName>
</ns2:bridgeDomains>

 

GetBridgeDomain

Returns the information of anl existing Bridge Domain

 
  ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/{bridgedomain-id} 
MethodPUT  GET 
Path Parameter{bridgedomain-id}Id Name of the vlan bridge to modify.domain we want to retrieve information
ReturnBody ParameterBridgeDomainBridge domain information, consisting of its name, description, vlan and the list of interfaces composing the bridge domain.
Return- 
Body Example
Response Example

Following response would represent the information bridge domain "vlan.2"

Code Block
themeConfluenceEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:bridgeDomain xmlns:ns2="opennaas.api">
  <domainName>vlan.3<2</domainName>
  <vlanid>3<<vlanid>2</vlanid>
  <interfacesNames>
    <interfaceName>fe-0/2/1.3</interfaceName>
    <interfaceName>fe-0/2/1.1<2</interfaceName>
  </interfacesNames>
  <description>Another sample<description>Sample bridge domain</description>
</ns2:bridgeDomain>

...

    

CreateBridgeDomain

Creates a bridge domain in the router, containing the list of interfaces to add and the vlanId to use.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/{bridge-id}  
MethodDELETEPOST 
Path Body Parameter{bridge-id}BridgeDomainBridge domain information, consisting of its name, description, vlan and the list of interfaces composing the bridge domainId of the vlan bridge to remove.
Return- 

GetInterfaceVLANOptions

Retrieves the vlan options from a specific interface.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/vlanoptions?iface={ifaceName} 
MethodGET 
Query ParameterifaceName of the information which information we want to retrieve.
ReturnInterfaceVLANOptionsObject containing a Map with all vlan options of the interface
Response Example

Following message contains the information from a custom interface. It has two configured options: native-vlan-id (102) and port-mode(trunk)

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:interfaceVLANOptions xmlns:ns2="opennaas.api">
  <vlanOptions>
    <entry>
      <key>native-vlan-id</key>
      <value>102</value>
    </entry>
    <entry>
      <key>port-mode</key>
      <value>trunk</value>
    </entry>
  </vlanOptions>
</ns2:interfaceVLANOptions>

 

SetInterfaceVLANOptions

Body Example

Following messag would create vlan.3 domain, using the vlanid "3", with two interfaces attached to it.

Code Block
themeConfluence
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:bridgeDomain xmlns:ns2="opennaas.api">
  <domainName>vlan.3</domainName>
  <vlanid>3</vlanid>
  <interfacesNames>
    <interfaceName>fe-0/1/2.1</interfaceName>
    <interfaceName>fe-0/1/3.5</interfaceName>
  </interfacesNames>
  <description>Another sample bridge domain</description>
</ns2:bridgeDomain>

UpdateBridgeDomain

Updates an existing bridge domain. User must provide all the information the vlan bridge would contain, not only the new information.

  ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/vlanoptions?iface={ifaceName{bridge-id} 
MethodGETPUT 
Query Path Parameteriface{bridge-id}Id of the vlan bridge to modifyName of the information which information we want to set.
Body ParameterInterfaceVLANOptionsBridgeDomainBridge domain information, consisting of its name, description, vlan and the list of interfaces composing the bridge domain.Object containing a Map with all vlan options of the interface
Return- 
Body Example

This message would be valid to remove the interface fe-0/1/3.5 created in the "createBridgeDomain" illustration.

Code Block
themeConfluence
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:bridgeDomain xmlns:ns2="opennaas.api">
  <domainName>vlan.3</domainName>
  <vlanid>3</vlanid>
  <interfacesNames>
    <interfaceName>fe-0/1/2.1</interfaceName>
  </interfacesNames>
  <description>Another sample bridge domain</description>
</ns2:bridgeDomain>

DeleteBridgeDomain

Removes an existing bridge domain from the router.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/{bridge-id} 
MethodDELETE 
Path Parameter{bridge-id}Id of the vlan bridge to remove.
Return- 

GetInterfaceVLANOptions

Retrieves the vlan options from a specific interface.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/vlanoptions?iface={ifaceName} 
MethodGET 
Query ParameterifaceName of the information which information we want to retrieve.
ReturnInterfaceVLANOptionsObject containing a Map with all vlan options of the interface
Response Example

Following message contains the information from a custom interface. It has two configured options: native-vlan-id (102) and port-mode(trunk)

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:interfaceVLANOptions xmlns:ns2="opennaas.api">
  <vlanOptions>
    <entry>
      <key>native-vlan-id</key>
      <value>102</value>
    </entry>
    <entry>
      <key>port-mode</key>
      <value>trunk</value>
    </entry>
  </vlanOptions>
</ns2:interfaceVLANOptions>

 

SetInterfaceVLANOptions

Set the vlan options of a speciifc interface.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/vlanbridge/vlanoptions?iface={ifaceName} 
MethodPOST 
Query ParameterifaceName of the information which information we want to set.
Body ParameterInterfaceVLANOptionsObject containing a Map with all vlan options of the interface
Return- 
Body Example

Following message would put vlan options to a specific interface. The vlan options consists of the native-vlan-id (102) and the port-mode(trunk)

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:interfaceVLANOptions xmlns:ns2="opennaas.api">
  <vlanOptions>
    <entry>
      <key>native-vlan-id</key>
      <value>102</value>
    </entry>
    <entry>
      <key>port-mode</key>
      <value>trunk</value>
    </entry>
  </vlanOptions>
</ns2:interfaceVLANOptions>