+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 10
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Host Tracker
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.1.4"
-
-*** 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 2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${FLOW} 3
-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 2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Static Route
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** 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
- ${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 10
-# This works locally but NOT in OpenDaylight
-#Check flow in flow stats
-# [Documentation] Show flow stats and validate result
-# [Tags] get
-# ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
-# Should Be Equal As Strings ${resp.status_code} 200
-# Log ${resp.content}
-# Should Contain X Times ${resp.content} 10.0.0.2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
- 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 Subnet Gateway
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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 -w 6 h4
- Sleep 6
- Write h4 ping -w 6 h1
- 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 AD-SAL Applications
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 10
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get list of nodes
- [Documentation] Get the inventory
- ${resp} Get session ${REST_CONTEXT}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1
- Should Contain ${resp.content} openflow:2
- Should Contain ${resp.content} openflow:3
-
-Get nodeconnector for a node 1
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1:1
- Should Contain ${resp.content} openflow:1:2
-
-Get nodeconnector for a node 2
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:2:1
- Should Contain ${resp.content} openflow:2:2
- Should Contain ${resp.content} openflow:2:3
-
-Get nodeconnector for a node 3
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:3:1
- Should Contain ${resp.content} openflow:3:2
- Should Contain ${resp.content} openflow:3:3
-
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF statistics
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get Stats for node 1
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} flow-capable-node-connector-statistics
- Should Contain ${resp.content} flow-table-statistics
-
-Get Stats for node 2
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} flow-capable-node-connector-statistics
- Should Contain ${resp.content} flow-table-statistics
-
-Get Stats for node 3
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} flow-capable-node-connector-statistics
- Should Contain ${resp.content} flow-table-statistics
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF Topology
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${topology1} "flow:1"
-${node1} "openflow:1"
-${node2} "openflow:2"
-${node3} "openflow:3"
-${key} link
-${REST_CONTEXT_1} /restconf/operational/network-topology:network-topology
-${REST_CONTEXT_2} /restconf/operational/network-topology:network-topology/topology/flow:1
-${REST_CONTEXT_3} /restconf/config/network-topology:network-topology/topology/flow:1/link/userlink
-
-*** Test Cases ***
-Get RESTCONF Topology
- [Documentation] Get RESTCONF Topology and validate the result.
- [Tags] get
- ${resp} Get session ${REST_CONTEXT_1}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${topology1}
-
-List all the links
- [Documentation] List all the links in the topology.
- [Tags] get
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:2
- ${body2} Create Dictionary source-node=openflow:3 source-tp=openflow:3:3
- ${link2} Create Dictionary link-id=openflow:3:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:3
- ${link1} Create Dictionary link-id=openflow:2:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:2
- ${link4} Create Dictionary link-id=openflow:1:2 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:2 dest-tp=openflow:2:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:1
- ${link3} Create Dictionary link-id=openflow:1:1 destination=${body1} source=${body2}
- ${links} Create List ${link1} ${link2} ${link3} ${link4}
- ${resp} Get session ${REST_CONTEXT_2}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} topology
- ${topology} Get From List ${content} 0
- ${link} Get From Dictionary ${topology} link
- Sort List ${link}
- Lists Should be Equal ${link} ${links}
-
-Add a link
- [Documentation] Add a link, list to validate the result.
- [Tags] add
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:1
- ${body3} Create Dictionary link-id=userlink destination=${body1} source=${body2}
- ${links} Create List ${body3}
- ${body} Create Dictionary link=${links}
- ${resp} Put session ${REST_CONTEXT_3} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${link} Get From Dictionary ${result} link
- Lists Should be Equal ${link} ${links}
-
-
-Remove a link
- [Documentation] Remove a link, list to validate the result.
- [Tags] remove
- ${resp} Delete session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 404
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
-
-*** Test Cases ***
-
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/0/flow/152 data=${BODY2}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 152
-
-Verify after adding flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.20.1
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/0/flow/152
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 152
-
-# Standing bug #368 - This has been fixed
-Verify after deleting flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 40
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.20.1
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for MD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get list of nodes
- [Documentation] Get the inventory
- ${resp} Get session ${REST_CONTEXT}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1
- Should Contain ${resp.content} openflow:2
- Should Contain ${resp.content} openflow:3
-
-Get nodeconnector for a node 1
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1:1
- Should Contain ${resp.content} openflow:1:2
-
-Get nodeconnector for a node 2
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:2:1
- Should Contain ${resp.content} openflow:2:2
- Should Contain ${resp.content} openflow:2:3
-
-Get nodeconnector for a node 3
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:3:1
- Should Contain ${resp.content} openflow:3:2
- Should Contain ${resp.content} openflow:3:3
-
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF statistics
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get Stats for node 1
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} flow-capable-node-connector-statistics
- Should Contain ${resp.content} flow-table-statistics
-
-Get Stats for node 2
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} flow-capable-node-connector-statistics
- Should Contain ${resp.content} flow-table-statistics
-
-Get Stats for node 3
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} flow-capable-node-connector-statistics
- Should Contain ${resp.content} flow-table-statistics
+++ /dev/null
-*** Settings ***
-Documentation Test suite RESTCONF Topology
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${topology1} "flow:1"
-${node1} "openflow:1"
-${node2} "openflow:2"
-${node3} "openflow:3"
-${key} link
-${REST_CONTEXT_1} /restconf/operational/network-topology:network-topology
-${REST_CONTEXT_2} /restconf/operational/network-topology:network-topology/topology/flow:1
-${REST_CONTEXT_3} /restconf/config/network-topology:network-topology/topology/flow:1/link/userlink
-
-*** Test Cases ***
-Get RESTCONF Topology
- [Documentation] Get RESTCONF Topology and validate the result.
- [Tags] get
- ${resp} Get session ${REST_CONTEXT_1}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${topology1}
-
-List all the links
- [Documentation] List all the links in the topology.
- [Tags] get
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:2
- ${body2} Create Dictionary source-node=openflow:3 source-tp=openflow:3:3
- ${link2} Create Dictionary link-id=openflow:3:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:3
- ${link1} Create Dictionary link-id=openflow:2:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:2
- ${link4} Create Dictionary link-id=openflow:1:2 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:2 dest-tp=openflow:2:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:1
- ${link3} Create Dictionary link-id=openflow:1:1 destination=${body1} source=${body2}
- ${links} Create List ${link1} ${link2} ${link3} ${link4}
- ${resp} Get session ${REST_CONTEXT_2}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} topology
- ${topology} Get From List ${content} 0
- ${link} Get From Dictionary ${topology} link
- Sort List ${link}
- Lists Should be Equal ${link} ${links}
-
-Add a link
- [Documentation] Add a link, list to validate the result.
- [Tags] add
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:1
- ${body3} Create Dictionary link-id=userlink destination=${body1} source=${body2}
- ${links} Create List ${body3}
- ${body} Create Dictionary link=${links}
- ${resp} Put session ${REST_CONTEXT_3} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${link} Get From Dictionary ${result} link
- Lists Should be Equal ${link} ${links}
-
-
-Remove a link
- [Documentation] Remove a link, list to validate the result.
- [Tags] remove
- ${resp} Delete session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 404
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${BODY1} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
-${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
-
-*** Test Cases ***
-Add a flow - Sending IPv4 Dest Address and Eth type
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/139 data=${BODY1}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 139
-
-Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.10.1
-
-Remove a flow - - Sending IPv4 Dest Address and Eth type
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/139
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 139
-
-# Reason in using high time is, I used STOPWATCH to check the timer after deleting the flow config
-Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.10.1
-
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/152 data=${BODY2}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 152
-
-Verify after adding flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.20.1
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/152
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 152
-
-Verify after deleting flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 40
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.20.1
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for MD-SAL NSF mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Host Tracker
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.1.4"
-
-*** 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 2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${FLOW} 3
-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 2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Static Route
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** 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
- ${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 30
-# This works locally but NOT in OpenDaylight
-#Check flow in flow stats
-# [Documentation] Show flow stats and validate result
-# [Tags] get
-# ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
-# Should Be Equal As Strings ${resp.status_code} 200
-# Log ${resp.content}
-# Should Contain X Times ${resp.content} 10.0.0.2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
- 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 Subnet Gateway
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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 -w 6 h4
- Sleep 6
- Write h4 ping -w 6 h1
- 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 AD-SAL Applications
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Host Tracker
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.1.4"
-
-*** 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 2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${FLOW} 3
-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 2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Static Route
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** 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
- ${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 30
-# This works locally but NOT in OpenDaylight
-#Check flow in flow stats
-# [Documentation] Show flow stats and validate result
-# [Tags] get
-# ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
-# Should Be Equal As Strings ${resp.status_code} 200
-# Log ${resp.content}
-# Should Contain X Times ${resp.content} 10.0.0.2 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
- 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 Subnet Gateway
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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 -w 6 h4
- Sleep 6
- Write h4 ping -w 6 h1
- 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 AD-SAL Applications mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for pushing/verify/remove a flow through RESTCONF
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f1.xml
-${FLOW} 124
-${TABLE} 2
-@{FLOWELMENTS} nw_dst=10.0.1.0 table=2 dec_ttl
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for pushing/verify/remove a flow through RESTCONF
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f2.xml
-${FLOW} 125
-${TABLE} 2
-@{FLOWELMENTS} nw_src=10.0.0.1 table=2 drop
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for pushing/verify/remove a flow through RESTCONF
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f3.xml
-${FLOW} 126
-${TABLE} 2
-@{FLOWELMENTS} dl_src=00:00:00:00:00:01 table=2 drop
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IP,Ethernet and port
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f5.xml
-${FLOW} 128
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:ff:ff:ff:ff table=2 dec_ttl dl_src=00:00:00:00:23:ae nw_src=10.1.2.0 nw_dst=20.4.0.0 in_port=0
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch mpls-ttl
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation OF1.3 Suite to cover TTL Actions
-... - Set IP TTL
-... - Decrement IP TTL
-... - Copy TTL outwards
-... - Copy TTL inwards
-... - Set MPLS TTL
-... - Decrement MPLS TTL
-...
-... NOTE: for OVS, it appears that set_ttl, and both copy in/out are not supported, so need to skip those checks for now.
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Test Template Create And Remove Flow
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library String
-Library XML
-Resource ../../../libraries/FlowLib.txt
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${GENERIC_ACTION_FLOW_FILE} ${CURDIR}/../../../variables/xmls/genericActionFlow.xml
-${MININET_CMD} sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,1 --switch ovsk,protocols=OpenFlow13
-${ipv4_src} 10.1.2.0/24
-${ipv4_dst} 40.4.0.0/16
-${eth_type} 0x800
-${eth_src} 00:00:00:01:23:ae
-${eth_dst} ff:ff:ff:ff:ff:ff
-${node_id} openflow:1
-${set_ip_ttl_doc} OF1.3: \ OFPAT_SET_NW_TTL = 23, /* IP TTL. */\n(currently not supported on OVS)
-${dec_ttl_doc} OF1.3: \ OFPAT_DEC_NW_TTL = 24, /* Decrement IP TTL. */
-${copy_ttl_in_doc} OFPAT_COPY_TTL_IN = 12, /* Copy TTL "inwards" -- from outermost to\nnext-to-outermost */\n(currently NOT supported in OVS)\n
-${copy_ttl_out_doc} OFPAT_COPY_TTL_OUT = 11, /* Copy TTL "outwards" -- from next-to-outermost\nto outermost */\n(currently NOT suported in OVS)
-${set_mpls_ttl_doc} OFPAT_SET_MPLS_TTL = 15, /* MPLS TTL */
-${dec_mpls_ttl_doc} OFPAT_DEC_MPLS_TTL = 16, /* Decrement MPLS TTL */
-
-*** Test Cases *** ODL flow action action key action value tableID flowID verify OVS? OVS specific string?
-Set_IP_TTL [Documentation] ${set_ip_ttl_doc}
- [Tags] ttl set
- set-nw-ttl-action nw-ttl 1 2 101 no set_ttl
-
-Dec_TTL [Documentation] ${dec_ttl_doc}
- [Tags] ttl dec
- dec-nw-ttl none none 3 305 yes dec_ttl
-
-Copy_TTL_In [Documentation] ${copy_ttl_in_doc}
- [Tags] ttl copyin
- copy-ttl-in none none 9 202 no copy_ttl_in
-
-Copy_TTL_Out [Documentation] ${copy_ttl_out_doc}
- [Tags] ttl copyout
- copy-ttl-out none none 8 909 no copy_ttl_out
-
-Set_MPLS_TTL [Documentation] ${set_mpls_ttl_doc}
- [Tags] ttl setmpls
- set-mpls-ttl-action mpls-ttl 1 4 505 yes set_mpls_ttl
-
-Dec_MPLS_TTL [Documentation] ${dec_mpls_ttl_doc}
- [Tags] ttl decmpls
- dec-mpls-ttl none none 2 1001 yes dec_mpls_ttl
-
-*** Keywords ***
-Create And Remove Flow
- [Arguments] ${flow_action} ${action_key} ${action_value} ${table_id} ${flow_id} ${verify_switch_flag}
- ... ${additional_ovs_flowelements}
- @{OVS_FLOWELEMENTS} Create List dl_dst=${eth_dst} table=${table_id} dl_src=${eth_src} nw_src=${ipv4_src} nw_dst=${ipv4_dst}
- ... ${additional_ovs_flowelements}
- ##The dictionaries here will be used to populate the match and action elements of the flow mod
- ${ethernet_match_dict}= Create Dictionary type=${eth_type} destination=${eth_dst} source=${eth_src}
- ${ipv4_match_dict}= Create Dictionary source=${ipv4_src} destination=${ipv4_dst}
- ##flow is a python Object to build flow details, including the xml format to send to controller
- ${flow}= Create Inventory Flow
- Set "${flow}" "table_id" With "${table_id}"
- Set "${flow}" "id" With "${flow_id}"
- Clear Flow Actions ${flow}
- Set Flow Action ${flow} 0 0 ${flow_action}
- Set Flow Ethernet Match ${flow} ${ethernet_match_dict}
- Set Flow IPv4 Match ${flow} ${ipv4_match_dict}
- ##If the ${flow_action} contains the string "set" we need to include a deeper action detail (e.g. set-ttl needs a element to indicate the value to set it to)
- Run Keyword If "set" in "${flow_action}" Add Flow XML Element ${flow} ${action_key} ${action_value} instructions/instruction/apply-actions/action/${flow_action}
- Log Flow XML is ${flow.xml}
- Add Flow To Controller And Verify ${flow.xml} ${node_id} ${flow.table_id} ${flow.id}
- Run Keyword If "${verify_switch_flag}" == "yes" Verify Flow On Mininet Switch ${OVS_FLOWELEMENTS}
- Remove Flow From Controller And Verify ${flow.xml} ${node_id} ${flow.table_id} ${flow.id}
- Run Keyword If "${verify_switch_flag}" == "yes" Verify Flow Does Not Exist On Mininet Switch ${OVS_FLOWELEMENTS}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IP,Ethernet,DSCP and Action dec TTL
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f7.xml
-${FLOW} 130
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:ff:ff:ff:aa table=2 nw_ecn=1 dl_src=00:00:00:11:23:ae nw_src=10.1.2.0 nw_dst=20.4.0.0 dec_ttl
-... nw_proto=56 nw_tos=60
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch ${EMPTY}
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IP,Ethernet,QoS, TCP dst/src port and Action dec MPLS TTL
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f8.xml
-${FLOW} 131
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 nw_ecn=2 dl_src=00:00:00:11:23:ae nw_src=17.0.0.0 nw_dst=172.168.0.0 dec_ttl
-... tcp nw_tos=8 in_port=0 tp_dst=8080 tp_src=25364
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch ${EMPTY}
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IP,Ethernet,QoS, TCP dst/src port and Action dec MPLS TTL
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f9.xml
-${FLOW} 132
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=20:14:29:01:19:61 table=2 nw_ecn=3 dl_src=00:00:00:11:23:ae nw_src=19.1.0.0 nw_dst=172.168.5.0 dec_ttl
-... udp nw_tos=32 in_port=0 tp_dst=8080 tp_src=25364
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IP,Ethernet,QoS, SCTP dst/src port and Action dec TTL
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f10.xml
-${FLOW} 133
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 nw_ecn=0 dl_src=00:00:00:11:23:ae nw_src=17.0.0.0 nw_dst=172.168.0.0 dec_ttl
-... sctp nw_tos=0 in_port=0 tp_dst=384 tp_src=768
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IP,Ethernet,QoS, SCTP dst/src port and Action dec TTL
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f11.xml
-${FLOW} 134
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 nw_ecn=3 dl_src=00:00:00:11:23:ae nw_src=17.0.0.0 nw_dst=172.168.0.0 dec_ttl
-... icmp nw_tos=108 in_port=0 icmp_type=6 icmp_code=3
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Ethernet,QoS, ARP and Action drop
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f12.xml
-${FLOW} 135
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:ff:ff:ff:ff table=2 dl_src=00:00:00:01:23:ae drop arp arp_op=1
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Ethernet,QoS, ARP and Action drop
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f13.xml
-${FLOW} 136
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:ff:ff:ff:ff table=2 dl_src=00:00:00:01:23:ae drop arp arp_op=1 arp_spa=192.168.4.1
-... arp_tpa=10.21.22.23
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Ethernet,QoS, ARP and Action drop
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f14.xml
-${FLOW} 137
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:ff:ff:ff:ff table=2 dl_src=00:00:fc:01:23:ae CONTROLLER:60 arp arp_op=1 arp_spa=192.168.4.1
-... arp_tpa=10.21.22.23 arp_tha=fe:dc:ba:98:76:54 arp_sha=12:34:56:78:98:ab
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Ethernet,QoS, ARP and Action drop
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f15.xml
-${FLOW} 138
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 dl_src=00:00:00:11:23:ae dec_mpls_ttl mpls dl_vlan=78
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Time our values and Vlan and PCP Vlan
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f16.xml
-${FLOW} 139
-${TABLE} 2
-@{FLOWELMENTS} table=2 idle_timeout=300 hard_timeout=600 priority=16 dl_vlan=78 dl_vlan_pcp=3
-... dl_src=00:00:00:11:23:ae dl_dst=ff:ff:29:01:19:61 dec_ttl
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${switchoutput} Read Until mininet>
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchoutput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${switchoutput} Read Until mininet>
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchoutput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Ethernet,QoS, ARP and Action drop
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f17.xml
-${FLOW} 140
-${TABLE} 2
-@{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 dl_src=00:00:00:11:23:ae dec_mpls_ttl mpls mpls_label=567 mpls_tc=3
-... mpls_bos=1 # mpls_label=567,mpls_tc=3,mpls_bos=1
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IPv6
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f18.xml
-${FLOW} 141
-${TABLE} 2
-@{FLOWELMENTS} ipv6 ipv6_src=fe80::2acf:e9ff:fe21:6431, ipv6_dst=aabb:1234:2acf:e9ff::/64 dec_ttl
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for metadata
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f19.xml
-${FLOW} 142
-${TABLE} 2
-@{FLOWELMENTS} metadata=0x3039 IN_PORT
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for metadata and mask
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f20.xml
-${FLOW} 143
-${TABLE} 2
-@{FLOWELMENTS} metadata=0x1010/0x12d692 LOCAL
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for metadata and mask
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f21.xml
-${FLOW} 144
-${TABLE} 2
-@{FLOWELMENTS} metadata=0x3039 udp6 ipv6 ipv6_dst=fe80::2acf:e9ff:fe21:6431 nw_tos=32 nw_ecn=3 tp_src=25364
-... tp_dst=8080 ipv6_src=1234:5678:9abc:def0:fdc0::/76 dec_ttl
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for metadata and mask
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f22.xml
-${FLOW} 145
-${TABLE} 2
-@{FLOWELMENTS} metadata=0x3039 tcp6 ipv6 ipv6_dst=fe80:2acf:e9ff:fe21::/94 nw_tos=240 nw_ecn=3 tp_src=183
-... tp_dst=8080 ipv6_src=1234:5678:9abc:def0:fdc0::/76 dec_ttl
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IPv6 flow labelk
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f23.xml
-${FLOW} 146
-${TABLE} 2
-@{FLOWELMENTS} metadata=0x3039 tcp6 ipv6 ipv6_dst=fe80:2acf:e9ff:fe21::/94 nw_tos=240 nw_ecn=3 tp_src=183
-... tp_dst=8080 ipv6_src=1234:5678:9abc:def0:fdc0::/76 dec_ttl ipv6_label=0x00021
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Tunnel ID
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f24.xml
-${FLOW} 147
-${TABLE} 2
-@{FLOWELMENTS} tun_id=0xa1f TABLE
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for IPv6 Flow label and ICMP type
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${FILE} ${CURDIR}/../../../variables/xmls/f25.xml
-${FLOW} 148
-${TABLE} 2
-@{FLOWELMENTS} icmp6 metadata=0x3039 ipv6_src=1234:5678:9abc:def0:fdc0::/76 ipv6_dst=fe80:2acf:e9ff:fe21::/94 dec_ttl ipv6_label=0x00021 nw_tos=240
-... nw_ecn=3 icmp_type=6 icmp_code=3 # ipv6_dst=fe80:2acf:e9ff:fe21::/94
-
-*** Test Cases ***
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${body} OperatingSystem.Get File ${FILE}
- Set Suite Variable ${body}
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Verify flows after adding flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Contain ${switchouput} ${flowElement}
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
- Should Not Contain ${resp.content} ${FLOW}
-
-Verify flows after deleting flow config on OVS
- [Documentation] Checking Flows on switch
- [Tags] Switch
- Sleep 1
- write dpctl dump-flows -O OpenFlow13
- ${body} OperatingSystem.Get File ${FILE}
- Sleep 1
- ${switchouput} Read
- : FOR ${flowElement} IN @{FLOWELMENTS}
- \ should Not Contain ${switchouput} ${flowElement}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for the OpenDaylight base edition with of10
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,1 --switch ovsk,protocols=OpenFlow13
-
-*** 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:6644
- Write sudo mn -c
- Read Until >
- Write ${start}
- Read Until mininet>
-
-Stop Suite
- Log Stop the test on the base edition
- Read
- Write exit
- Read Until >
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Stats Manager flows collection
-Library OperatingSystem
-Library Collections
-Library XML
-Library ../../../libraries/XmlComparator.py
-Variables ../../../variables/Variables.py
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Suite Setup Initialization Phase
-Suite Teardown Teardown Phase
-
-
-*** Variables ***
-${XmlsDir}= ${CURDIR}/../../../variables/xmls
-${switch_idx}= 1
-${switch_name}= s${switch_idx}
-@{xml_files}= f1.xml f2.xml f3.xml f5.xml f7.xml f8.xml f9.xml f10.xml f11.xml f12.xml f13.xml f14.xml f17.xml f19.xml f24.xml
-
-
-*** Test Cases ***
-Test Add Flows
- [Documentation] Add all flows and waits for SM to collect data
- :FOR ${flowfile} IN @{xml_files}
- \ Log ${flowfile}
- \ Init Flow Variables ${flowfile}
- \ Run Keyword And Continue On Failure Add Flow
- Sleep 30s
-Test Is Flow 1 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f1.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 2 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f2.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 3 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f3.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 5 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f5.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 7 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f7.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 8 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f8.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 9 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f9.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 10 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f10.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 11 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f11.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 12 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f12.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 13 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f13.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 14 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f14.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 17 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f17.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 19 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f19.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Is Flow 24 Added
- [Documentation] Checks if flow is configured and operational
- Init Flow Variables f24.xml
- Check Config Flow ${True}
- Check Operational Table ${True}
-Test Delete Flows
- [Documentation] Delete all flows and waits for SM to collect data
- :FOR ${flowfile} IN @{xml_files}
- \ Log ${flowfile}
- \ Init Flow Variables ${flowfile}
- \ Run Keyword And Continue On Failure Delete Flow
- Sleep 40s
-Test Is Flow 1 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f1.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 2 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f2.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 3 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f3.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 5 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f5.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 7 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f7.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 8 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f8.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 9 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f9.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 10 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f10.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 11 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f11.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 12 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f12.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 13 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f13.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 14 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f14.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 17 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f17.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 19 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f19.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-Test Is Flow 24 Deleted
- [Documentation] Checks if flow is not configured and operational
- Init Flow Variables f24.xml
- Check Config Flow ${False}
- Check Operational Table ${False}
-
-
-*** Keywords ***
-Init Flow Variables [Arguments] ${file}
- ${data}= Get File ${XmlsDir}/${file}
- ${xmlroot}= Parse Xml ${XmlsDir}/${file}
- ${table_id}= Get Element Text ${xmlroot} table_id
- ${flow_id}= Get Element Text ${xmlroot} id
- ${flow_priority}= Get Element Text ${xmlroot} priority
- Set Suite Variable ${table_id}
- Set Suite Variable ${flow_id}
- Set Suite Variable ${flow_priority}
- Set Suite Variable ${data}
- Set Suite Variable ${xmlroot}
-Check Config Flow [Arguments] ${expected}
- ${presence_flow} ${msg}= Flow Presence Config Flow
- ${msgf}= Get Presence Failure Message config ${expected} ${presence_flow} ${msg}
- Should Be Equal ${expected} ${presence_flow} msg=${msgf}
-Flow Presence Config Flow
- ${headers}= Create Dictionary Accept application/xml
- ${resp}= Get session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers}
- Log ${resp}
- Log ${resp.content}
- Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY}
- ${pres} ${msg}= Is Flow Configured ${data} ${resp.content}
- Run Keyword If '''${msg}'''!='${EMPTY}' Log ${msg}
- Return From Keyword ${pres} ${msg}
-Check Operational Table [Arguments] ${expected}
- ${presence_table} ${msg}= Flow Presence Operational Table
- ${msgf}= Get Presence Failure Message config ${expected} ${presence_table} ${msg}
- Should Be Equal ${expected} ${presence_table} msg=${msgf}
-Flow Presence Operational Table
- ${headers}= Create Dictionary Accept application/xml
- ${resp}= Get session /restconf/operational/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id} headers=${headers}
- Log ${resp}
- Log ${resp.content}
- Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY}
- ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content}
- Run Keyword If '''${msg}'''!='${EMPTY}' Log ${msg}
- Return From Keyword ${pres} ${msg}
-Add Flow
- Log ${data}
- ${resp}= Putxml session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} data=${data}
- ${msg}= Set Variable Adding flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
- Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
-Delete Flow
- ${resp}= Delete session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
- ${msg}= Set Variable Delete flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
- Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}
-Delete All Flows
- [Documentation] Deletes all flows
- :FOR ${flowfile} IN @{xml_files}
- \ Log ${flowfile}
- \ Init Flow Variables ${flowfile}
- \ Delete Flow
-Initialization Phase
- [Documentation] Initiate tcp connection with controller
- Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Teardown Phase
- [Documentation] Closes tcp connection with controller and removes flows
- Delete All Sessions
-Get Presence Failure Message [Arguments] ${ds} ${expected} ${presence} ${diffmsg}
- Return From Keyword If '''${diffmsg}'''!='${EMPTY}' Flow found in ${ds} data store but: ${diffmsg}
- ${msgf}= Set Variable If ${expected}==${True} The flow is expected in operational data store, but The flow is not expected in operational data store, but
- ${msgp}= Set Variable If ${presence}==${True} it is present. it is not present.
- Return From Keyword ${msgf} ${msgp}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for the OpenDaylight base edition with of13, aimed for statistics manager
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,1 --switch ovsk,protocols=OpenFlow13
-
-*** 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:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 20
- 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 RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-
-*** Test Cases ***
-Get list of nodes
- [Documentation] Get the inventory
- ${resp} Get session ${REST_CONTEXT}
- Should Be Equal As Strings ${resp.status_code} 200
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
- :FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ Should Contain ${resp.content} openflow:${IND}
-
-Get nodeconnector for the root node
- [Documentation] Get the inventory for the root node
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.content}
-
-Get nodeconnector for a node
- [Documentation] Get the inventory for a node
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
- :FOR ${IND} IN RANGE 2 ${numnodes+1}
- \ ${resp} Get session ${REST_CONTEXT}/node/openflow:${IND}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
-
-Get Stats for a node
- [Documentation] Get the stats for a node
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
- :FOR ${IND} IN RANGE 1 ${numnodes+1}
- \ ${resp} Get session ${REST_CONTEXT}/node/openflow:${IND}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Should Contain ${resp.content} flow-capable-node-connector-statistics
- \ Should Contain ${resp.content} flow-table-statistics
-
-*** Keywords ***
-Check conn loop
- [Arguments] ${arg} ${outerind} ${content}
- :FOR ${var} IN RANGE 1 ${arg+1}
- \ Should Contain ${content} openflow:${outerind}:${var}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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/Topologynew.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 Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/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}
-
-Check root node connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.content}
-
-Check node i connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
- :FOR ${ITEM} IN @{topo_nodes}
- \ ${IND} Get From Dictionary ${ITEM} id
- \ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/${IND}
- \ Should Be Equal As Strings ${resp.status_code} 200
- \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
-
-*** Keywords ***
-Check conn loop
- [Arguments] ${arg} ${outerind} ${content}
- :FOR ${var} IN RANGE 0 ${arg+1}
- \ Should Contain ${content} "id":"${var}"
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/Topologynew.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${nodeprefix} openflow:
-${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 Be Equal As Strings ${resp.status_code} 200
- ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
- Should Contain X Times ${resp.content} "00:00:00:00:00:00:00:01" ${TOPO_TREE_FANOUT+2}
- :FOR ${ITEM} IN @{topo_nodes}
- \ ${IND} Get From Dictionary ${ITEM} id
- \ Should Contain X Times ${resp.content} "${IND}" ${TOPO_TREE_FANOUT+3}
-
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
- :FOR ${ITEM} IN @{topo_nodes}
- \ ${IND} Get From Dictionary ${ITEM} id
- \ Should Contain ${resp.content} "${IND}"
-
-get table stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/table
- Should Be Equal As Strings ${resp.status_code} 200
- ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
- :FOR ${ITEM} IN @{topo_nodes}
- \ ${IND} Get From Dictionary ${ITEM} id
- \ Should Contain ${resp.content} "${IND}"
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Topology Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/Topologynew.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${nodeprefix} openflow:
-${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
- Log ${resp.content}
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- Should Contain X Times ${resp.content} "00:00:00:00:00:00:00:01" ${TOPO_TREE_FANOUT*2}
- ${leaflist} Get Ids Of Leaf Nodes ${TOPO_TREE_FANOUT} ${TOPO_TREE_DEPTH}
- ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
- :FOR ${ITEM} IN @{topo_nodes}
- \ ${IND} Get From Dictionary ${ITEM} id
- \ ${linkcnt} Num Of Links For Node ${IND} ${leaflist} ${TOPO_TREE_FANOUT}
- \ Should Contain X Times ${resp.content} "${IND}" ${linkcnt*2}
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for do pingall test
-Library SSHLibrary
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-
-*** Test Cases ***
-Ping all
- [Documentation] Do ping all test, verify no packet loss
- [Tags] pingall
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
- Write pingall
- Sleep ${numnodes}
- ${result} Read
- Should Not Contain ${result} X
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for MD-SAL NSF
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}
-
-** Keywords ***
-Start Suite
- Log Start mininet
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep ${numnodes*2+30}
- Read
-Stop Suite
- Log Stop mininet
- ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
- ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
- Read
- Write exit
- Sleep ${numnodes*2}
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for OVSDB Bridge Domain
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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] ovsdb
- ${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] ovsdb
- ${body} Create Dictionary type OVS id MININET
- ${resp} Put session ${REST_CONTEXT_CM}/node/MININET/address/${MININET}/port/6644
- 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] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- Sleep 5
- Write h1 ping -w 10 h4
- Sleep 10
- Write h4 ping -w 10 h1
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-Delete s4 ports
- [Documentation] Delete s4 connected ports
- [Tags] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- ${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 OVSDB
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 20
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for OVSDB Bridge Domain
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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] ovsdb
- ${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] ovsdb
- ${body} Create Dictionary type OVS id MININET
- ${resp} Put session ${REST_CONTEXT_CM}/node/MININET/address/${MININET}/port/6644
- 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] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- Sleep 5
- Write h1 ping -w 10 h4
- Sleep 10
- Write h4 ping -w 10 h1
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-Delete s4 ports
- [Documentation] Delete s4 connected ports
- [Tags] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- ${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] ovsdb
- ${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 OVSDB mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 20
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Start the controllers
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-
-*** Test Cases ***
-Stop All Controllers
- [Documentation] Stop all the controllers in the cluster
- Stopcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
- KillController ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
-
-
-Clean All Journals
- [Documentation] Clean the journals of all the controllers in the cluster
- CleanJournal ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 5
-
-Start All Controllers
- [Documentation] Start all the controllers in the cluster
- Startcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 120
\ No newline at end of file
+++ /dev/null
-*** Settings ***
-Documentation This test finds the leader for shards in a 3-Node cluster and executes CRUD operations on them
-
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-Variables ../../../variables/Variables.py
-
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-${SHARD_CAR_NAME} shard-car-config
-${SHARD_PEOPLE_NAME} shard-people-config
-${SHARD_CAR_PERSON_NAME} shard-car-people-config
-
-
-*** Test Cases ***
-Add cars and get cars from Leader
- [Documentation] Add 100 cars and get added cars from Leader
- ${CURRENT_CAR_LEADER} GetLeader ${SHARD_CAR_NAME} ${3} ${3} ${1} ${PORT} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log CURRENT_CAR_SHARD_LEADER ${CURRENT_CAR_LEADER}
- Set Suite Variable ${CURRENT_CAR_LEADER}
- ${resp} AddCar ${CURRENT_CAR_LEADER} ${PORT} ${100}
- ${resp} Getcars ${CURRENT_CAR_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Add persons and get persons from Leader
- [Documentation] Add 100 persons and get persons
- [Documentation] Note: There should be one person added first to enable rpc
- ${CURRENT_PEOPLE_LEADER} GetLeader ${SHARD_PEOPLE_NAME} ${3} ${3} ${1} ${PORT} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Set Suite Variable ${CURRENT_PEOPLE_LEADER}
- ${resp} AddPerson ${CURRENT_PEOPLE_LEADER} ${PORT} ${0}
- ${resp} AddPerson ${CURRENT_PEOPLE_LEADER} ${PORT} ${100}
- ${resp} GetPersons ${CURRENT_PEOPLE_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
-
-Add car-person mapping and get car-person mapping from Leader
- [Documentation] Add car-person and get car-person from Leader
- [Documentation] Note: This is done to enable working of rpc
- ${CURRENT_CAR_PERSON_LEADER} GetLeader ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Set Suite Variable ${CURRENT_CAR_PERSON_LEADER}
- ${resp} AddCarPerson ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0}
- Sleep 2
- ${resp} GetCarPersonMappings ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
-
-Purchase 100 cars using Leader
- [Documentation] Purchase 100 cars using Leader
- ${resp} BuyCar ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${100}
- Sleep 2
- ${resp} GetCarPersonMappings ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get car-person mappings using Leader
- [Documentation] Get car-person mappings using Leader to see 100 entry
- ${resp} GetCarPersonMappings ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Get car-person mappings using Follower1
- [Documentation] Get car-person mappings using Follower1 to see 100 entry
- ${FOLLOWERS} GetFollowers ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${FOLLOWERS}
- SET SUITE VARIABLE ${FOLLOWERS}
- ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
- Should Contain ${resp.content} user5
-
-
-Get car-person mappings using Follower2
- [Documentation] Get car-person mappings using Follower2 to see 100 entry
- ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
- Should Contain ${resp.content} user100
+++ /dev/null
-*** Settings ***
-Documentation This test finds the followers of certain shards in a 3-Node cluster and executes CRUD operations on any one follower
-
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-${SHARD_CAR_NAME} shard-car-config
-${SHARD_PEOPLE_NAME} shard-people-config
-${SHARD_CAR_PERSON_NAME} shard-car-people-config
-
-
-*** Test Cases ***
-Add cars and get cars from Follower1
- [Documentation] Add 100 cars and get added cars from Follower1
- ${FOLLOWERS} GetFollowers ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${FOLLOWERS}
- SET SUITE VARIABLE ${FOLLOWERS}
-
- ${resp} AddCar ${FOLLOWERS[0]} ${PORT} ${100}
- Sleep 1
- ${resp} Getcars ${FOLLOWERS[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Add persons and get persons from Follower1
- [Documentation] Add 100 persons and get persons from Follower1
- [Documentation] Note: There should be one person added first to enable rpc
- ${resp} AddPerson ${FOLLOWERS[0]} ${PORT} ${0}
- ${resp} AddPerson ${FOLLOWERS[0]} ${PORT} ${100}
- Sleep 1
- ${resp} GetPersons ${FOLLOWERS[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
-
-Add car-person mapping and get car-person mapping from Follower1
- [Documentation] Add car-person and get car-person from Follower1
- [Documentation] Note: This is done to enable working of rpc
-
- ${resp} AddCarPerson ${FOLLOWERS[0]} ${PORT} ${0}
- ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
-
-Purchase 100 cars using Follower1
- [Documentation] Purchase 100 cars using Follower1
-
- ${resp} BuyCar ${FOLLOWERS[0]} ${PORT} ${100}
- Sleep 1
- ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get car-person mappings using Follower1
- [Documentation] Get car-person mappings using follower1 to see 100 entry
- ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
- Should Contain ${resp.content} user5
-
-Get car-person mappings using Leader
- [Documentation] Get car-person mappings using Leader to see 100 entry
- ${CURRENT_CAR_LEADER} GetLeader ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${CURRENT_CAR_LEADER}
- Sleep 1
- ${resp} GetCarPersonMappings ${CURRENT_CAR_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Get car-person mappings using Follower2
- [Documentation] Get car-person mappings using Follower2 to see 100 entry
- ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
- Should Contain ${resp.content} user100
+++ /dev/null
-*** Settings ***
-Documentation This test brings down the current leader of the "car" shard and then executes CRUD operations on the new leader
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-
-*** Variables ***
-${SHARD} shard-car-config
-
-*** Test Cases ***
-Switch Leader
- [Documentation] stop leader and elect new leader
- ${OLD_LEADER} GetLeader ${SHARD} ${3} ${3} ${2} ${8181} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Stopcontroller ${OLD_LEADER} ${USERNAME} ${PASSWORD} ${KARAFHOME}
- Sleep 30
- ${NEW_LEADER} GetLeader ${SHARD} ${3} ${3} ${2} ${8181} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${NEW_LEADER}
- Set Suite Variable ${NEW_LEADER}
-
-Delete cars at new leader
- [Documentation] delete cars
- DeleteAllCars ${NEW_LEADER} ${PORT} ${0}
- ${resp} Getcars ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Delete people at new leader
- [Documentation] delete people
- DeleteAllPersons ${NEW_LEADER} ${PORT} ${0}
- ${resp} GetPersons ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Add cars and get cars from new leader
- [Documentation] Add 50 cars and get added cars from Leader
- ${resp} AddCar ${NEW_LEADER} ${PORT} ${50}
- Sleep 10
- ${resp} Getcars ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
- Should Contain ${resp.content} manufacturer50
- Should Not Contain ${resp.content} manufacturer60
-
-Add people and get people from leader
- [Documentation] Add 50 persons and get people
- [Documentation] Note: There should be one person added first to enable rpc
- ${resp} AddPerson ${NEW_LEADER} ${PORT} ${0}
- ${resp} AddPerson ${NEW_LEADER} ${PORT} ${50}
- Sleep 10
- ${resp} GetPersons ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user2
- Should Contain ${resp.content} user50
- Should Not Contain ${resp.content} user60
-
-Purchase 50 cars at new leader
- [Documentation] Add car-person and get car-person from Leader
- [Documentation] Note: This is done to enable working of rpc
- [Documentation] Purchase 50 cars using Leader
- ${resp} AddCarPerson ${NEW_LEADER} ${PORT} ${0}
- ${resp} GetCarPersonMappings ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
- ${resp} BuyCar ${NEW_LEADER} ${PORT} ${50}
- Sleep 10
-
-Get car-person mappings at new Leader
- [Documentation] Get car-person mappings using new leader to see 50 entry
- ${resp} GetCarPersonMappings ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
- Should Contain ${resp.content} user50
\ No newline at end of file
+++ /dev/null
-*** Settings ***
-Documentation This test tries to read the data that was written by the previous test from any one follower
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-
-*** Variables ***
-${SHARD} shard-car-config
-
-*** Test Cases ***
-Find follower
- [Documentation] find follower
- ${FOLLOWERS} GetFollowers ${SHARD} ${3} ${3} ${2} ${8181} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${FOLLOWERS}
- ${LAST_FOLLOWER} Set Variable ${FOLLOWERS[0]}
- Set Suite Variable ${LAST_FOLLOWER}
-
-Get cars from last follower
- [Documentation] get 50 cars from last follower
- ${resp} Getcars ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
- Should Contain ${resp.content} manufacturer50
- Should Not Contain ${resp.content} manufacturer60
-
-Get people from last follower
- [Documentation] get 50 people
- ${resp} GetPersons ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user2
- Should Contain ${resp.content} user50
- Should Not Contain ${resp.content} user60
-
-Get car-person mappings at last follower
- [Documentation] Get car-person mappings using last to see 50 entry
- ${resp} GetCarPersonMappings ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
- Should Contain ${resp.content} user50
\ No newline at end of file
+++ /dev/null
-*** Settings ***
-Documentation This test executes CRUD operations on any one follower after the old leader has been brought down
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-
-*** Variables ***
-${SHARD} shard-car-config
-
-*** Test Cases ***
-Find follower
- [Documentation] find follower
- ${FOLLOWERS} GetFollowers ${SHARD} ${3} ${3} ${2} ${8181} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${FOLLOWERS}
- ${LAST_FOLLOWER} Set Variable ${FOLLOWERS[0]}
- Set Suite Variable ${LAST_FOLLOWER}
-
-Delete cars at last follower
- [Documentation] delete cars
- DeleteAllCars ${LAST_FOLLOWER} ${PORT} ${0}
- ${resp} Getcars ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Delete people at last follower
- [Documentation] delete people
- DeleteAllPersons ${LAST_FOLLOWER} ${PORT} ${0}
- ${resp} GetPersons ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Add cars and get cars from last follower
- [Documentation] Add 40 cars and get added cars from last follower
- ${resp} AddCar ${LAST_FOLLOWER} ${PORT} ${40}
- Sleep 8
- ${resp} Getcars ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
- Should Contain ${resp.content} manufacturer40
- Should Not Contain ${resp.content} manufacturer50
-
-Add people and get people from last follower
- [Documentation] Add 40 persons and get people
- [Documentation] Note: There should be one person added first to enable rpc
- ${resp} AddPerson ${LAST_FOLLOWER} ${PORT} ${0}
- ${resp} AddPerson ${LAST_FOLLOWER} ${PORT} ${40}
- Sleep 8
- ${resp} GetPersons ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user2
- Should Contain ${resp.content} user40
- Should Not Contain ${resp.content} user50
-
-Purchase 40 cars at last follower
- [Documentation] Add car-person and get car-person from last follower
- [Documentation] Note: This is done to enable working of rpc
- [Documentation] Purchase 40 cars using Leader
- ${resp} AddCarPerson ${LAST_FOLLOWER} ${PORT} ${0}
- ${resp} GetCarPersonMappings ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
- ${resp} BuyCar ${LAST_FOLLOWER} ${PORT} ${40}
- Sleep 8
-
-Get car-person mappings at last follower
- [Documentation] Get car-person mappings using last follower to see 40 entry
- ${resp} GetCarPersonMappings ${LAST_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
- Should Contain ${resp.content} user40
\ No newline at end of file
+++ /dev/null
-*** Settings ***
-Documentation This test reads the data from the leader that was written to the follower by the previous test
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-
-*** Variables ***
-${SHARD} shard-car-config
-
-*** Test Cases ***
-Find Leader
- [Documentation] find new leader
- ${NEW_LEADER} GetLeader ${SHARD} ${3} ${3} ${2} ${8181} ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Log ${NEW_LEADER}
- Set Suite Variable ${NEW_LEADER}
-
-Get cars from new leader
- [Documentation] get 40 cars from new leader
- ${resp} Getcars ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
- Should Contain ${resp.content} manufacturer40
- Should Not Contain ${resp.content} manufacturer50
-
-Get people from new leader
- [Documentation] get 40 people from new leader
- ${resp} GetPersons ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user2
- Should Contain ${resp.content} user40
- Should Not Contain ${resp.content} user50
-
-Get car-person mappings at new leader
- [Documentation] Get car-person mappings using last to see 40 entry
- ${resp} GetCarPersonMappings ${NEW_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
- Should Contain ${resp.content} user40
\ No newline at end of file
+++ /dev/null
-*** Settings ***
-Documentation This test kills the leader and verifies that on restart the old leader is able to rejoin the cluster
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-${KARAF_HOME} /root/odl/dist
-${USER_NAME} root
-${PASSWORD} Ecp123
-${CAR_SHARD} shard-car-config
-
-*** Test Cases ***
-Stop All Controllers
- [Documentation] Stop all the controllers in the cluster
- Stopcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
- KillController ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
-
-
-Clean All Journals
- [Documentation] Clean the journals of all the controllers in the cluster
- CleanJournal ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 5
-
-Start All Controllers
- [Documentation] Start all the controllers in the cluster
- Startcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 120
-
-Delete all cars
- [Documentation] Delete all the cars from the system
- ${resp} DeleteAllCars ${MEMBER1} ${PORT} 0
- ${resp} GetCars ${MEMBER1} ${PORT} 0
- Should Be Equal As Strings ${resp.status_code} 404
-
-
-Delete all people
- [Documentation] Delete all the people from the system
- ${resp} DeleteAllPersons ${MEMBER1} ${PORT} 0
- ${resp} GetPersons ${MEMBER1} ${PORT} 0
- Should Be Equal As Strings ${resp.status_code} 404
-
-Add 200 cars
- [Documentation] Add 200 cars
- ${resp} AddCar ${MEMBER1} ${PORT} ${200}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Add 200 people
- [Documentation] Add 200 people
- ${resp} AddPerson ${MEMBER1} ${PORT} ${0}
- ${resp} AddPerson ${MEMBER1} ${PORT} ${200}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Add Car Person mapping
- [Documentation] Add Car Persons
- ${resp} AddCarPerson ${MEMBER1} ${PORT} ${0}
- ${resp} BuyCar ${MEMBER1} ${PORT} ${200}
-
-Stop the Leader
- ${CAR_LEADER} GetLeader ${CAR_SHARD} ${3} ${3} ${1} 8181 ${MEMBER1} ${MEMBER2} ${MEMBER3}
- Set Suite Variable ${CAR_LEADER}
- Stopcontroller ${CAR_LEADER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
- KillController ${CAR_LEADER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
-
-Get all the cars from Follower 1
- ${followers} GetFollowers ${CAR_SHARD} ${3} ${3} ${1} 8181 ${MEMBER1} ${MEMBER2} ${MEMBER3}
- ${resp} Getcars ${followers[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Restart the Leader
- Startcontroller ${CAR_LEADER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 120
-
-Get all the cars from Leader
- ${resp} Getcars ${CAR_LEADER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Cleanup All Controllers
- [Documentation] Stop all the controllers in the cluster
- Stopcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
-
-
-
+++ /dev/null
-*** Settings ***
-Documentation This test kills any of the followers and verifies that when that follower is restarted it can join the cluster
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-${KARAF_HOME} /root/odl/dist
-${USER_NAME} root
-${PASSWORD} Ecp123
-${CAR_SHARD} shard-car-config
-
-*** Test Cases ***
-Stop All Controllers
- [Documentation] Stop all the controllers in the cluster
- Stopcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
- KillController ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
-
-
-Clean All Journals
- [Documentation] Clean the journals of all the controllers in the cluster
- CleanJournal ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 5
-
-Start All Controllers
- [Documentation] Start all the controllers in the cluster
- Startcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 120
-
-Delete all cars
- [Documentation] Delete all the cars from the system
- ${resp} DeleteAllCars ${MEMBER1} ${PORT} 0
- ${resp} GetCars ${MEMBER1} ${PORT} 0
- Should Be Equal As Strings ${resp.status_code} 404
-
-
-Delete all people
- [Documentation] Delete all the people from the system
- ${resp} DeleteAllPersons ${MEMBER1} ${PORT} 0
- ${resp} GetPersons ${MEMBER1} ${PORT} 0
- Should Be Equal As Strings ${resp.status_code} 404
-
-Add 200 cars
- [Documentation] Add 200 cars
- ${resp} AddCar ${MEMBER1} ${PORT} ${200}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Add 200 people
- [Documentation] Add 200 people
- ${resp} AddPerson ${MEMBER1} ${PORT} ${0}
- ${resp} AddPerson ${MEMBER1} ${PORT} ${200}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Add Car Person mapping
- [Documentation] Add Car Persons
- ${resp} AddCarPerson ${MEMBER1} ${PORT} ${0}
- ${resp} BuyCar ${MEMBER1} ${PORT} ${200}
-
-Stop one of the followers
- ${followers} GetFollowers ${CAR_SHARD} ${3} ${3} ${1} 8181 ${MEMBER1} ${MEMBER2} ${MEMBER3}
- ${CAR_FOLLOWER} Set Variable ${followers[0]}
- Set Suite Variable ${CAR_FOLLOWER}
- Stopcontroller ${CAR_FOLLOWER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
- KillController ${CAR_FOLLOWER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
-
-Get all the cars from the other Follower
- ${followers} GetFollowers ${CAR_SHARD} ${3} ${3} ${1} 8181 ${MEMBER1} ${MEMBER2} ${MEMBER3}
- ${resp} Getcars ${followers[0]} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Restart the Stopped Follower
- Startcontroller ${CAR_FOLLOWER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 120
-
-Get all the cars from Stopped Follower
- ${resp} Getcars ${CAR_FOLLOWER} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Cleanup All Controllers
- [Documentation] Stop all the controllers in the cluster
- Stopcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
-
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Clustering Datastore
-Library SSHLibrary
-
-
-** Keywords ***
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Longevity test of cluster datastore
-Library ../../../../libraries/CrudLibrary.py
-
-*** Variables ***
-
-
-*** Test Cases ***
-Run Tests in Loop for Specified Time
- [Documentation] Run CRUD operation from nodes for specified time
- Testlongevity ${DURATION} ${PORT} ${IP1} ${IP2} ${IP3}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Longevity test of cluster datastore
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-
-** Keywords ***
-Start Suite
-Stop Suite
+++ /dev/null
-*** Settings ***
-Documentation Start the controllers
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-
-*** Test Cases ***
-Stop All Controllers
- [Documentation] Stop all the controllers in the cluster
- Stopcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Stopcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 30
- KillController ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- KillController ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
-
-
-Clean All Journals
- [Documentation] Clean the journals of all the controllers in the cluster
- CleanJournal ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- CleanJournal ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 5
-
-Start All Controllers
- [Documentation] Start all the controllers in the cluster
- Startcontroller ${MEMBER1} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER2} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Startcontroller ${MEMBER3} ${USER_NAME} ${PASSWORD} ${KARAF_HOME}
- Sleep 120
\ No newline at end of file
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Routed RPC.
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-
-
-*** Test Cases ***
-Add cars and get cars from Leader
- [Documentation] Add 100 cars and get added cars from Leader
- ${resp} AddCar ${MEMBER1} ${PORT} ${100}
- ${resp} Getcars ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Add persons and get persons from Leader
- [Documentation] Add 100 persons and get persons
- [Documentation] Note: There should be one person added first to enable rpc
- ${resp} AddPerson ${MEMBER1} ${PORT} ${0}
- ${resp} AddPerson ${MEMBER1} ${PORT} ${100}
- ${resp} GetPersons ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
- SLEEP 10
-
-Add car-person mapping and get car-person mapping from Follower1
- [Documentation] Add car-person and get car-person from Leader
- [Documentation] Note: This is done to enable working of rpc
- ${resp} AddCarPerson ${MEMBER2} ${PORT} ${0}
- ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
- SLEEP 5
-
-Purchase 100 cars using Follower1
- [Documentation] Purchase 100 cars using Follower1
- ${resp} BuyCar ${MEMBER2} ${PORT} ${100}
- ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get Cars from Leader
- [Documentation] Get 100 using Leader
- ${resp} Getcars ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer99
-
-Get persons from Leader
- [Documentation] Get 101 Persons from Leader
- ${resp} GetPersons ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Get car-person mappings using Leader
- [Documentation] Get 101 car-person mappings using Leader to see 100 entry
- ${resp} GetCarPersonMappings ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Routed RPC.
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/SettingsLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/config/
-
-*** Test Cases ***
-Add cars and get cars from Leader
- [Documentation] Add 100 cars and get added cars from Leader
- ${resp} AddCar ${MEMBER1} ${PORT} ${100}
- ${resp} Getcars ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Add persons and get persons from Leader
- [Documentation] Add 100 persons and get persons
- [Documentation] Note: There should be one person added first to enable rpc
- ${resp} AddPerson ${MEMBER1} ${PORT} ${0}
- ${resp} AddPerson ${MEMBER1} ${PORT} ${100}
- ${resp} GetPersons ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
-
-Add car-person mapping and get car-person mapping from Follower1
- [Documentation] Add car-person and get car-person from Follower1
- [Documentation] Note: This is done to enable working of rpc
- ${resp} AddCarPerson ${MEMBER2} ${PORT} ${0}
- ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user0
-
-Purchase 100 cars using Follower
- [Documentation] Purchase 100 cars using Follower
- SLEEP 10
- ${resp} BuyCar ${MEMBER2} ${PORT} ${100}
- ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get Cars from Leader
- [Documentation] Get 100 using Leader
- ${resp} Getcars ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer9
-
-Get persons from Leader
- [Documentation] Get 11 Persons from Leader
- ${resp} GetPersons ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Get car-person mappings using Leader
- [Documentation] Get car-person mappings using Leader to see 100 entry
- ${resp} GetCarPersonMappings ${MEMBER1} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Stop Leader
- [Documentation] Stop Leader controller
- ${resp} Stopcontroller ${MEMBER1} ${USERNAME} ${PASSWORD} ${KARAF_HOME}
- SLEEP 30
- ${resp} Killcontroller ${MEMBER1} ${USERNAME} ${PASSWORD} ${KARAF_HOME}
-
-
-Add cars and get cars from Follower1
- [Documentation] Add 100 cars and get added cars from Follower
- ${resp} AddCar ${MEMBER2} ${PORT} ${100}
- ${resp} Getcars ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer1
-
-Add persons and get persons from Follower1
- [Documentation] Add 100 persons and get persons
- [Documentation] Note: There should be one person added first to enable rpc
- ${resp} AddPerson ${MEMBER2} ${PORT} ${0}
- ${resp} AddPerson ${MEMBER2} ${PORT} ${100}
- ${resp} GetPersons ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user5
- SLEEP 10
-
-Purchase 100 cars using Follower2
- [Documentation] Purchase 100 cars using Follower2
- ${resp} BuyCar ${MEMBER3} ${PORT} ${100}
- SLEEP 10
- ${resp} GetCarPersonMappings ${MEMBER3} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get Cars from Follower1
- [Documentation] Get 100 using Follower1
- ${resp} Getcars ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} manufacturer9
-
-Get persons from Follower1
- [Documentation] Get 11 Persons from Follower1
- ${resp} GetPersons ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Get car-person mappings using Follower1
- [Documentation] Get car-person mappings using Follower1 to see 100 entry
- ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} user100
-
-Start Leader
- [Documentation] Start Leader controller
- ${resp} Startcontroller ${MEMBER1} ${USERNAME} ${PASSWORD} ${KARAF_HOME}
- SLEEP 20
-
+++ /dev/null
-*** Settings ***
-Documentation Checking Network created in OpenStack are pushed to OpenDaylight
-Suite Setup Create Session OSSession http://${OPENSTACK}:9696 headers=${X-AUTH}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${ODLREST} /controller/nb/v2/neutron/networks
-${OSREST} /v2.0/networks
-${postNet} {"network":{"name":"odl_network","admin_state_up":true}}
-
-*** Test Cases ***
-Check OpenStack Networks
- [Documentation] Checking OpenStack Neutron for known networks
- [Tags] Network Neutron OpenStack
- Log ${X-AUTH}
- ${resp} get OSSession ${OSREST}
- Should be Equal As Strings ${resp.status_code} 200
- ${OSResult} To Json ${resp.content}
- Set Suite Variable ${OSResult}
- Log ${OSResult}
-
-Check OpenDaylight Networks
- [Documentation] Checking OpenDaylight Neutron API for Known Networks
- [Tags] Network Neutron OpenDaylight
- Create Session ODLSession http://${CONTROLLER}:${PORT} headers=${HEADERS} auth=${AUTH}
- ${resp} get ODLSession ${ODLREST}
- Should be Equal As Strings ${resp.status_code} 200
- ${ODLResult} To Json ${resp.content}
- Set Suite Variable ${ODLResult}
- Log ${ODLResult}
-
-Create Network
- [Documentation] Create new network in OpenStack
- [Tags] Create Network OpenStack Neutron
- Log ${postNet}
- ${resp} post OSSession ${OSREST} data=${postNet}
- Should be Equal As Strings ${resp.status_code} 201
- ${result} To JSON ${resp.content}
- ${result} Get From Dictionary ${result} network
- ${NETID} Get From Dictionary ${result} id
- Log ${result}
- Log ${NETID}
- Set Global Variable ${NETID}
- sleep 2
-
-Check Network
- [Documentation] Check Network created in OpenDaylight
- [Tags] Check Network OpenDaylight
- ${resp} get ODLSession ${ODLREST}/${NetID}
- Should be Equal As Strings ${resp.status_code} 200
-
-
+++ /dev/null
-*** Settings ***
-Documentation Checking Subnets created in OpenStack are pushed to OpenDaylight
-Suite Setup Create Session OSSession http://${OPENSTACK}:9696 headers=${X-AUTH}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${ODLREST} /controller/nb/v2/neutron/subnets
-${OSREST} /v2.0/subnets
-${data} {"subnet":{"network_id":"${NETID}","ip_version":4,"cidr":"172.16.64.0/24","allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}]}}
-
-*** Test Cases ***
-Check OpenStack Subnets
- [Documentation] Checking OpenStack Neutron for known Subnets
- [Tags] Subnets Neutron OpenStack
- Log ${X-AUTH}
- ${resp} get OSSession ${OSREST}
- Should be Equal As Strings ${resp.status_code} 200
- ${OSResult} To Json ${resp.content}
- Set Suite Variable ${OSResult}
- Log ${OSResult}
-
-Check OpenDaylight subnets
- [Documentation] Checking OpenDaylight Neutron API for Known Subnets
- [Tags] Subnets Neutron OpenDaylight
- Create Session ODLSession http://${CONTROLLER}:${PORT} headers=${HEADERS} auth=${AUTH}
- ${resp} get ODLSession ${ODLREST}
- Should be Equal As Strings ${resp.status_code} 200
- ${ODLResult} To Json ${resp.content}
- Set Suite Variable ${ODLResult}
- Log ${ODLResult}
-
-Create New subnet
- [Documentation] Create new subnet in OpenStack
- [Tags] Create Subnet OpenStack Neutron
- Log ${data}
- ${resp} post OSSession ${OSREST} data=${data}
- Should be Equal As Strings ${resp.status_code} 201
- ${result} To JSON ${resp.content}
- ${result} Get From Dictionary ${result} subnet
- ${SUBNETID} Get From Dictionary ${result} id
- Log ${result}
- Log ${SUBNETID}
- Set Global Variable ${SUBNETID}
- sleep 2
-
-Check New subnet
- [Documentation] Check new subnet created in OpenDaylight
- [Tags] Check subnet OpenDaylight
- ${resp} get ODLSession ${ODLREST}/${SUBNETID}
- Should be Equal As Strings ${resp.status_code} 200
-
-
+++ /dev/null
-*** Settings ***
-Documentation Checking Port created in OpenStack are pushed to OpenDaylight
-Suite Setup Create Session OSSession http://${OPENSTACK}:9696 headers=${X-AUTH}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library OperatingSystem
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${ODLREST} /controller/nb/v2/neutron/ports
-${OSREST} /v2.0/ports
-${data} {"port":{"network_id":"${NETID}","admin_state_up": true}}
-
-*** Test Cases ***
-Check OpenStack ports
- [Documentation] Checking OpenStack Neutron for known ports
- [Tags] Ports Neutron OpenStack
- Log ${X-AUTH}
- ${resp} get OSSession ${OSREST}
- Should be Equal As Strings ${resp.status_code} 200
- ${OSResult} To Json ${resp.content}
- Set Suite Variable ${OSResult}
- Log ${OSResult}
-
-Check OpenDaylight ports
- [Documentation] Checking OpenDaylight Neutron API for Known Ports
- [Tags] Ports Neutron OpenDaylight
- Create Session ODLSession http://${CONTROLLER}:${PORT} headers=${HEADERS} auth=${AUTH}
- ${resp} get ODLSession ${ODLREST}
- Should be Equal As Strings ${resp.status_code} 200
- ${ODLResult} To Json ${resp.content}
- Set Suite Variable ${ODLResult}
- Log ${ODLResult}
-
-Create New Port
- [Documentation] Create new port in OpenStack
- [Tags] Create port OpenStack Neutron
- Log ${data}
- ${resp} post OSSession ${OSREST} data=${data}
- Should be Equal As Strings ${resp.status_code} 201
- ${result} To JSON ${resp.content}
- ${result} Get From Dictionary ${result} port
- ${PORTID} Get From Dictionary ${result} id
- Log ${result}
- Log ${PORTID}
- Set Global Variable ${PORTID}
- sleep 2
-
-Check New Port
- [Documentation] Check new subnet created in OpenDaylight
- [Tags] Check subnet OpenDaylight
- ${resp} get ODLSession ${ODLREST}/${PORTID}
- Should be Equal As Strings ${resp.status_code} 200
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Neutron Plugin
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${UserInfo}= {"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}
-
-** Keywords ***
-Start Suite
- Create Session KeyStoneSession http://${OPENSTACK}:5000 headers=${HEADERS}
- ${resp} post KeyStoneSession /v2.0/tokens ${UserInfo}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${result} Get From Dictionary ${result} access
- ${result} Get From Dictionary ${result} token
- ${TOKEN} Get From Dictionary ${result} id
- ${X-AUTH} Create Dictionary X-Auth-Token ${TOKEN} Content-Type application/json
- Set Global Variable ${X-AUTH}
-Stop Suite
- Delete All Sessions
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 10
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get list of nodes
- [Documentation] Get the inventory
- ${resp} Get session ${REST_CONTEXT}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1
- Should Contain ${resp.content} openflow:2
- Should Contain ${resp.content} openflow:3
-
-Get nodeconnector for a node 1
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1:1
- Should Contain ${resp.content} openflow:1:2
-
-Get nodeconnector for a node 2
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:2:1
- Should Contain ${resp.content} openflow:2:2
- Should Contain ${resp.content} openflow:2:3
-
-Get nodeconnector for a node 3
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:3:1
- Should Contain ${resp.content} openflow:3:2
- Should Contain ${resp.content} openflow:3:3
-
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF statistics
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get Stats for node 1
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} opendaylight-port-statistics
- Should Contain ${resp.content} opendaylight-flow-table-statistics
-
-Get Stats for node 2
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} opendaylight-port-statistics
- Should Contain ${resp.content} opendaylight-flow-table-statistics
-
-Get Stats for node 3
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} opendaylight-port-statistics
- Should Contain ${resp.content} opendaylight-flow-table-statistics
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF Topology
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${topology1} "flow:1"
-${node1} "openflow:1"
-${node2} "openflow:2"
-${node3} "openflow:3"
-${key} link
-${REST_CONTEXT_1} /restconf/operational/network-topology:network-topology
-${REST_CONTEXT_2} /restconf/operational/network-topology:network-topology/topology/flow:1
-${REST_CONTEXT_3} /restconf/config/network-topology:network-topology/topology/flow:1/link/userlink
-
-*** Test Cases ***
-Get RESTCONF Topology
- [Documentation] Get RESTCONF Topology and validate the result.
- [Tags] get
- ${resp} Get session ${REST_CONTEXT_1}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${topology1}
-
-List all the links
- [Documentation] List all the links in the topology.
- [Tags] get
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:2
- ${body2} Create Dictionary source-node=openflow:3 source-tp=openflow:3:3
- ${link2} Create Dictionary link-id=openflow:3:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:3
- ${link1} Create Dictionary link-id=openflow:2:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:2
- ${link4} Create Dictionary link-id=openflow:1:2 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:2 dest-tp=openflow:2:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:1
- ${link3} Create Dictionary link-id=openflow:1:1 destination=${body1} source=${body2}
- ${links} Create List ${link1} ${link2} ${link3} ${link4}
- ${resp} Get session ${REST_CONTEXT_2}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} topology
- ${topology} Get From List ${content} 0
- ${link} Get From Dictionary ${topology} link
- Sort List ${link}
- Lists Should be Equal ${link} ${links}
-
-Add a link
- [Documentation] Add a link, list to validate the result.
- [Tags] add
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:1
- ${body3} Create Dictionary link-id=userlink destination=${body1} source=${body2}
- ${links} Create List ${body3}
- ${body} Create Dictionary link=${links}
- ${resp} Put session ${REST_CONTEXT_3} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${link} Get From Dictionary ${result} link
- Lists Should be Equal ${link} ${links}
-
-
-Remove a link
- [Documentation] Remove a link, list to validate the result.
- [Tags] remove
- ${resp} Delete session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 404
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
-
-*** Test Cases ***
-
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/0/flow/152 data=${BODY2}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 152
-
-Verify after adding flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.20.1
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/0/flow/152
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 152
-
-# Standing bug #368 - This has been fixed
-Verify after deleting flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 40
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/0
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.20.1
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for MD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get list of nodes
- [Documentation] Get the inventory
- ${resp} Get session ${REST_CONTEXT}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1
- Should Contain ${resp.content} openflow:2
- Should Contain ${resp.content} openflow:3
-
-Get nodeconnector for a node 1
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:1:1
- Should Contain ${resp.content} openflow:1:2
-
-Get nodeconnector for a node 2
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:2:1
- Should Contain ${resp.content} openflow:2:2
- Should Contain ${resp.content} openflow:2:3
-
-Get nodeconnector for a node 3
- [Documentation] Get the inventory for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} openflow:3:1
- Should Contain ${resp.content} openflow:3:2
- Should Contain ${resp.content} openflow:3:3
-
-
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF statistics
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
-Get Stats for node 1
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:1
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} opendaylight-port-statistics
- Should Contain ${resp.content} opendaylight-flow-table-statistics
-
-Get Stats for node 2
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} opendaylight-port-statistics
- Should Contain ${resp.content} opendaylight-flow-table-statistics
-
-Get Stats for node 3
- [Documentation] Get the stats for a node
- ${resp} Get session ${REST_CONTEXT}/node/openflow:3
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} opendaylight-port-statistics
- Should Contain ${resp.content} opendaylight-flow-table-statistics
+++ /dev/null
-*** Settings ***
-Documentation Test suite RESTCONF Topology
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${topology1} "flow:1"
-${node1} "openflow:1"
-${node2} "openflow:2"
-${node3} "openflow:3"
-${key} link
-${REST_CONTEXT_1} /restconf/operational/network-topology:network-topology
-${REST_CONTEXT_2} /restconf/operational/network-topology:network-topology/topology/flow:1
-${REST_CONTEXT_3} /restconf/config/network-topology:network-topology/topology/flow:1/link/userlink
-
-*** Test Cases ***
-Get RESTCONF Topology
- [Documentation] Get RESTCONF Topology and validate the result.
- [Tags] get
- ${resp} Get session ${REST_CONTEXT_1}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${topology1}
-
-List all the links
- [Documentation] List all the links in the topology.
- [Tags] get
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:2
- ${body2} Create Dictionary source-node=openflow:3 source-tp=openflow:3:3
- ${link2} Create Dictionary link-id=openflow:3:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:1 dest-tp=openflow:1:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:3
- ${link1} Create Dictionary link-id=openflow:2:3 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:2
- ${link4} Create Dictionary link-id=openflow:1:2 destination=${body1} source=${body2}
- ${body1} Create Dictionary dest-node=openflow:2 dest-tp=openflow:2:3
- ${body2} Create Dictionary source-node=openflow:1 source-tp=openflow:1:1
- ${link3} Create Dictionary link-id=openflow:1:1 destination=${body1} source=${body2}
- ${links} Create List ${link1} ${link2} ${link3} ${link4}
- ${resp} Get session ${REST_CONTEXT_2}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} topology
- ${topology} Get From List ${content} 0
- ${link} Get From Dictionary ${topology} link
- Sort List ${link}
- Lists Should be Equal ${link} ${links}
-
-Add a link
- [Documentation] Add a link, list to validate the result.
- [Tags] add
- ${body1} Create Dictionary dest-node=openflow:3 dest-tp=openflow:3:1
- ${body2} Create Dictionary source-node=openflow:2 source-tp=openflow:2:1
- ${body3} Create Dictionary link-id=userlink destination=${body1} source=${body2}
- ${links} Create List ${body3}
- ${body} Create Dictionary link=${links}
- ${resp} Put session ${REST_CONTEXT_3} data=${body}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${link} Get From Dictionary ${result} link
- Lists Should be Equal ${link} ${links}
-
-
-Remove a link
- [Documentation] Remove a link, list to validate the result.
- [Tags] remove
- ${resp} Delete session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} Get session ${REST_CONTEXT_3}
- Should Be Equal As Strings ${resp.status_code} 404
+++ /dev/null
-*** Settings ***
-Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-
-${REST_CON} /restconf/config/opendaylight-inventory:nodes
-${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
-${BODY1} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
-${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
-
-*** Test Cases ***
-Add a flow - Sending IPv4 Dest Address and Eth type
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/139 data=${BODY1}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 139
-
-Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.10.1
-
-Remove a flow - - Sending IPv4 Dest Address and Eth type
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/139
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 139
-
-# Reason in using high time is, I used STOPWATCH to check the timer after deleting the flow config
-Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.10.1
-
-Add a flow - Output to physical port#
- [Documentation] Push a flow through REST-API
- [Tags] Push
- ${resp} Putxml session ${REST_CON}/node/openflow:1/table/2/flow/152 data=${BODY2}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after adding flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 152
-
-Verify after adding flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 30
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.20.1
-
-Remove a flow - Output to physical port#
- [Documentation] Remove a flow
- [Tags] remove
- ${resp} Delete session ${REST_CON}/node/openflow:1/table/2/flow/152
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting flow config - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- ${resp} Get session ${REST_CON}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 152
-
-Verify after deleting flow operational - Output to physical port#
- [Documentation] Verify the flow
- [Tags] Get
- Sleep 40
- ${resp} Get session ${REST_OPR}/node/openflow:1/table/2
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} 10.0.20.1
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for MD-SAL NSF mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Switch Manager
-Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} 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}/default/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}
-Check node 1 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s1-eth1
- Should Contain ${resp.content} s1-eth2
-Check node 2 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s2-eth1
- Should Contain ${resp.content} s2-eth2
- Should Contain ${resp.content} s2-eth3
-Check node 3 connectors
- [Documentation] List node connectors and verify all connectors are there
- [Tags] list_info
- ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} s3-eth1
- Should Contain ${resp.content} s3-eth2
- Should Contain ${resp.content} s3-eth3
-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 Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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 Be Equal As Strings ${resp.status_code} 200
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 5
- Should Contain X Times ${resp.content} ${node3} 5
-get flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- 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 Be Equal As Strings ${resp.status_code} 200
- 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}:${RESTPORT} 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} "00:00:00:00:00:00:00:01"
-${node2} "00:00:00:00:00:00:00:02"
-${node3} "00:00:00:00:00:00:00:03"
-${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
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${node1} 4
- Should Contain X Times ${resp.content} ${node2} 2
- Should Contain X Times ${resp.content} ${node3} 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
- 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 Flow Programmer
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.0.1"
-
-*** 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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${FLOW}
-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
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
- 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}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] get
- Sleep 10
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL NSF
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 10
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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 ***
-${REST_CONTEXT_VTNS} controller/nb/v2/vtn/default/vtns
-
-*** Test Cases ***
-Add a vtn Tenant1
- [Documentation] Add a vtn Tenant1
- [Tags] add
- Add a vtn Tenant1 {"description": "Virtual Tenant 1 for Hackfest network"}
-
-Add a vBridge vBridge1
- [Documentation] Add a vBridge vBridge1 in vtn Tenant1
- [Tags] add
- Add a vBridge Tenant1 vBridge1 {}
-
-Add a interface If1
- [Documentation] Add a interface if1 into vBrdige vBrdige1
- [Tags] add
- Add a interface Tenant1 vBridge1 if1 {}
-
-Add a interface if2
- [Documentation] Add a interface if2 into vBrdige vBrdige1
- [Tags] add
- Add a interface Tenant1 vBridge1 if2 {}
-
-Add a portmap for interface if1
- [Documentation] Create a portmap on Interface if1 of vBridge1
- [Tags] add
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:02
- ${port} Create Dictionary name s2-eth1
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge1 if1 ${portmap_data}
-
-Add a portmap for interface if2
- [Documentation] Create a portmap on Interface if2 of vBridge1
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:03
- ${port} Create Dictionary name s3-eth1
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge1 if2 ${portmap_data}
-
-Add a vBridge vBridge2
- [Documentation] Add a vBridge vBridge2 in vtn Tenant1
- [Tags] add
- Add a vBridge Tenant1 vBridge2 {}
-
-Add a interface If3
- [Documentation] Add a interface if3 into vBrdige vBrdige2
- [Tags] add
- Add a interface Tenant1 vBridge2 if3 {}
-
-Add a interface if4
- [Documentation] Add a interface if4 into vBrdige vBrdige2
- [Tags] add
- Add a interface Tenant1 vBridge2 if4 {}
-
-Add a portmap for interface if3
- [Documentation] Create a portmap on Interface if3 of vBridge2
- [Tags] add
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:02
- ${port} Create Dictionary name s2-eth2
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge2 if3 ${portmap_data}
-
-Add a portmap for interface if4
- [Documentation] Create a portmap on Interface if4 of vBridge2
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:03
- ${port} Create Dictionary name s3-eth2
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge2 if4 ${portmap_data}
-
-Ping h1 to h3
- [Documentation] Ping h1 to h3, verify no packet loss
- Sleep 5
- Write h1 ping -w 10 h3
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-
-Ping h2 to h4
- [Documentation] Ping h2 to h4, verify no packet loss
- Sleep 5
- Write h2 ping -w 10 h4
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-
-Delete a vtn Tenant1
- [Documentation] Delete a vtn Tenant1
- [Tags] delete
- Delete a vtn Tenant1
-
-*** Keywords ***
-Add a vtn
- [Arguments] ${vtn_name} ${vtn_data}
- [Documentation] Create a vtn with specified parameters.
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name} data=${vtn_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Delete a vtn
- [Arguments] ${vtn_name}
- [Documentation] Create a vtn with specified parameters.
- ${resp} Delete session ${REST_CONTEXT_VTNS}/${vtn_name}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Add a vBridge
- [Arguments] ${vtn_name} ${vBridge_name} ${vBridge_data}
- [Documentation] Create a vBridge in a VTN
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name} data=${vBridge_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Add a interface
- [Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${interface_data}
- [Documentation] Create a interface into a vBridge of a VTN
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name} data=${interface_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Add a portmap
- [Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${portmap_data}
- [Documentation] Create a portmap for a interface of a vbridge
- ${resp} Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${portmap_data}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test
-
-
-Add a Vtn Tenant1
- [Documentation] Create Vtn Tenant1
- [Tags] vtnc
- Add a VTN Tenant1 VTN_TEST
-
-
-Create VBR in VTN Tenant1
- [Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] vtnc
- Create VBR in VTN Tenant1 Vbridge1 odc_test
-
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1
-
-
-Create VBRIF in VBRIDGE Vbridge1 Interface2
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2
-
-
-Define Portmap for Interface1
- [Documentation] Map Interface1 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:00:00:00:00:00:00:00:03-s3-eth1
-
-
-Define Portmap for Interface2
- [Documentation] Map Interface2 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:00:00:00:00:00:00:00:02-s2-eth1
-
-
-Test Ping for Configuration1
- [Documentation] ping between hosts in mininet
- [Tags] vtnc
- Test Ping h1 h3
-
-
-Delete a VTN Tenant1
- [Documentation] Delete Vtn Tenant1
- [Tags] vtnc
- Delete a VTN Tenant1
-
-
-Delete a Controller odc1
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Check Controller Status
- [Arguments] ${ctrlname}
- [Documentation] Get controller status
- Sleep 15
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} up
-
-
-Add a VTN
- [Arguments] ${vtnname} ${vtndescription}
- [Documentation] Create VTN in Coordinator
- ${vtninfo} Create Dictionary vtn_name ${vtnname} description ${vtndescription}
- ${vtncreate} Create Dictionary vtn ${vtninfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Delete a VTN
- [Arguments] ${vtnname}
- [Documentation] Delete a VTN Created
- ${resp} Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Create VBR in VTN
- [Arguments] ${vtnname} ${vbrname} ${ctrlname}
- [Documentation] Create VBR for VTN in Coordinator
- ${vbrinfo} Create Dictionary vbr_name ${vbrname} controller_id ${ctrlname} domain_id (DEFAULT)
- ${vbrcreate} Create Dictionary vbridge ${vbrinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Create VBRIF in VBR
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${ifdescription}
- [Documentation] Create VBR Interface in VBR
- ${vbrifinfo} Create Dictionary if_name ${vbrifname} description ${ifdescription}
- ${vbrifcreate} Create Dictionary interface ${vbrifinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Define Portmap for VBRIF
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${logical_port_id}
- [Documentation] Map Interface to a logical port
- ${logical_port_info} Create Dictionary logical_port_id ${logical_port_id}
- ${portmapdefine} Create Dictionary portmap ${logical_port_info}
- ${resp} Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Test Ping
- [Arguments] ${host1} ${host2}
- [Documentation] Ping hosts to check connectivity
- Sleep 5
- Write ${host1} ping -w 10 ${host2}
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
+++ /dev/null
-
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller odc1
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 20
-
-Verify switch1
- [Documentation] Get switch1
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:01 30
-
-Verify switch2
- [Documentation] Get switch2
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:02 1
-
-Verify switch3
- [Documentation] Get switch3
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:03 1
-
-Verify switchPort switch1
- [Documentation] Get switchport/switch1
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:01 15
-
-Verify switchPort switch2
- [Documentation] Get switchport/switch2
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:02 1
-
-Verify switchPort switch3
- [Documentation] Get switchport/switch3
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:03 1
-
-Delete a Controller
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-Check Controller Status
- [Arguments] ${ctrlname} ${stat} ${sec}
- [Documentation] Get controller status
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} ${stat}
-
-Verify Switch
- [Arguments] ${ctrlname} ${switch_id} ${sec}
- [Documentation] Get switch
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
- ${contents} To JSON ${resp.content}
- ${switchblock} Get From Dictionary ${contents} switch
- ${status} Get From Dictionary ${switchblock} switch_id
- Should Be Equal As Strings ${status} ${switch_id}
-
-Verify SwitchPort
- [Arguments] ${ctrlname} ${switch_id} ${sec}
- [Documentation] Get switch
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 20
-
-Add a Vtn Tenant1
- [Documentation] Create Vtn Tenant1
- [Tags] vtnc
- Add a VTN Tenant1 VTN_TEST
-
-Create VBR in VTN Tenant1
- [Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] vtnc
- Create VBR in VTN Tenant1 Vbridge1 odc_test
-
-Update controller ip invalid
- [Documentation] Update Controller ip to invalid
- [Tags] vtnc
- Update Controller odc_test 10.0.0.1 invalid_IP
-
-Verify the Controller State is down
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test down 45
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1
-
-Create VBRIF in VBRIDGE Vbridge1 Interface2
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2
-
-Update controller ip valid
- [Documentation] Update Controller ip to valid
- [Tags] vtnc
- Update Controller odc_test ${CONTROLLER} valid_IP
-
-Verify the Controller State is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 45
-
-Define Portmap for Interface1
- [Documentation] Map Interface1 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:00:00:00:00:00:00:00:02-s2-eth1
-
-Define Portmap for Interface2
- [Documentation] Map Interface2 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:00:00:00:00:00:00:00:02-s2-eth2
-
-Test Ping for Configuration1
- [Documentation] ping between hosts in mininet
- [Tags] vtnc
- Test Ping h1 h2
-
-Delete a VTN Tenant1
- [Documentation] Delete Vtn Tenant1
- [Tags] vtnc
- Delete a VTN Tenant1
-
-Delete a Controller odc1
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Update Controller
- [Arguments] ${ctrlname} ${ctrlip} ${desc}
- [Documentation] Update controller
- ${controllerinfo} Create Dictionary description ${desc} ipaddr ${ctrlip} version 1.0 auditstatus enable
- ${controllerupdate} Create Dictionary controller ${controllerinfo}
- ${resp} Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json data=${controllerupdate}
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Check Controller Status
- [Arguments] ${ctrlname} ${stat} ${sec}
- [Documentation] Get controller status
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} ${stat}
-
-
-Add a VTN
- [Arguments] ${vtnname} ${vtndescription}
- [Documentation] Create VTN in Coordinator
- ${vtninfo} Create Dictionary vtn_name ${vtnname} description ${vtndescription}
- ${vtncreate} Create Dictionary vtn ${vtninfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Delete a VTN
- [Arguments] ${vtnname}
- [Documentation] Delete a VTN Created
- ${resp} Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Create VBR in VTN
- [Arguments] ${vtnname} ${vbrname} ${ctrlname}
- [Documentation] Create VBR for VTN in Coordinator
- ${vbrinfo} Create Dictionary vbr_name ${vbrname} controller_id ${ctrlname} domain_id (DEFAULT)
- ${vbrcreate} Create Dictionary vbridge ${vbrinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Create VBRIF in VBR
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${ifdescription}
- [Documentation] Create VBR Interface in VBR
- ${vbrifinfo} Create Dictionary if_name ${vbrifname} description ${ifdescription}
- ${vbrifcreate} Create Dictionary interface ${vbrifinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate}
- Should Be Equal As Strings ${resp.status_code} 202
-
-
-Define Portmap for VBRIF
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${logical_port_id}
- [Documentation] Map Interface to a logical port
- ${logical_port_info} Create Dictionary logical_port_id ${logical_port_id}
- ${portmapdefine} Create Dictionary portmap ${logical_port_info}
- ${resp} Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Test Ping
- [Arguments] ${host1} ${host2}
- [Documentation] Ping hosts to check connectivity
- Sleep 5
- Write ${host1} ping -w 10 ${host2}
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 10
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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 ***
-${REST_CONTEXT_VTNS} controller/nb/v2/vtn/default/vtns
-
-*** Test Cases ***
-Add a vtn Tenant1
- [Documentation] Add a vtn Tenant1
- [Tags] add
- Add a vtn Tenant1 {"description": "Virtual Tenant 1 for Hackfest network"}
-
-Add a vBridge vBridge1
- [Documentation] Add a vBridge vBridge1 in vtn Tenant1
- [Tags] add
- Add a vBridge Tenant1 vBridge1 {}
-
-Add a interface If1
- [Documentation] Add a interface if1 into vBrdige vBrdige1
- [Tags] add
- Add a interface Tenant1 vBridge1 if1 {}
-
-Add a interface if2
- [Documentation] Add a interface if2 into vBrdige vBrdige1
- [Tags] add
- Add a interface Tenant1 vBridge1 if2 {}
-
-Add a portmap for interface if1
- [Documentation] Create a portmap on Interface if1 of vBridge1
- [Tags] add
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:02
- ${port} Create Dictionary name s2-eth1
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge1 if1 ${portmap_data}
-
-Add a portmap for interface if2
- [Documentation] Create a portmap on Interface if2 of vBridge1
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:03
- ${port} Create Dictionary name s3-eth1
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge1 if2 ${portmap_data}
-
-Add a vBridge vBridge2
- [Documentation] Add a vBridge vBridge2 in vtn Tenant1
- [Tags] add
- Add a vBridge Tenant1 vBridge2 {}
-
-Add a interface If3
- [Documentation] Add a interface if3 into vBrdige vBrdige2
- [Tags] add
- Add a interface Tenant1 vBridge2 if3 {}
-
-Add a interface if4
- [Documentation] Add a interface if4 into vBrdige vBrdige2
- [Tags] add
- Add a interface Tenant1 vBridge2 if4 {}
-
-Add a portmap for interface if3
- [Documentation] Create a portmap on Interface if3 of vBridge2
- [Tags] add
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:02
- ${port} Create Dictionary name s2-eth2
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge2 if3 ${portmap_data}
-
-Add a portmap for interface if4
- [Documentation] Create a portmap on Interface if4 of vBridge2
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:03
- ${port} Create Dictionary name s3-eth2
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge2 if4 ${portmap_data}
-
-Ping h1 to h3
- [Documentation] Ping h1 to h3, verify no packet loss
- Sleep 5
- Write h1 ping -w 10 h3
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-
-Ping h2 to h4
- [Documentation] Ping h2 to h4, verify no packet loss
- Sleep 5
- Write h2 ping -w 10 h4
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-
-Delete a vtn Tenant1
- [Documentation] Delete a vtn Tenant1
- [Tags] delete
- Delete a vtn Tenant1
-
-*** Keywords ***
-Add a vtn
- [Arguments] ${vtn_name} ${vtn_data}
- [Documentation] Create a vtn with specified parameters.
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name} data=${vtn_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Delete a vtn
- [Arguments] ${vtn_name}
- [Documentation] Create a vtn with specified parameters.
- ${resp} Delete session ${REST_CONTEXT_VTNS}/${vtn_name}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Add a vBridge
- [Arguments] ${vtn_name} ${vBridge_name} ${vBridge_data}
- [Documentation] Create a vBridge in a VTN
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name} data=${vBridge_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Add a interface
- [Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${interface_data}
- [Documentation] Create a interface into a vBridge of a VTN
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name} data=${interface_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Add a portmap
- [Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${portmap_data}
- [Documentation] Create a portmap for a interface of a vbridge
- ${resp} Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${portmap_data}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test
-
-
-Add a Vtn Tenant1
- [Documentation] Create Vtn Tenant1
- [Tags] vtnc
- Add a VTN Tenant1 VTN_TEST
-
-
-Create VBR in VTN Tenant1
- [Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] vtnc
- Create VBR in VTN Tenant1 Vbridge1 odc_test
-
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1
-
-
-Create VBRIF in VBRIDGE Vbridge1 Interface2
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2
-
-
-Define Portmap for Interface1
- [Documentation] Map Interface1 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:00:00:00:00:00:00:00:03-s3-eth1
-
-
-Define Portmap for Interface2
- [Documentation] Map Interface2 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:00:00:00:00:00:00:00:02-s2-eth1
-
-
-Test Ping for Configuration1
- [Documentation] ping between hosts in mininet
- [Tags] vtnc
- Test Ping h1 h3
-
-
-Delete a VTN Tenant1
- [Documentation] Delete Vtn Tenant1
- [Tags] vtnc
- Delete a VTN Tenant1
-
-
-Delete a Controller odc1
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Check Controller Status
- [Arguments] ${ctrlname}
- [Documentation] Get controller status
- Sleep 15
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} up
-
-
-Add a VTN
- [Arguments] ${vtnname} ${vtndescription}
- [Documentation] Create VTN in Coordinator
- ${vtninfo} Create Dictionary vtn_name ${vtnname} description ${vtndescription}
- ${vtncreate} Create Dictionary vtn ${vtninfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Delete a VTN
- [Arguments] ${vtnname}
- [Documentation] Delete a VTN Created
- ${resp} Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Create VBR in VTN
- [Arguments] ${vtnname} ${vbrname} ${ctrlname}
- [Documentation] Create VBR for VTN in Coordinator
- ${vbrinfo} Create Dictionary vbr_name ${vbrname} controller_id ${ctrlname} domain_id (DEFAULT)
- ${vbrcreate} Create Dictionary vbridge ${vbrinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Create VBRIF in VBR
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${ifdescription}
- [Documentation] Create VBR Interface in VBR
- ${vbrifinfo} Create Dictionary if_name ${vbrifname} description ${ifdescription}
- ${vbrifcreate} Create Dictionary interface ${vbrifinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Define Portmap for VBRIF
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${logical_port_id}
- [Documentation] Map Interface to a logical port
- ${logical_port_info} Create Dictionary logical_port_id ${logical_port_id}
- ${portmapdefine} Create Dictionary portmap ${logical_port_info}
- ${resp} Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Test Ping
- [Arguments] ${host1} ${host2}
- [Documentation] Ping hosts to check connectivity
- Sleep 5
- Write ${host1} ping -w 10 ${host2}
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
+++ /dev/null
-
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller odc1
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 20
-
-Verify switch1
- [Documentation] Get switch1
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:01 30
-
-Verify switch2
- [Documentation] Get switch2
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:02 1
-
-Verify switch3
- [Documentation] Get switch3
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:03 1
-
-Verify switchPort switch1
- [Documentation] Get switchport/switch1
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:01 15
-
-Verify switchPort switch2
- [Documentation] Get switchport/switch2
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:02 1
-
-Verify switchPort switch3
- [Documentation] Get switchport/switch3
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:03 1
-
-Delete a Controller
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-Check Controller Status
- [Arguments] ${ctrlname} ${stat} ${sec}
- [Documentation] Get controller status
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} ${stat}
-
-Verify Switch
- [Arguments] ${ctrlname} ${switch_id} ${sec}
- [Documentation] Get switch
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
- ${contents} To JSON ${resp.content}
- ${switchblock} Get From Dictionary ${contents} switch
- ${status} Get From Dictionary ${switchblock} switch_id
- Should Be Equal As Strings ${status} ${switch_id}
-
-Verify SwitchPort
- [Arguments] ${ctrlname} ${switch_id} ${sec}
- [Documentation] Get switch
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 20
-
-Add a Vtn Tenant1
- [Documentation] Create Vtn Tenant1
- [Tags] vtnc
- Add a VTN Tenant1 VTN_TEST
-
-Create VBR in VTN Tenant1
- [Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] vtnc
- Create VBR in VTN Tenant1 Vbridge1 odc_test
-
-Update controller ip invalid
- [Documentation] Update Controller ip to invalid
- [Tags] vtnc
- Update Controller odc_test 10.0.0.1 invalid_IP
-
-Verify the Controller State is down
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test down 45
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1
-
-Create VBRIF in VBRIDGE Vbridge1 Interface2
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2
-
-Update controller ip valid
- [Documentation] Update Controller ip to valid
- [Tags] vtnc
- Update Controller odc_test ${CONTROLLER} valid_IP
-
-Verify the Controller State is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 45
-
-Define Portmap for Interface1
- [Documentation] Map Interface1 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:00:00:00:00:00:00:00:02-s2-eth1
-
-Define Portmap for Interface2
- [Documentation] Map Interface2 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:00:00:00:00:00:00:00:02-s2-eth2
-
-Test Ping for Configuration1
- [Documentation] ping between hosts in mininet
- [Tags] vtnc
- Test Ping h1 h2
-
-Delete a VTN Tenant1
- [Documentation] Delete Vtn Tenant1
- [Tags] vtnc
- Delete a VTN Tenant1
-
-Delete a Controller odc1
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Update Controller
- [Arguments] ${ctrlname} ${ctrlip} ${desc}
- [Documentation] Update controller
- ${controllerinfo} Create Dictionary description ${desc} ipaddr ${ctrlip} version 1.0 auditstatus enable
- ${controllerupdate} Create Dictionary controller ${controllerinfo}
- ${resp} Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json data=${controllerupdate}
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Check Controller Status
- [Arguments] ${ctrlname} ${stat} ${sec}
- [Documentation] Get controller status
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} ${stat}
-
-
-Add a VTN
- [Arguments] ${vtnname} ${vtndescription}
- [Documentation] Create VTN in Coordinator
- ${vtninfo} Create Dictionary vtn_name ${vtnname} description ${vtndescription}
- ${vtncreate} Create Dictionary vtn ${vtninfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Delete a VTN
- [Arguments] ${vtnname}
- [Documentation] Delete a VTN Created
- ${resp} Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Create VBR in VTN
- [Arguments] ${vtnname} ${vbrname} ${ctrlname}
- [Documentation] Create VBR for VTN in Coordinator
- ${vbrinfo} Create Dictionary vbr_name ${vbrname} controller_id ${ctrlname} domain_id (DEFAULT)
- ${vbrcreate} Create Dictionary vbridge ${vbrinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Create VBRIF in VBR
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${ifdescription}
- [Documentation] Create VBR Interface in VBR
- ${vbrifinfo} Create Dictionary if_name ${vbrifname} description ${ifdescription}
- ${vbrifcreate} Create Dictionary interface ${vbrifinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Define Portmap for VBRIF
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${logical_port_id}
- [Documentation] Map Interface to a logical port
- ${logical_port_info} Create Dictionary logical_port_id ${logical_port_id}
- ${portmapdefine} Create Dictionary portmap ${logical_port_info}
- ${resp} Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Test Ping
- [Arguments] ${host1} ${host2}
- [Documentation] Ping hosts to check connectivity
- Sleep 5
- Write ${host1} ping -w 10 ${host2}
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN
-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 mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} 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 ***
-${REST_CONTEXT_VTNS} controller/nb/v2/vtn/default/vtns
-
-*** Test Cases ***
-Add a vtn Tenant1
- [Documentation] Add a vtn Tenant1
- [Tags] add
- Add a vtn Tenant1 {"description": "Virtual Tenant 1 for Hackfest network"}
-
-Add a vBridge vBridge1
- [Documentation] Add a vBridge vBridge1 in vtn Tenant1
- [Tags] add
- Add a vBridge Tenant1 vBridge1 {}
-
-Add a interface If1
- [Documentation] Add a interface if1 into vBrdige vBrdige1
- [Tags] add
- Add a interface Tenant1 vBridge1 if1 {}
-
-Add a interface if2
- [Documentation] Add a interface if2 into vBrdige vBrdige1
- [Tags] add
- Add a interface Tenant1 vBridge1 if2 {}
-
-Add a portmap for interface if1
- [Documentation] Create a portmap on Interface if1 of vBridge1
- [Tags] add
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:02
- ${port} Create Dictionary name s2-eth1
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge1 if1 ${portmap_data}
-
-Add a portmap for interface if2
- [Documentation] Create a portmap on Interface if2 of vBridge1
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:03
- ${port} Create Dictionary name s3-eth1
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge1 if2 ${portmap_data}
-
-Add a vBridge vBridge2
- [Documentation] Add a vBridge vBridge2 in vtn Tenant1
- [Tags] add
- Add a vBridge Tenant1 vBridge2 {}
-
-Add a interface If3
- [Documentation] Add a interface if3 into vBrdige vBrdige2
- [Tags] add
- Add a interface Tenant1 vBridge2 if3 {}
-
-Add a interface if4
- [Documentation] Add a interface if4 into vBrdige vBrdige2
- [Tags] add
- Add a interface Tenant1 vBridge2 if4 {}
-
-Add a portmap for interface if3
- [Documentation] Create a portmap on Interface if3 of vBridge2
- [Tags] add
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:02
- ${port} Create Dictionary name s2-eth2
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge2 if3 ${portmap_data}
-
-Add a portmap for interface if4
- [Documentation] Create a portmap on Interface if4 of vBridge2
- ${node} Create Dictionary type OF id 00:00:00:00:00:00:00:03
- ${port} Create Dictionary name s3-eth2
- ${portmap_data} Create Dictionary node ${node} port ${port}
- Add a portmap Tenant1 vBridge2 if4 ${portmap_data}
-
-Ping h1 to h3
- [Documentation] Ping h1 to h3, verify no packet loss
- Sleep 5
- Write h1 ping -w 10 h3
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-
-Ping h2 to h4
- [Documentation] Ping h2 to h4, verify no packet loss
- Sleep 5
- Write h2 ping -w 10 h4
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
-
-Delete a vtn Tenant1
- [Documentation] Delete a vtn Tenant1
- [Tags] delete
- Delete a vtn Tenant1
-
-*** Keywords ***
-Add a vtn
- [Arguments] ${vtn_name} ${vtn_data}
- [Documentation] Create a vtn with specified parameters.
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name} data=${vtn_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Delete a vtn
- [Arguments] ${vtn_name}
- [Documentation] Create a vtn with specified parameters.
- ${resp} Delete session ${REST_CONTEXT_VTNS}/${vtn_name}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Add a vBridge
- [Arguments] ${vtn_name} ${vBridge_name} ${vBridge_data}
- [Documentation] Create a vBridge in a VTN
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name} data=${vBridge_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Add a interface
- [Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${interface_data}
- [Documentation] Create a interface into a vBridge of a VTN
- ${resp} Post session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name} data=${interface_data}
- Should Be Equal As Strings ${resp.status_code} 201
-
-Add a portmap
- [Arguments] ${vtn_name} ${vBridge_name} ${interface_name} ${portmap_data}
- [Documentation] Create a portmap for a interface of a vbridge
- ${resp} Put session ${REST_CONTEXT_VTNS}/${vtn_name}/vbridges/${vBridge_name}/interfaces/${interface_name}/portmap data=${portmap_data}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test
-
-
-Add a Vtn Tenant1
- [Documentation] Create Vtn Tenant1
- [Tags] vtnc
- Add a VTN Tenant1 VTN_TEST
-
-
-Create VBR in VTN Tenant1
- [Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] vtnc
- Create VBR in VTN Tenant1 Vbridge1 odc_test
-
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1
-
-
-Create VBRIF in VBRIDGE Vbridge1 Interface2
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2
-
-
-Define Portmap for Interface1
- [Documentation] Map Interface1 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:00:00:00:00:00:00:00:03-s3-eth1
-
-
-Define Portmap for Interface2
- [Documentation] Map Interface2 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:00:00:00:00:00:00:00:02-s2-eth1
-
-
-Test Ping for Configuration1
- [Documentation] ping between hosts in mininet
- [Tags] vtnc
- Test Ping h1 h3
-
-
-Delete a VTN Tenant1
- [Documentation] Delete Vtn Tenant1
- [Tags] vtnc
- Delete a VTN Tenant1
-
-
-Delete a Controller odc1
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Check Controller Status
- [Arguments] ${ctrlname}
- [Documentation] Get controller status
- Sleep 15
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} up
-
-
-Add a VTN
- [Arguments] ${vtnname} ${vtndescription}
- [Documentation] Create VTN in Coordinator
- ${vtninfo} Create Dictionary vtn_name ${vtnname} description ${vtndescription}
- ${vtncreate} Create Dictionary vtn ${vtninfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Delete a VTN
- [Arguments] ${vtnname}
- [Documentation] Delete a VTN Created
- ${resp} Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Create VBR in VTN
- [Arguments] ${vtnname} ${vbrname} ${ctrlname}
- [Documentation] Create VBR for VTN in Coordinator
- ${vbrinfo} Create Dictionary vbr_name ${vbrname} controller_id ${ctrlname} domain_id (DEFAULT)
- ${vbrcreate} Create Dictionary vbridge ${vbrinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Create VBRIF in VBR
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${ifdescription}
- [Documentation] Create VBR Interface in VBR
- ${vbrifinfo} Create Dictionary if_name ${vbrifname} description ${ifdescription}
- ${vbrifcreate} Create Dictionary interface ${vbrifinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Define Portmap for VBRIF
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${logical_port_id}
- [Documentation] Map Interface to a logical port
- ${logical_port_info} Create Dictionary logical_port_id ${logical_port_id}
- ${portmapdefine} Create Dictionary portmap ${logical_port_info}
- ${resp} Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Test Ping
- [Arguments] ${host1} ${host2}
- [Documentation] Ping hosts to check connectivity
- Sleep 5
- Write ${host1} ping -w 10 ${host2}
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
+++ /dev/null
-
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller odc1
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 20
-
-Verify switch1
- [Documentation] Get switch1
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:01 30
-
-Verify switch2
- [Documentation] Get switch2
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:02 1
-
-Verify switch3
- [Documentation] Get switch3
- [Tags] vtnc
- Verify Switch odc_test 00:00:00:00:00:00:00:03 1
-
-Verify switchPort switch1
- [Documentation] Get switchport/switch1
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:01 15
-
-Verify switchPort switch2
- [Documentation] Get switchport/switch2
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:02 1
-
-Verify switchPort switch3
- [Documentation] Get switchport/switch3
- [Tags] vtnc
- Verify SwitchPort odc_test 00:00:00:00:00:00:00:03 1
-
-Delete a Controller
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-Check Controller Status
- [Arguments] ${ctrlname} ${stat} ${sec}
- [Documentation] Get controller status
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} ${stat}
-
-Verify Switch
- [Arguments] ${ctrlname} ${switch_id} ${sec}
- [Documentation] Get switch
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
- ${contents} To JSON ${resp.content}
- ${switchblock} Get From Dictionary ${contents} switch
- ${status} Get From Dictionary ${switchblock} switch_id
- Should Be Equal As Strings ${status} ${switch_id}
-
-Verify SwitchPort
- [Arguments] ${ctrlname} ${switch_id} ${sec}
- [Documentation] Get switch
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN Coordinator
-Suite Setup Create Session session http://${VTNC}:8083 headers=${VTNC_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
-
-
-*** Test Cases ***
-Add a ODL Controller
- [Documentation] Add a Controller
- [Tags] vtnc
- Add a Controller odc_test ${CONTROLLER}
-
-Verify the Controller Status is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 20
-
-Add a Vtn Tenant1
- [Documentation] Create Vtn Tenant1
- [Tags] vtnc
- Add a VTN Tenant1 VTN_TEST
-
-Create VBR in VTN Tenant1
- [Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] vtnc
- Create VBR in VTN Tenant1 Vbridge1 odc_test
-
-Update controller ip invalid
- [Documentation] Update Controller ip to invalid
- [Tags] vtnc
- Update Controller odc_test 10.0.0.1 invalid_IP
-
-Verify the Controller State is down
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test down 45
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1
-
-Create VBRIF in VBRIDGE Vbridge1 Interface2
- [Documentation] Create an interface to Vbridge1
- [Tags] vtnc
- Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2
-
-Update controller ip valid
- [Documentation] Update Controller ip to valid
- [Tags] vtnc
- Update Controller odc_test ${CONTROLLER} valid_IP
-
-Verify the Controller State is up
- [Documentation] Check Controller status
- [Tags] vtnc
- Check Controller Status odc_test up 45
-
-Define Portmap for Interface1
- [Documentation] Map Interface1 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:00:00:00:00:00:00:00:02-s2-eth1
-
-Define Portmap for Interface2
- [Documentation] Map Interface2 to a logical port
- [Tags] vtnc
- Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:00:00:00:00:00:00:00:02-s2-eth2
-
-Test Ping for Configuration1
- [Documentation] ping between hosts in mininet
- [Tags] vtnc
- Test Ping h1 h2
-
-Delete a VTN Tenant1
- [Documentation] Delete Vtn Tenant1
- [Tags] vtnc
- Delete a VTN Tenant1
-
-Delete a Controller odc1
- [Documentation] Delete Controller odc1
- [Tags] vtnc
- Remove Controller odc_test
-
-
-*** Keywords ***
-Add a Controller
- [Arguments] ${ctrlname} ${ctrlip}
- [Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id ${ctrlname} type odc ipaddr ${CONTROLLER} version 1.0 auditstatus enable
- ${controllercreate} Create Dictionary controller ${controllerinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Remove Controller
- [Arguments] ${ctrlname}
- [Documentation] Delete a Controller
- ${resp} Delete session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Update Controller
- [Arguments] ${ctrlname} ${ctrlip} ${desc}
- [Documentation] Update controller
- ${controllerinfo} Create Dictionary description ${desc} ipaddr ${ctrlip} version 1.0 auditstatus enable
- ${controllerupdate} Create Dictionary controller ${controllerinfo}
- ${resp} Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json data=${controllerupdate}
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Check Controller Status
- [Arguments] ${ctrlname} ${stat} ${sec}
- [Documentation] Get controller status
- Sleep ${sec}
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
- ${contents} To JSON ${resp.content}
- ${controllerblock} Get From Dictionary ${contents} controller
- ${status} Get From Dictionary ${controllerblock} operstatus
- Should Be Equal As Strings ${status} ${stat}
-
-
-Add a VTN
- [Arguments] ${vtnname} ${vtndescription}
- [Documentation] Create VTN in Coordinator
- ${vtninfo} Create Dictionary vtn_name ${vtnname} description ${vtndescription}
- ${vtncreate} Create Dictionary vtn ${vtninfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS_CREATE} data=${vtncreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Delete a VTN
- [Arguments] ${vtnname}
- [Documentation] Delete a VTN Created
- ${resp} Delete session ${VTNWEBAPI}/${VTNS}/${vtnname}.json
- Should Be Equal As Strings ${resp.status_code} 204
-
-
-Create VBR in VTN
- [Arguments] ${vtnname} ${vbrname} ${ctrlname}
- [Documentation] Create VBR for VTN in Coordinator
- ${vbrinfo} Create Dictionary vbr_name ${vbrname} controller_id ${ctrlname} domain_id (DEFAULT)
- ${vbrcreate} Create Dictionary vbridge ${vbrinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE} data=${vbrcreate}
- Should Be Equal As Strings ${resp.status_code} 201
-
-
-Create VBRIF in VBR
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${ifdescription}
- [Documentation] Create VBR Interface in VBR
- ${vbrifinfo} Create Dictionary if_name ${vbrifname} description ${ifdescription}
- ${vbrifcreate} Create Dictionary interface ${vbrifinfo}
- ${resp} PostJson session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate}
- Should Be Equal As Strings ${resp.status_code} 202
-
-
-Define Portmap for VBRIF
- [Arguments] ${vtnname} ${vbrname} ${vbrifname} ${logical_port_id}
- [Documentation] Map Interface to a logical port
- ${logical_port_info} Create Dictionary logical_port_id ${logical_port_id}
- ${portmapdefine} Create Dictionary portmap ${logical_port_info}
- ${resp} Put session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE} data=${portmapdefine}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Test Ping
- [Arguments] ${host1} ${host2}
- [Documentation] Ping hosts to check connectivity
- Sleep 5
- Write ${host1} ping -w 10 ${host2}
- Sleep 10
- ${result} Read
- Should Contain ${result} 64 bytes
+++ /dev/null
-*** Settings ***
-Documentation Test suite for VTN
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-*** Keywords ***
-Start Suite
- Log Start mininet
- Open Connection ${MININET} prompt=>
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Sleep 2
- Write ${start}
- Sleep 30
- Read
-Stop Suite
- Log Stop mininet
- Read
- Write exit
- Sleep 6
- Read
- Close Connection