--- /dev/null
+*** Settings ***
+Library SSHLibrary
+
+*** Variables ***
+${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,1 --switch ovsk,protocols=OpenFlow13
+
+*** Keywords ***
+Start Suite
+ [Documentation] Basic setup/cleanup work that can be done safely before any system
+ ... is run.
+ Log Start the test on the base edition
+ Open Connection ${MININET} prompt=> timeout=30s
+ 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
+ [Documentation] Cleanup/Shutdown work that should be done at the completion of all
+ ... tests
+ Log Stop the test on the base edition
+ Read
+ Write exit
+ Read Until >
+ Close Connection
+
+Ensure All Nodes Are In Response
+ [Arguments] ${URI} ${node_list}
+ [Documentation] A GET is made to the supplied ${URI} and every item in the ${node_list}
+ ... is verified to exist in the repsonse. This keyword currently implies that it's node
+ ... specific but any list of strings can be given in ${node_list}. Refactoring of this
+ ... to make it more generic should be done. (see keyword "Check For Elements At URI")
+ : FOR ${node} IN @{node_list}
+ \ ${resp} Get session ${URI}
+ \ Should Be Equal As Strings ${resp.status_code} 200
+ \ Should Contain ${resp.content} ${node}
+
+Check Nodes Stats
+ [Arguments] ${node}
+ [Documentation] A GET on the /node/${node} API is made and specific flow stat
+ ... strings are checked for existence.
+ ${resp} Get session ${REST_CONTEXT}/node/${node}
+ 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
+
+Check That Port Count Is Ok
+ [Arguments] ${node} ${count}
+ [Documentation] A GET on the /port API is made and the specified port ${count} is
+ ... verified. A more generic Keyword "Check For Specific Number Of Elements At URI"
+ ... also does this work and further consolidation should be done.
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain X Times ${resp.content} ${node} ${count}
+
+Check For Specific Number Of Elements At URI
+ [Arguments] ${uri} ${element} ${expected_count}
+ [Documentation] A GET is made to the specified ${URI} and the specific count of a
+ ... given element is done (as supplied by ${element} and ${expected_count})
+ ${resp} Get session ${uri}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain X Times ${resp.content} ${element} ${expected_count}
+
+Check For Elements At URI
+ [Arguments] ${uri} ${elements}
+ [Documentation] A GET is made at the supplied ${URI} and every item in the list of
+ ... ${elements} is verified to exist in the response
+ ${resp} Get session ${uri}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ : FOR ${i} IN @{elements}
+ \ Should Contain ${resp.content} ${i}
+
+Check For Elements Not At URI
+ [Arguments] ${uri} ${elements}
+ [Documentation] A GET is made at the supplied ${URI} and every item in the list of
+ ... ${elements} is verified to NOT exist in the response
+ ${resp} Get session ${uri}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ : FOR ${i} IN @{elements}
+ \ Should Not Contain ${resp.content} ${i}
*** Settings ***
Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
+@{node_list} openflow:1 openflow:2 openflow:3
-*** Test Cases ***
+*** 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
-
+ Log ${start}
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response ${REST_CONTEXT} ${node_list}
+
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
+ ${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
+ ${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
-
-
-
+ ${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
*** Settings ***
Documentation Test suite for RESTCONF statistics
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
+@{node_list} openflow:1 openflow:2 openflow:3
-*** Test Cases ***
+*** 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
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response ${REST_CONTEXT} ${node_list}
+ Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:1
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
+ Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:2
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
+ Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:3
*** Settings ***
-Documentation Test suite for RESTCONF Topology
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
-${topology1} "flow:1"
-${node1} "openflow:1"
-${node2} "openflow:2"
-${node3} "openflow:3"
-${key} link
+${topology1} "flow:1"
+${node1} "openflow:1"
+${node2} "openflow:2"
+${node3} "openflow:3"
+@{node_list} openflow:1 openflow:2 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
Get RESTCONF Topology
[Documentation] Get RESTCONF Topology and validate the result.
[Tags] get
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response ${REST_CONTEXT_1} ${node_list}
${resp} Get session ${REST_CONTEXT_1}
- Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
- Should Contain ${resp.content} ${topology1}
-
+ 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}
+ ${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}
+ ${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}
+ ${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}
+ ${link3} Create Dictionary link-id=openflow:1:1 destination=${body1} source=${body2}
+ ${links} Create List ${link1} ${link2} ${link3} ${link4}
+ Wait Until Keyword Succeeds 30s 2s Verify Links ${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}
+ ${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}
+ ${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
${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}
+ ${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
+
+*** Keywords ***
+Verify Links
+ [Arguments] ${expected_links}
+ ${resp} Get session ${REST_CONTEXT_2}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ Log ${result}
+ ${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} ${expected_links}
*** Settings ***
Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+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
+Resource ../../../libraries/Utils.txt
*** 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>
-${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 ***
-
+*** 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}
+ [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
-
+ [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
+ [Tags] Get
+ ${elements}= Create List 10.0.20.1
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_OPR}/node/openflow:1/table/0 ${elements}
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
+ ${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
+ [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
+ Should Not Contain ${resp.content} 152
+ # Standing bug #368 - This has been fixed
-# 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
-
+ [Tags] Get
+ ${elements}= Create List 10.0.20.1
+ Wait Until Keyword Succeeds 40s 2s Check For Elements Not At URI ${REST_OPR}/node/openflow:1/table/0 ${elements}
Documentation Test suite for MD-SAL NSF
Suite Setup Start Suite
Suite Teardown Stop Suite
-Library SSHLibrary
+Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
+${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2
*** Settings ***
Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
+@{node_list} openflow:1 openflow:2 openflow:3
-*** Test Cases ***
+*** 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
-
+ ${resp} Get session ${REST_CONTEXT}
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response ${REST_CONTEXT} ${node_list}
+
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
+ ${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
+ ${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
-
-
-
+ ${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
*** Settings ***
Documentation Test suite for RESTCONF statistics
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
+@{node_list} openflow:1 openflow:2 openflow:3
-*** Test Cases ***
+*** 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
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response ${REST_CONTEXT} ${node_list}
+ Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:1
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
+ Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:2
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
+ Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:3
*** Settings ***
-Documentation Test suite RESTCONF Topology
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
-${topology1} "flow:1"
-${node1} "openflow:1"
-${node2} "openflow:2"
-${node3} "openflow:3"
-${key} link
+${topology1} "flow:1"
+${node1} "openflow:1"
+${node2} "openflow:2"
+${node3} "openflow:3"
+@{node_list} openflow:1 openflow:2 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
Get RESTCONF Topology
[Documentation] Get RESTCONF Topology and validate the result.
[Tags] get
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response ${REST_CONTEXT_1} ${node_list}
${resp} Get session ${REST_CONTEXT_1}
- Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
- Should Contain ${resp.content} ${topology1}
-
+ Should Be Equal As Strings ${resp.status_code} 200
+ 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}
+ ${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}
+ ${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}
+ ${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}
+ ${link3} Create Dictionary link-id=openflow:1:1 destination=${body1} source=${body2}
+ ${links} Create List ${link1} ${link2} ${link3} ${link4}
+ Wait Until Keyword Succeeds 30s 2s Verify Links ${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}
+ ${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}
+ ${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
${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}
+ ${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
+
+*** Keywords ***
+Verify Links
+ [Arguments] ${expected_links}
+ ${resp} Get session ${REST_CONTEXT_2}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${result} To JSON ${resp.content}
+ Log ${result}
+ ${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} ${expected_links}
*** Settings ***
Documentation Test suite for RESTCONF FRM
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+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
+Resource ../../../libraries/Utils.txt
*** 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>
-${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 ***
+*** 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}
+ [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
+ [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
+ [Tags] Get
+ ${elements}= Create List 10.0.10.1
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_OPR}/node/openflow:1/table/2 ${elements}
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
+ ${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
+ [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
-# 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
-
+ [Tags] Get
+ ${elements}= Create List 10.0.10.1
+ Wait Until Keyword Succeeds 40s 2s Check For Elements Not At URI ${REST_OPR}/node/openflow:1/table/2 ${elements}
+
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}
+ [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
-
+ [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
+ [Tags] Get
+ ${elements}= Create List 10.0.20.1
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_OPR}/node/openflow:1/table/2 ${elements}
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
+ ${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
+ [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
-
+ [Tags] Get
+ ${elements}= Create List 10.0.20.1
+ Wait Until Keyword Succeeds 40s 2s Check For Elements Not At URI ${REST_OPR}/node/openflow:1/table/2 ${elements}
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
*** Settings ***
Documentation Test suite for Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** 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
+${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"
+@{macaddr_list} ${node1} ${node2} ${node3}
+@{node_list} openflow:1 openflow:2 openflow:3
+${key} portStatistics
${REST_CONTEXT} /controller/nb/v2/statistics
*** Test Cases ***
get port stats
[Documentation] Show port stats and validate result
[Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
- Should 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
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response /restconf/operational/opendaylight-inventory:nodes ${node_list}
+ Wait Until Keyword Succeeds 10s 2s Check That Port Count Is Ok ${node1} 4
+ Wait Until Keyword Succeeds 10s 1s Check That Port Count Is Ok ${node2} 5
+ Wait Until Keyword Succeeds 10s 1s Check That Port Count Is Ok ${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}
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/flow ${macaddr_list}
+
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}
-
-
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/table ${macaddr_list}
*** Settings ***
Documentation Test suite for Topology Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** 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"
+${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
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
+ Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${REST_CONTEXT}/${CONTAINER} ${node1} 4
+ Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${REST_CONTEXT}/${CONTAINER} ${node1} 4
+ Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${REST_CONTEXT}/${CONTAINER} ${node1} 4
+
Add a userlink
[Documentation] Add a userlink, list to validate the result.
[Tags] add
${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
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
*** Settings ***
Documentation Test suite for Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** 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
+${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"
+@{macaddr_list} ${node1} ${node2} ${node3}
+@{node_list} openflow:1 openflow:2 openflow:3
+${key} portStatistics
${REST_CONTEXT} /controller/nb/v2/statistics
*** Test Cases ***
get port stats
[Documentation] Show port stats and validate result
[Tags] get
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
- Should 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
+ Wait Until Keyword Succeeds 30s 2s Ensure All Nodes Are In Response /restconf/operational/opendaylight-inventory:nodes ${node_list}
+ Wait Until Keyword Succeeds 10s 2s Check That Port Count Is Ok ${node1} 4
+ Wait Until Keyword Succeeds 10s 1s Check That Port Count Is Ok ${node2} 5
+ Wait Until Keyword Succeeds 10s 1s Check That Port Count Is Ok ${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}
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/flow ${macaddr_list}
+
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}
-
-
+ Wait Until Keyword Succeeds 30s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/table ${macaddr_list}
*** Settings ***
Documentation Test suite for Topology Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** 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"
+${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
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
+ Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${REST_CONTEXT}/${CONTAINER} ${node1} 4
+ Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${REST_CONTEXT}/${CONTAINER} ${node1} 4
+ Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${REST_CONTEXT}/${CONTAINER} ${node1} 4
+
Add a userlink
[Documentation] Add a userlink, list to validate the result.
[Tags] add
${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
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
+
*** 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
*** Settings ***
-Documentation Test suite for the OpenDaylight base edition with of10
+Documentation Flow test suite for the OpenDaylight karaf-compatible feature set
Suite Setup Start Suite
Suite Teardown Stop Suite
-Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
*** 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
-
+Library OperatingSystem
+Library Collections
+Library XML
+Library ../../../libraries/XmlComparator.py
+Variables ../../../variables/Variables.py
+Library ../../../libraries/RequestsLibrary.py
+Library ../../../libraries/Common.py
*** 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
-
+${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
+ [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
+
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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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}
+ 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
+ [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
+
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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+ [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}
+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}
+ Wait Until Keyword Succeeds 40s 2s Check Config Flow Presence ${expected}
+
+Check Config Flow Presence
+ [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}
+ ${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}
+ Wait Until Keyword Succeeds 40s 2s Check Operational Table Presence ${expected}
+
+Check Operational Table Presence
+ [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}
+ 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}
+ ${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
+ [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}
+ [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}
+ [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}
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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
-
*** Settings ***
Documentation Test suite for RESTCONF inventory
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
Suite Teardown Delete All Sessions
Library Collections
Library ../../../libraries/RequestsLibrary.py
*** Variables ***
${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes
-
-*** Test Cases ***
+*** Test Cases ***
Get list of nodes
[Documentation] Get the inventory
- ${resp} Get session ${REST_CONTEXT}
+ ${resp} Get session ${REST_CONTEXT}
+ Log ${resp.content}
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}
+ ${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}
+ \ Wait Until Keyword Succeeds 30s 2s Should Contain ${resp.content} openflow:${IND}
-Get nodeconnector for the root node
+Get nodeconnector for the root node
[Documentation] Get the inventory for the root node
- ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
+ ${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}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.content}
-Get nodeconnector for a node
+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}
+ ${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}
+ Wait Until Keyword Succeeds 30s 2s Check Every Nodes Nodeconnector ${numnodes}
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
+ ${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}
+ Wait Until Keyword Succeeds 60s 2s Check Every Nodes Stats ${numnodes}
*** Keywords ***
+Check Every Nodes Stats
+ [Arguments] ${numnodes}
+ : FOR ${IND} IN RANGE 1 ${numnodes+1}
+ \ ${resp} Get session ${REST_CONTEXT}/node/openflow:${IND}
+ \ Log ${resp.content}
+ \ 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
+
+Check Every Nodes Nodeconnector
+ [Arguments] ${numnodes}
+ : FOR ${IND} IN RANGE 2 ${numnodes+1}
+ \ ${resp} Get session ${REST_CONTEXT}/node/openflow:${IND}
+ \ Log ${resp.content}
+ \ Should Be Equal As Strings ${resp.status_code} 200
+ \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+
Check conn loop
- [Arguments] ${arg} ${outerind} ${content}
- :FOR ${var} IN RANGE 1 ${arg+1}
- \ Should Contain ${content} openflow:${outerind}:${var}
+ [Arguments] ${arg} ${outerind} ${content}
+ : FOR ${var} IN RANGE 1 ${arg+1}
+ \ Should Contain ${content} openflow:${outerind}:${var}
*** Settings ***
Documentation Test suite for RESTCONF topology
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
Suite Teardown Delete All Sessions
Library Collections
Library XML
*** Variables ***
${REST_CONTEXT} /restconf/operational/network-topology:network-topology/topology/flow:1
-
-*** Test Cases ***
+*** Test Cases ***
Get Nodes Count
[Documentation] Checks the number of switches
- ${resp} Get session ${REST_CONTEXT} headers=${ACCEPT_XML}
- 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}
- ${count}= Get Element Count ${resp.content} xpath=node
- Should Be Equal As Numbers ${count} ${numnodes}
+ ${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}
+ Wait Until Keyword Succeeds 60s 2s Verify Element Count ${REST_CONTEXT} node ${numnodes}
+
Get Links Count
[Documentation] Checks the number of links
- ${resp} Get session ${REST_CONTEXT} headers=${ACCEPT_XML}
- 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}
- ${numlinks} Evaluate (${numnodes}-1)*2
- ${count}= Get Element Count ${resp.content} xpath=link
- Should Be Equal As Numbers ${count} ${numlinks}
+ ${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}
+ ${numlinks} Evaluate (${numnodes}-1)*2
+ Wait Until Keyword Succeeds 60s 2s Verify Element Count ${REST_CONTEXT} link ${numlinks}
+
+*** Keywords ***
+Verify Element Count
+ [Arguments] ${URI} ${xpath_location} ${expected_count}
+ ${resp} Get session ${REST_CONTEXT} headers=${ACCEPT_XML}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${count}= Get Element Count ${resp.content} xpath=${xpath_location}
+ Should Be Equal As Numbers ${count} ${expected_count}
${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
+ Log ${resp.content}
+ 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}
+ List Should Contain Sublist ${nodes} ${topo_nodes}
-Check root node connectors
+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}
+ Log ${resp.content}
+ 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
+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}
+ ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
+ Wait Until Keyword Succeeds 30s 2s Check Every Nodes Connectors ${topo_nodes}
*** Keywords ***
-Check conn loop
- [Arguments] ${arg} ${outerind} ${content}
- :FOR ${var} IN RANGE 0 ${arg+1}
- \ Should Contain ${content} "id":"${var}"
+Check Every Nodes Connectors
+ [Arguments] ${topo_nodes}
+ : FOR ${ITEM} IN @{topo_nodes}
+ \ ${IND} Get From Dictionary ${ITEM} id
+ \ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/${IND}
+ \ Log ${resp.content}
+ \ Should Be Equal As Strings ${resp.status_code} 200
+ \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
+Check conn loop
+ [Arguments] ${arg} ${outerind} ${content}
+ : FOR ${var} IN RANGE 0 ${arg+1}
+ \ Should Contain ${content} "id":"${var}"
*** Settings ***
Documentation Test suite for Statistics Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
+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
+Resource ../../../libraries/Utils.txt
*** Variables ***
-${nodeprefix} openflow:
-${key} portStatistics
+${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}
+ ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
+ @{node_list} Create Nodes List ${topo_nodes}
+ Wait Until Keyword Succeeds 70s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/port ${node_list}
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}"
+ ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
+ @{node_list} Create Nodes List ${topo_nodes}
+ Wait Until Keyword Succeeds 70s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/flow ${node_list}
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}"
+ @{node_list} Create Nodes List ${topo_nodes}
+ Wait Until Keyword Succeeds 70s 2s Check For Elements At URI ${REST_CONTEXT}/${CONTAINER}/table ${node_list}
+
+*** Keywords ***
+Check For Correct Number Of Nodes At URI
+ [Arguments] ${uri} ${topo_nodes}
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/${uri}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ 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}
+
+Check For All Nodes At URI
+ [Arguments] ${uri} ${topo_nodes}
+ ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/${uri}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ : FOR ${ITEM} IN @{topo_nodes}
+ \ ${IND} Get From Dictionary ${ITEM} id
+ \ Should Contain ${resp.content} "${IND}"
-
+Create Nodes List
+ [Arguments] ${topo_dict}
+ ##init list
+ @{node_list}= Create List
+ : FOR ${ITEM} IN @{topo_dict}
+ \ ${IND} Get From Dictionary ${ITEM} id
+ \ Append To List ${node_list} ${IND}
+ [Return] @{node_list}
*** Settings ***
Documentation Test suite for Topology Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
+Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
Suite Teardown Delete All Sessions
Library Collections
Library ../../../libraries/RequestsLibrary.py
Variables ../../../variables/Variables.py
*** Variables ***
-${nodeprefix} openflow:
+${nodeprefix} openflow:
${REST_CONTEXT} /controller/nb/v2/topology
*** Test Cases ***
Get Topology
[Documentation] Get Topology and validate the result.
[Tags] get
+ ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
+ ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
+ ${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
+ Wait Until Keyword Succeeds 30s 2s Check Link Counts For Each Node ${topo_nodes} ${leaflist}
+
+*** Keywords ***
+Check Link Counts For Each Node
+ [Arguments] ${topo_nodes} ${leaflist}
${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}
-
-
+ Should Be Equal As Strings ${resp.status_code} 200
+ 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
+ \ ${linkcnt} Num Of Links For Node ${IND} ${leaflist} ${TOPO_TREE_FANOUT}
+ \ Should Contain X Times ${resp.content} "${IND}" ${linkcnt*2}
*** 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}
+ [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
-
+ Should Not Contain ${result} X
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
+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}
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}
-
-** Keywords ***
-Start Suite
+*** 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
+ ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
+ Open Connection ${MININET} prompt=> timeout=${numnodes*2+30}
+ 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
+ Read Until >
Write ${start}
- Sleep ${numnodes*2+30}
- Read
+ Read Until mininet>
+
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
+ Write exit
+ Read Until >
+ Close Connection
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
+
*** 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
Suite Setup Start Suite
Suite Teardown Stop Suite
Library SSHLibrary
+Resource ../../../libraries/Utils.txt
*** 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