--- /dev/null
+*** Settings ***
+Documentation Test suite for the switch manager bundle.
+Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library Collections
+Library RequestsLibrary
+Library ../../libraries/Common.py
+Library ../../libraries/SwitchManager.py
+Variables ../../variables/Variables.py
+Library ../../libraries/Topology.py
+
+*** Variables ***
+${REST_CONTEXT} /controller/nb/v2/switchmanager
+
+*** Test Cases ***
+List all nodes
+ [Documentation] List all nodes and their properties in the network.
+ [Tags] list_info
+ Log ${TOPO_TREE_LEVEL}
+ ${topo_nodes} Get Nodes From Topology ${TOPO_TREE_LEVEL}
+ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${jsondata}= To JSON ${resp.content}
+ ${nodes} Extract All Nodes ${jsondata}
+ List Should Contain Sublist ${nodes} ${topo_nodes}
+Get a node
+ [Documentation] Get a node
+ Get node 00:00:00:00:00:00:00:02 OF
+Add property to node
+ [Documentation] Add a property to node
+ Add property to node OF 00:00:00:00:00:00:00:02 description Switch2
+ Node property should exist OF 00:00:00:00:00:00:00:02 description Switch2
+Remove property from node
+ [Documentation] Remove a property from node
+ Remove property from node OF 00:00:00:00:00:00:00:02 description
+ Node property should not exist OF 00:00:00:00:00:00:00:02 description Switch2
+Add property to nodeconnector
+ [Documentation] Add a property to nodeconnector
+ Add property to nodeconnector OF 00:00:00:00:00:00:00:02 OF 2 bandwidth 1000
+ Nodeconnector property should exist OF 00:00:00:00:00:00:00:02 OF 2 bandwidth ${1000}
+
+Remove property from nodeconnector
+ [Documentation] Remove a property from nodeconnector
+ Remove property from nodeconnector OF 00:00:00:00:00:00:00:02 OF 2 bandwidth
+ Nodeconnector property should not exist OF 00:00:00:00:00:00:00:02 OF 2 bandwidth ${1000}
+
+*** Keywords ***
+Get node
+ [Arguments] ${node_id} ${node_type}
+ [Documentation] Get a specific node
+ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} TO JSON ${resp.content}
+ ${node} Create Dictionary id ${node_id} type ${node_type}
+ ${content} Extract All Nodes ${result}
+ Log ${content}
+ List Should Contain Value ${content} ${node}
+
+Add property to node
+ [Arguments] ${node_type} ${node_id} ${property} ${value}
+ [Documentation] Add property to node
+ ${resp} Put ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}/property/${property}/${value}
+ Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+
+Remove property from node
+ [Arguments] ${node_type} ${node_id} ${property}
+ [Documentation] Remove property from node
+ ${resp} Delete ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}/property/${property}
+ Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+
+Add property to nodeconnector
+ [Arguments] ${node_type} ${node_id} ${nc_type} ${nc_id} ${property} ${value}
+ [Documentation] Add property to nodeconnector
+ ${resp} Put ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodeconnector/${node_type}/${node_id}/${nc_type}/${nc_id}/property/${property}/${value}
+ Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+
+Remove property from nodeconnector
+ [Arguments] ${node_type} ${node_id} ${nc_type} ${nc_id} ${property}
+ [Documentation] Remove property from nodeconnector
+ ${resp} Delete ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodeconnector/${node_type}/${node_id}/${nc_type}/${nc_id}/property/${property}
+ Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+
+Node property should exist
+ [Arguments] ${node_type} ${node_id} ${property} ${value}
+ [Documentation] Property of node should exist
+ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} TO JSON ${resp.content}
+ Log ${result}
+ ${nodes} Extract All Nodes ${result}
+ ${property_values} Extract Node Property Values ${result} ${property}
+ ${node} Create Dictionary id ${node_id} type ${node_type}
+ ${property_value} Create Dictionary value ${value}
+ Log ${property_value}
+ List Should Contain Value ${nodes} ${node}
+ List Should Contain Value ${property_values} ${property_value}
+
+Node property should not exist
+ [Arguments] ${node_type} ${node_id} ${property} ${value}
+ [Documentation] Property of node should not exist
+ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} TO JSON ${resp.content}
+ Log ${result}
+ ${nodes} Extract All Nodes ${result}
+ ${properties} Extract Node Property Values ${result} ${property}
+ ${node} Create Dictionary id ${node_id} type ${node_type}
+ ${property} Create Dictionary value ${value}
+ Log ${property}
+ List Should Contain Value ${nodes} ${node}
+ List Should Not Contain Value ${properties} ${property}
+
+Nodeconnector property should exist
+ [Arguments] ${node_type} ${node_id} ${nc_type} ${nc_id} ${property} ${value}
+ [Documentation] Property of nodeconnector should exist
+ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} TO JSON ${resp.content}
+ Log ${result}
+ ${property_values} Extract Nodeconnector Property Values ${result} ${property}
+ Log ${property_values}
+ ${property_value} Create Dictionary value ${value}
+ List Should Contain Value ${property_values} ${property_value}
+
+Nodeconnector property should not exist
+ [Arguments] ${node_type} ${node_id} ${nc_type} ${nc_id} ${property} ${value}
+ [Documentation] Property of nodeconnector should not exist
+ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} TO JSON ${resp.content}
+ Log ${result}
+ ${property_values} Extract Nodeconnector Property Values ${result} ${property}
+ Log ${property_values}
+ ${property_value} Create Dictionary value ${value}
+ List Should not Contain Value ${property_values} ${property_value}
+
+List all nodeconnectors of node
+ [Arguments] ${node_type} ${node_id}
+ [Documentation] List all nodeconnectors and properties of node
--- /dev/null
+*** Settings ***
+Documentation Test suite for the statistics manager module
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${node1} "node":{"type":"OF","id":"00:00:00:00:00:00:00:01"}
+${node2} "node":{"type":"OF","id":"00:00:00:00:00:00:00:02"}
+${node3} "node":{"type":"OF","id":"00:00:00:00:00:00:00:03"}
+${nodeconn1} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"}
+${nodeconn2} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"}
+${nodeconn3} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"1"}
+${nodeconn4} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"2"}
+${nodeconn5} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"}
+${nodeconn6} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"1"}
+${nodeconn7} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"2"}
+${nodeconn8} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"}
+
+${key} portStatistics
+${REST_CONTEXT} /controller/nb/v2/statistics
+
+*** Test Cases ***
+get port stats
+ [Documentation] Show port stats and validate result
+ [Tags] get
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
+ Should Contain ${resp.content} ${nodeconn1}
+ Should Contain ${resp.content} ${nodeconn2}
+ Should Contain ${resp.content} ${nodeconn3}
+ Should Contain ${resp.content} ${nodeconn4}
+ Should Contain ${resp.content} ${nodeconn5}
+ Should Contain ${resp.content} ${nodeconn6}
+ Should Contain ${resp.content} ${nodeconn7}
+ Should Contain ${resp.content} ${nodeconn8}
+get flow stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
+ Should Contain ${resp.content} ${node1}
+ Should Contain ${resp.content} ${node2}
+ Should Contain ${resp.content} ${node3}
+get table stats
+ [Documentation] Show flow stats and validate result
+ [Tags] get
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/table
+ Should Contain ${resp.content} ${node1}
+ Should Contain ${resp.content} ${node2}
+ Should Contain ${resp.content} ${node3}
+
+
--- /dev/null
+*** Settings ***
+Documentation Test suite for Topology Manager
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${nodeconn1} NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"}
+${nodeconn2} NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"}
+${nodeconn3} NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"}
+${nodeconn4} NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"}
+${name} test_userlink1
+${key} userLinks
+${REST_CONTEXT} /controller/nb/v2/topology
+
+*** Test Cases ***
+Get Topology
+ [Documentation] Get Topology and validate the result.
+ [Tags] get
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ Log ${resp.content}
+ Should Contain X Times ${resp.content} ${nodeconn1} 2
+ Should Contain X Times ${resp.content} ${nodeconn2} 2
+ Should Contain X Times ${resp.content} ${nodeconn3} 2
+ Should Contain X Times ${resp.content} ${nodeconn4} 2
+Add a userlink
+ [Documentation] Add a userlink, list to validate the result.
+ [Tags] add
+ ${body} Create Dictionary name ${name} status Success srcNodeConnector
+ ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
+ ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} data=${body}
+ Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+
+Remove a userlink
+ [Documentation] Remove a userlink, list to validate the result.
+ [Tags] remove
+ ${body} Create Dictionary name ${name} status Success srcNodeConnector
+ ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
+ ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/userLink/${name}
+ Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body}
--- /dev/null
+*** Settings ***
+Documentation Test suite for the forwarding rule manager module.
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${name} flow1
+${key} flowConfig
+${node_id} 00:00:00:00:00:00:00:02
+${REST_CONTEXT} /controller/nb/v2/flowprogrammer
+
+*** Test Cases ***
+Add a flow
+ [Documentation] Add a flow, list to validate the result.
+ [Tags] add
+ ${node} Create Dictionary type OF id ${node_id}
+ ${actions} Create List OUTPUT=1
+ ${body} Create Dictionary name ${name} installInHw true node
+ ... ${node} priority 1 etherType 0x800 nwDst
+ ... 10.0.0.1/32 actions ${actions}
+ ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
+ Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+
+Remove a flow
+ [Documentation] Remove a flow, list to validate the result.
+ [Tags] remove
+ ${node} Create Dictionary type OF id ${node_id}
+ ${actions} Create List OUTPUT=1
+ ${body} Create Dictionary name ${name} installInHw true node
+ ... ${node} priority 1 etherType 0x800 nwDst
+ ... 10.0.0.1/32 actions ${actions}
+ ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
+ Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body}
--- /dev/null
+*** Settings ***
+Documentation Test suite for the host tracker module.
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${name} 10.0.1.4
+${key} hostConfig
+${REST_CONTEXT} /controller/nb/v2/hosttracker
+
+*** Test Cases ***
+Add a host
+ [Documentation] Add a host, list to validate the result.
+ [Tags] add
+ ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
+ ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
+ ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
+ ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/address/${name} data=${body}
+ Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+
+Remove a host
+ [Documentation] Remove a host, list to validate the result.
+ [Tags] remove
+ ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
+ ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
+ ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
+ ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/address/${name}
+ Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body}
--- /dev/null
+*** Settings ***
+Documentation Test suite for the arp handler module.
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library SSHLibrary
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${name} test
+${key} subnetConfig
+${REST_CONTEXT} /controller/nb/v2/subnetservice
+${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
+
+*** Test Cases ***
+List Subnets
+ [Documentation] List subnets and verify default is there
+ [Tags] Get
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/subnets
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ ${subnet} Get From Dictionary ${result} ${key}
+ ${content} Get From List ${subnet} 0
+ Dictionary Should Contain Value ${content} 0.0.0.0/0
+Ping h1 to h4
+ [Documentation] Ping h1 to h4, verify no packet loss
+ [Tags] Get
+ Write h1 ping -c 3 h4
+ Sleep 6
+ ${result} Read
+ Should Contain ${result} 64 bytes
+List hosts
+ [Documentation] List hosts and verify h1 and h4
+ [Tags] Get
+ ${resp} Get session ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} 10.0.0.1
+ Should Contain ${resp.content} 10.0.0.4
+Add a subnet
+ [Documentation] Add a subnet, list to validate the result.
+ [Tags] add
+ ${body} Create Dictionary name ${name} subnet 11.0.0.254/8
+ ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/subnet/${name} data=${body}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/subnets
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+Remove a subnet
+ [Documentation] Remove a subnet, list to validate the result.
+ [Tags] remove
+ ${body} Create Dictionary name ${name} subnet 11.0.0.254/8
+ ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/subnet/${name}
+ Should Be Equal As Strings ${resp.status_code} 204
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/subnets
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body}
+
--- /dev/null
+*** Settings ***
+Documentation Test suite for the forwarding manager module.
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library SSHLibrary
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${name} test_route1
+${key} staticRoute
+${REST_CONTEXT} /controller/nb/v2/staticroute
+
+*** Test Cases ***
+Add a static route
+ [Documentation] Add a static route, list to validate the result.
+ [Tags] add
+ ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
+ ... 10.0.0.2
+ ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
+ Should Be Equal As Strings ${resp.status_code} 201 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+ Sleep 3
+Remove a static route
+ [Documentation] Remove a static route, list to validate the result.
+ [Tags] remove
+ ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
+ ... 10.0.0.2
+ ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
+ Should Be Equal As Strings ${resp.status_code} 204 Response status code error
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
+ Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body}
+
--- /dev/null
+*** Settings ***
+Documentation Test suite for OVSDB plugin
+Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
+Suite Teardown Delete All Sessions
+Library SSHLibrary
+Library Collections
+Library ../../libraries/RequestsLibrary.py
+Library ../../libraries/Common.py
+Library ../../libraries/Topology.py
+Variables ../../variables/Variables.py
+
+*** Variables ***
+${key} node
+${REST_CONTEXT_CM} /controller/nb/v2/connectionmanager
+${REST_CONTEXT_BD} /controller/nb/v2/networkconfig/bridgedomain
+
+*** Test Cases ***
+List connections
+ [Documentation] Get node connections and validate result
+ [Tags] Get
+ ${topo_nodes} Get Nodes From Topology ${TOPO_TREE_LEVEL}
+ ${resp} Get session ${REST_CONTEXT_CM}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ ${nodes} Get From Dictionary ${result} ${key}
+ List Should Contain Sublist ${nodes} ${topo_nodes}
+Connect to mininet
+ [Documentation] Connect to mininet, list the nodes and validate result
+ [Tags] add
+ ${body} Create Dictionary type OVS id MININET
+ ${resp} Put session ${REST_CONTEXT_CM}/node/MININET/address/${MININET}/port/6640
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ Dictionaries Should Be Equal ${result} ${body}
+ ${resp} Get session ${REST_CONTEXT_CM}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+ Sleep 2
+Add bridge s4
+ [Documentation] Add bridge s4
+ [Tags] add
+ ${resp} Post session ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4 data={}
+ Should Be Equal As Strings ${resp.status_code} 201
+Delete s1 ports
+ [Documentation] Delete s1 connected ports
+ [Tags] delete
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+ Should Be Equal As Strings ${resp.status_code} 200
+Add s4 ports
+ [Documentation] Add s4 connected ports
+ [Tags] add
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1
+ ... data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2
+ ... data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+ ... data={"type":"patch", "CUSTOM":{"peer":"s4-eth1"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+ ... data={"type":"patch", "CUSTOM":{"peer":"s4-eth2"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+Ping h1 to h4
+ [Documentation] Ping h1 to h4, verify no packet loss
+ [Tags] Get
+ Sleep 5
+ Write h1 ping -c 30 h4
+ Sleep 35
+ ${result} Read
+ Should Contain ${result} 64 bytes
+Delete s4 ports
+ [Documentation] Delete s4 connected ports
+ [Tags] delete
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+ Should Be Equal As Strings ${resp.status_code} 200
+Add s1 ports
+ [Documentation] Add s1 connected ports
+ [Tags] add
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1
+ ... data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2
+ ... data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+ ... data={"type":"patch", "CUSTOM":{"peer":"s1-eth1"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+ ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+ ... data={"type":"patch", "CUSTOM":{"peer":"s1-eth2"}}
+ Should Be Equal As Strings ${resp.status_code} 201
+Delete bridge s4
+ [Documentation] Delete bridge s4
+ [Tags] Delete
+ ${resp} Delete session ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4
+ Should Be Equal As Strings ${resp.status_code} 200
+Disconnect mininet
+ [Documentation] Disconnect mininet, list the nodes and validate result
+ [Tags] delete
+ ${body} Create Dictionary type OVS id MININET
+ ${resp} Delete session ${REST_CONTEXT_CM}/node/OVS/MININET
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} Get session ${REST_CONTEXT_CM}/nodes
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body}
--- /dev/null
+*** Settings ***
+Documentation Test suite for the OpenDaylight base edition
+Suite Setup Start Suite
+Suite Teardown Stop Suite
+Library SSHLibrary
+
+*** Variables ***
+${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2
+
+*** Keywords ***
+Start Suite
+ Log Start the test on the base edition
+ Open Connection ${MININET} prompt=>
+ Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
+ Write sudo ovs-vsctl set-manager ptcp:6640
+ Write sudo mn -c
+ Sleep 2
+ Write ${start}
+ Sleep 70
+ Read
+Stop Suite
+ Log Stop the test on the base edition
+ Read
+ Write exit
+ Sleep 2
+ Read
+ Close Connection
--- /dev/null
+*** Settings ***
+Documentation Test suite for the OpenDaylight base edition
+Suite Setup Start Suite
+Suite Teardown Stop Suite
+Library SSHLibrary
+
+*** Variables ***
+${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2
+
+*** Keywords ***
+Start Suite
+ Log Start the test on the base edition
+ Open Connection ${MININET} prompt=>
+ Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
+ Write sudo ovs-vsctl set-manager ptcp:6640
+ Write sudo mn -c
+ Sleep 2
+ Write ${start}
+ Sleep 70
+ Read
+Stop Suite
+ Log Stop the test on the base edition
+ Read
+ Write exit
+ Sleep 2
+ Read
+ Close Connection