-Add Flow1 Rule for s1 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule1.xml
- Set Suite Variable ${body}
- Log URL is ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Add Flow2 Rule for s1 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule2.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Get Operational Topology to verify the flows successfully installed in the bridge s1
- [Documentation] This request will fetch the operational topology and verify that the flows has been installed in the switch
- [Tags] Southbound
- @{list} Create List openflow:1
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Add Flow1 Rule for s2 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule1.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Add Flow2 Rule for s2 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule2.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Get Operational Topology to verify the flows successfully installed in the bridge s2
- [Documentation] This request will fetch the operational topology and verify that the flows has been installed in the switch
- [Tags] Southbound
- @{list} Create List openflow:2
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Ping host2 to IP of host1
- [Documentation] This step will verify the functionality of the vxlan tunnel between two OVSDB nodes. Ping h2(10.0.0.2)---> 10.0.0.1 , verify no packet loss
- Switch Connection ${conn_id2}
- SSHLibrary.Write h2 ping -w 1 10.0.0.1
- ${result} Read Until mininet>
- Should Contain ${result} 1 received, 0% packet loss
-
-Cleanup work after test completed
- [Documentation] Cleanup/Shutdown work that should be done at the completion of all tests
- Stop Mininet ${conn_id2}
- Stop Mininet ${conn_id1}
-