Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Note

Remember to execute the queue in order to apply this methods to the physical device.

...

GetInterfacesNames

This method enables a physical interface which is downreturns all the interface names.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/upPhysicalInterfaceinterfaces 
Method

POSTGET

 
Body ParameterLogicalPortLogicalPort representing the interface we want to enable. Only physical interfaces are allowed.
Return- 
Body Example
ReturnInterfaces names listAll the interfaces names in a list
Return body example

Following example shows interface names list returned with 12 elements.Following example would enable interface fe-0/2/1

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<logicalPort>
   <name>fe-0/2/1</name>
</logicalPort>

DownPhysicalInterface


<interfaces>
 <interface>fe-0/3/3.1</interface>
    <interface>fe-0/3/3.2</interface>
    <interface>sp-1/0/0.0</interface>
    <interface>lt-1/1/0.0</interface>
    <interface>lt-1/1/0.1</interface>
    <interface>fe-2/0/1.0</interface>
    <interface>ge-2/0/2.0</interface>
    <interface>lo0.0</interface>
    <interface>gr-1/1/0.1</interface>
    <interface>gr-1/1/0.2</interface>
    <interface>gr-1/1/0.3</interface>
    <interface>gr-1/1/0.0</interface>
</interfaces>

GetInterfaceInfo

This method returns information of the given interface nameThis method disabled a physical interface, marking it as being down, but without removing its configuration.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/downPhysicalInterface/interfaces/info?ifaceName={interfaceName} 
Method

POSTGET

 
Body ParameterReturnLogicalPortLogicalPort representing the interface we want to disable. Only physical interfaces are allowed.
Return- 
Body Example
InterfaceInfoInterface information for the given interface name
Response body example

Following example shows interface information for the subinterface with name Following example would disable interface fe-0/23/3.1.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<logicalPort><interfaceInfo>
   <name>fe-0/23/3.1</name>
 <vlan>1</vlan>
 <state>OK</state>
 <description>Test description</description>
</logicalPort>/interfaceInfo>

UpPhysicalInterface

This method enables a physical interface which is down.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/status/up?ifaceName={interfaceName} 
Method

PUT

 
Query ParameterInterface nameInterface name we want to enable. Only physical interfaces are allowed.
Return- 

DownPhysicalInterface

This method disables a physical interface, marking it as being down, but without removing its configuration.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/status/down?ifaceName={interfaceName} 
Method

PUT

 
Query ParameterInterface nameInterface name we want to disable. Only physical interfaces are allowed.
Return- 
CreateSubInterface

This method creates a subinterface from an existing physical interface.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/createSubInterfaceinterfaces 
Method

POST

 
Body ParameterNetworkPortInterfaceInfoNetworkPort InterfaceInfo containing the name of the physical interface and the port number used to create the subinterface. It should be either a LogicalTunnel or an EthernetPortcan contain more information like interface description, VLAN ID or Peer Unit depending on the type of interface to be created.
Return- 
Body Example

Following example would create interface fe-0/2/1.2 (, that means , a new subinterface in interface fe-0/2/1 with port number 2), and VLAN ID 2.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<ethernetPort><interfaceInfo>
   <toAssociations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="portImplementsEndpoint"> <name>fe-0/2/1.2</name>
      <to xsi:type="vlanEndpoint">
         <vlanID>2</vlanID><vlan>2</vlan>
    <description>Interface  <description</to>description>
   </toAssociations>
   <name>fe-0/2/1</name>
   <portNumber>2</portNumber>
</ethernetPort>

SetEncapsulation

</interfaceInfo>

DeleteSubInterface

This method removes an existing subinterface from a physical interface.This method configures the type of encapsulation to use in given interface. Supported are: no encapsulation and TaggedEthenetEncapsulation.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/setEncapsulationinterfaces?ifaceName={interfaceName} 
Method

POSTDELETE

 
Body Query ParameterSetEncapsulationRequestInterface nameInterface name we want to deleteRequest containing the LogicalPort representing the interface and the ProtocolIFType containing the type of encapsulation to use. TaggedEthernetEncapsulation will contain a ProtocolEndpoint with the ProtocolIFType "LAYER_2_VLAN_USING_802_1Q".
Return- 
Body Example

Following example would set TaggedEthernetEncapsulation to interface fe-0/3/3.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<setEncapsulationRequest>
   <encapsulation>LAYER_2_VLAN_USING_802_1Q</encapsulation>
   <iface>
      <name>fe-0/3/3</name>
   </iface>
</setEncapsulationRequest>

 

DeleteSubInterface

GetLogicalRouters

The GetLogicalRouters method obtains a list of logical routers names present in the physical oneThis method removes an existing subinterface from a physical interface.

TODO
 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/createSubInterfacelogicalrouter 
Method

POSTGET

 Body ParameterNetworkPort
Return- Logical router names list List of logical routers names of the physical router.
Response Body Example

