Remember to execute the queue in order to apply this methods to the physical device. |
This method returns all the interface names.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces | |
Method | GET | |
Return | Interfaces names list | All the interfaces names in a list |
Following example shows interface names list returned with 12 elements.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <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> |
This method returns information of the given interface name.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/info?ifaceName={interfaceName} | |
Method | GET | |
Return | InterfaceInfo | Interface information for the given interface name |
Following example shows interface information for the subinterface with name fe-0/3/3.1.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <interfaceInfo> <name>fe-0/3/3.1</name> <vlan>1</vlan> <state>OK</state> <description>Test description</description> </interfaceInfo> |
This method enables a physical interface which is down.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/status/up?ifaceName={interfaceName} | |
Method | PUT | |
Query Parameter | Interface name | Interface name we want to enable. Only physical interfaces are allowed. |
Return | - |
This method disables a physical interface, marking it as being down, but without removing its configuration.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/status/down?ifaceName={interfaceName} | |
Method | PUT | |
Query Parameter | Interface name | Interface name we want to disable. Only physical interfaces are allowed. |
Return | - |
This method creates a subinterface from an existing physical interface.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces | |
Method | POST | |
Body Parameter | InterfaceInfo | InterfaceInfo containing the name of the physical interface and the port number used to create the subinterface. It can contain more information like interface description, VLAN ID or Peer Unit depending on the type of interface to be created. |
Return | - |
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.
<?xml version="1.0" encoding="UTF-8"?> <interfaceInfo> <name>fe-0/2/1.2</name> <vlan>2</vlan> <description>Interface description</description> </interfaceInfo> |
This method removes an existing subinterface from a physical interface.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces?ifaceName={interfaceName} | |
Method | DELETE | |
Query Parameter | Interface name | Interface name we want to delete. |
Return | - |
The GetLogicalRouters method obtains a list of logical routers names present in the physical one.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/logicalrouter | |
Method | GET | |
Return | Logical router names list | List of logical routers names of the physical router. |
Following example shows the response containing 2 logical routers names.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <logicalRouters> <logicalRouter>logicalrouter1</logicalRouter> <logicalRouter>logicalrouter2</logicalRouter> </logicalRouters> |
LogicalRouters and PhysicalRouters are seen as 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.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/logicalrouter/{logical_router_name} | |
Method | POST | |
Body Parameter | Interfaces names list | Subinterfaces names list to be attached to the new logical router. |
Return | - |
Following example would create a new logical router called with the fe-0/3/3.1 subinterface attached.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <interfaces> <interface>fe-0/3/3.1</interface> </interfaces> |
This method will remove an existing logical router from the physical one.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/logicalrouter/{logical_router_name} | |
Method | DELETE | |
Return | - |
This method will add interfaces to an existing logical router. Be aware that the list of interfaces to be added should not exist in another logical router of the physical one.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/logicalrouter/{logical_router_name}/interfaces | |
Method | PUT | |
Body Parameter | Interfaces names list | Subinterfaces names list to be attached to the logical router. |
Return | - |
Following request would add interfaces fe-0/3/3.2 and fe-0/3/3.3 to the logical router.
<?xml version="1.0" encoding="UTF-8"?> <interfaces> <interface>fe-0/3/3.2</interface> <interface> fe-0/3/3.3</interface> </interfaces> |
This method will remove existing interfaces from a specific logical router. Its configuration will be passed to the physical router.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/logicalrouter/{logical_router_name}/interfaces/delete | |
Method | PUT | |
Query Parameter | Interface name | Interface name we want to apply encapsulation. |
Body Parameter | Interfaces names list | Subinterfaces names list to be removed from the logical router. |
Return | - |
This method configures the type of encapsulation to use in given interface. Supported are: no encapsulation and TaggedEthenetEncapsulation.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/encapsulation/type/{encapsulationType}?ifaceName={interfaceName} | |
Method | PUT | |
Query Parameter | Interface name | Interface name we want to apply encapsulation. |
Query Parameter | Encapsulation type | Encapsulation type to be applied in the interface. Valid values are "tagged-ethernet" for IEEE 802.1Q and "none" for no encapsulation. |
Return | - |
This method configures the label of encapsulation to use in given interface.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/chassis/interfaces/encapsulation/label/{encapsulationLabel}?ifaceName={interfaceName} | |
Method | PUT | |
Query Parameter | Interface name | Interface name we want to apply encapsulation label. |
Query Parameter | Encapsulation label | Encapsulation label to be applied in the interface. Valid values are depend on the encapsulation type. |
Return | - |