The objective of this lab is to manage a open virtual switch (OVS) using north-bound REST API interface and south-bound OVSDB plugin on ODL controller. I will be adding/deleting bridge and adding & deleting ports on OVS bridge using OVSDB REST API . I will use ODL controller GUI and OVS cli to confirm the test. I will use Chrome POSTMAN for RESTAPI operations
It is import you have Lab-2 running before you try this lab as I have not given instructions how to start ODL and OVS topology
Topology:
Components required:
ODL karaf based Lithium-SR3 controller, mininet on VM, POSTMAN & OVSDB plugin for ODL controller
Pre-condition:
- Lab-3 running
- Google POSTMAN installed
Procedure:
- Check ovsdb plugin in ODL karaf interface and install if they are missing
- >feature:install odl-ovsdb-openstack
- >feature:install odl-ovsdb-northbound
- Note: if error/warning raised on karaf console while installing ovsdb-northbound, logout and start karaf again
- Check network topology in DLUX gui
- Open POSTMAN in Google Chrome and try below REST API commands. No authentication required. Type in command and select GET operation. Press Send button
- Get node-id
- Get OVS switch uuid
- Get Bridge Ports
- Get all bridges
- Create a bridge and port together
Open_vSwitch UUID: 0b8ed0aa-67ac-4405-af13-70249a7e8a96
- Paste below JSON on POSTMAN ‘raw’ tab make sure JSON is selected
JSON:
{ "parent_uuid":"0b8ed0aa-67ac-4405-af13-70249a7e8a96", "row":{ "Bridge":{ "name":"testBridge1", "ports":{ "name":"testPort1", "interfaces":{ "name":"testPort1" }, "qos":{ "type": "linux-htb" } } } } }
- Check OVS switch if bridge and port is created
- ovs-vsctl show
- Refresh ODL gui, new bridge discovered in the gui
- Edit bridge
- Open_vSwitch UUID: 0b8ed0aa-67ac-4405-af13-70249a7e8a96
- Bridge UUID: 5da5a490-db6a-4f07-8404-339cf7baf6eb
- http://167.254.209.101:8282/ovsdb/nb/v3/node/OVS|192.168.56.101:39861/database/Open_vSwitch/table/Bridge/row/5da5a490-db6a-4f07-8404-339cf7baf6eb
JSON:
{ "parent_uuid":"0b8ed0aa-67ac-4405-af13-70249a7e8a96", "row": { "Bridge": { "protocols": "OpenFlow11" } } }
Note: I couldn’t find a way to delete port and bridge using REST API.