Methods
Remember to execute the queue in order to apply this methods to the physical device.
CreateStaticRoute
This method creates a new static route.
Value | Description | |
---|---|---|
URL | http://localhost:8888/opennaas/router/{resourceName}/staticroute | |
Method | POST | |
Body Parameter |
| netIdIpAdress is mandatory. Either nextHopIpAddress or isDiscard to true must be present. preference is optional. |
Return | - |
Body Example
Following example would create a static route with network ID set to "200.200.200.0/24", next hop set to 1.2.3.4 and preference set to 500. There is no discard in this case, if it would be required use boolean tag <isDiscard> with "true" as value.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:staticRoute xmlns:ns2="opennaas.api"> <netIdIpAdress>200.200.200.0/24</netIdIpAdress> <nextHopIpAddress>1.2.3.4</nextHopIpAddress> <preference>555</preference> </ns2:staticRoute>
DeleteStaticRoute
This method will remove an existing static route rule.
Value | Description | |
---|---|---|
URL | http://localhost:8888/opennaas/router/{resourceName}/staticroute?netIdIpAdress={netIdIpAdress}&nextHopIpAddress={nextHopIpAddress} | |
Method | DELETE | |
Query Parameter | netIdIpAdress | |
Query Parameter | nextHopIpAddress | |
Return | - |
GetStaticRoutes
This method retrieves a list of static routes rules in the device.
Value | Description | |
---|---|---|
URL | http://localhost:8888/opennaas/router/{resourceName}/staticroute | |
Method | GET | |
Return | StaticRoutes | List of static route rules in the device |
Return body Example
Following example exposes a list of static route rules in the device composed by only one element.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:staticRoutes xmlns:ns2="opennaas.api"> <staticRoute> <netIdIpAdress>0.0.0.0/0</netIdIpAdress> <isDiscard>true</isDiscard> <preference>0</preference> </staticRoute> </ns2:staticRoutes>