Following request would remove subinterface fe-0/2/1.2 from the list of subinterfaces of interface fe-0/2/1example shows the response containing 2 logical routers names.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ethernetPort><logicalRouters>
    <name>fe-0/2/1</name>
<logicalRouter>logicalrouter1</logicalRouter>
    <portNumber>2<<logicalRouter>logicalrouter2</portNumber>logicalRouter>
</ethernetPort>logicalRouters>

CreateLogicalRouter

Info

LogicalRouters and PhysicalRouters are seen as independents independent devices in OpenNaaS. Once you create a logical router, you must register a protocolContext in its protocolSessionManager and start it before starting using it.

The CreateLogicalRouter method will instantiate a new logical router device inside the physical one. Moreover it is possible attaching existing subinterfaces to it.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/createLogicalRouter/logicalrouter/{logical_router_name} 
Method

POST

 
Body ParameterComputerSystemInterfaces names listSubinterfaces names list to be attached to the new ComputerSystem representing the new logical router to be created. Optionally it can include the name of the interfaces to be added to this logical router.
Return- 
Body Example

Following example would create a new logical router called "logicalrouter1" with the fe-0/3/3.1 interfacesubinterface attached.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<computerSystem>
   <toAssociations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="component">
      <to xsi:type="enabledLogicalElement"> standalone="yes" ?>
<interfaces>
         <name>fe<interface>fe-0/3/3<3.1</name>
         <portNumber>1</portNumber>
      </to>
   </toAssociations>
   <name>logicalrouter1</name>
</computerSystem>interface>
</interfaces>

DeleteLogicalRouter

This method will remove an existing logical router from the physical one.

AddInterfacesToLogicalRouter

...

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/addInterfacesToLogicalRouter/logicalrouter/{logical_router_name}/interfaces 
Method

POSTPUT

 
Body ParameterAddInterfacesToLogicalRouterRequestInterfaces names listSubinterfaces names list to be attached to the logical routerRequest containing the ComputerSystem representing the logical router, and a list of LogicalPorts to be added to it.
Return- 
Body Example

Following request would add interface interfaces fe-0/3/3.2 and fe-0/3/3.3 to logicalrouter1the logical router.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<addInterfacesToLogicalRouterRequest><interfaces>
   <interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ethernetPort">
      <name>fe <interface>fe-0/3/3</name>
      <portNumber>2</portNumber>
   </interfaces>
   <interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ethernetPort">3.2</interface>
    <interface>  <name>fefe-0/3/3.3</name>
      <portNumber>3</portNumber>
   </interfaces>
   <logicalRouter>
      <elementName>logicalrouter1</elementName>
      <name>logicalrouter1</name>
   </logicalRouter>
</addInterfacesToLogicalRouterRequest>interface>
</interfaces>

RemoveInterfacesFromLogicalRouter

...

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/removeInterfacesFromLogicalRouter/logicalrouter/{logical_router_name}/interfaces/delete  
Method

POSTPUT

 
Query ParameterInterface nameInterface name we want to apply encapsulation.
Body ParameterRemoveInterfacesFromLogicalRouterRequestInterfaces names listSubinterfaces names list Request containing the ComputerSystem representing the logical router, and a list of LogicalPorts to be removed from itthe logical router.
Return- 
Body Example

Following request would remove interface fe-0/3/3.2 from logicalrouter1.

Code Block
themeEclipse
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<removeInterfacesFromLogicalRouterRequest>
   <interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ethernetPort">
      <name>fe-0/3/3</name>
      <portNumber>2</portNumber>
   </interfaces>
   <logicalRouter>
      <elementName>logicalrouter1</elementName>
      <name>logicalrouter1</name>
   </logicalRouter>
</removeInterfacesFromLogicalRouterRequest>

 

DeleteLogicalRouter

SetEncapsulation

This method configures the type of encapsulation to use in given interface. Supported are: no encapsulation and TaggedEthenetEncapsulation.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/encapsulation/type/{encapsulationType}?ifaceName={interfaceName} 
Method

PUT

 
Query ParameterInterface nameInterface name we want to apply encapsulation.
Query ParameterEncapsulation typeEncapsulation type to be applied in the interface. Valid values are "tagged-ethernet" for IEEE 802.1Q and "none" for no encapsulation.
Return- 

SetEncapsulationLabel

This method configures the label of encapsulation to use in given interfaceThis method will remove an existing logical router from the physical one.

 ValueDescription
URLhttp://hostname:8888/opennaas/router/{resourceName}/chassis/deleteLogicalRouterinterfaces/encapsulation/label/{encapsulationLabel}?ifaceName={interfaceName}  
Method

POSTPUT

 
Body Query ParameterComputerSystemComputerSystem representing the new logical router to be removed.
Return- 
Body Example

Following example would remove the logical router called "logicalrouter1" from the existing logical router of our physical router.

...

themeEclipse
languagehtml/xml

...

Interface nameInterface name we want to apply encapsulation label.
Query ParameterEncapsulation labelEncapsulation label to be applied in the interface. Valid values are depend on the encapsulation type.
Return-