From ea0b8de68265e1d9f3d9bf0adbdc730e6dd459d2 Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Mon, 7 Jul 2014 20:48:21 -0700 Subject: [PATCH] Adding SP edition of13 suite Change-Id: Ieca851e71057cac157a543a162280e148de9b4c4 Signed-off-by: Luis Gomez --- .../010__restconf_inventory.txt | 46 +++++ .../020__restconf_statistics.txt | 33 ++++ .../030__restconf_topology.txt | 77 +++++++++ .../010__MD_SAL_NSF/040__restconf_frm.txt | 60 +++++++ .../sp-of13/010__MD_SAL_NSF/__init__.txt | 27 +++ .../010__restconf_inventory.txt | 46 +++++ .../020__restconf_statistics.txt | 33 ++++ .../030__restconf_topology.txt | 77 +++++++++ .../040__restconf_frm.txt | 102 +++++++++++ .../sp-of13/020__MD_SAL_NSF_OF13/__init__.txt | 27 +++ .../030__AD_SAL_NSF/010__switch_manager.txt | 159 ++++++++++++++++++ .../020__statistics_manager.txt | 43 +++++ .../030__AD_SAL_NSF/030__topology_manager.txt | 51 ++++++ .../030__AD_SAL_NSF/040__flow_programmer.txt | 65 +++++++ .../sp-of13/030__AD_SAL_NSF/__init__.txt | 27 +++ .../010__switch_manager.txt | 159 ++++++++++++++++++ .../020__statistics_manager.txt | 43 +++++ .../030__topology_manager.txt | 51 ++++++ .../040__flow_programmer.txt | 65 +++++++ .../sp-of13/040__AD_SAL_NSF_OF13/__init__.txt | 27 +++ 20 files changed, 1218 insertions(+) create mode 100644 test/csit/suites/sp-of13/010__MD_SAL_NSF/010__restconf_inventory.txt create mode 100644 test/csit/suites/sp-of13/010__MD_SAL_NSF/020__restconf_statistics.txt create mode 100644 test/csit/suites/sp-of13/010__MD_SAL_NSF/030__restconf_topology.txt create mode 100644 test/csit/suites/sp-of13/010__MD_SAL_NSF/040__restconf_frm.txt create mode 100644 test/csit/suites/sp-of13/010__MD_SAL_NSF/__init__.txt create mode 100644 test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt create mode 100644 test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt create mode 100644 test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/030__restconf_topology.txt create mode 100644 test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/040__restconf_frm.txt create mode 100644 test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/__init__.txt create mode 100644 test/csit/suites/sp-of13/030__AD_SAL_NSF/010__switch_manager.txt create mode 100644 test/csit/suites/sp-of13/030__AD_SAL_NSF/020__statistics_manager.txt create mode 100644 test/csit/suites/sp-of13/030__AD_SAL_NSF/030__topology_manager.txt create mode 100644 test/csit/suites/sp-of13/030__AD_SAL_NSF/040__flow_programmer.txt create mode 100644 test/csit/suites/sp-of13/030__AD_SAL_NSF/__init__.txt create mode 100644 test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/010__switch_manager.txt create mode 100644 test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/020__statistics_manager.txt create mode 100644 test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/030__topology_manager.txt create mode 100644 test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/040__flow_programmer.txt create mode 100644 test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/__init__.txt diff --git a/test/csit/suites/sp-of13/010__MD_SAL_NSF/010__restconf_inventory.txt b/test/csit/suites/sp-of13/010__MD_SAL_NSF/010__restconf_inventory.txt new file mode 100644 index 0000000000..02c70b7de3 --- /dev/null +++ b/test/csit/suites/sp-of13/010__MD_SAL_NSF/010__restconf_inventory.txt @@ -0,0 +1,46 @@ +*** Settings *** +Documentation Test suite for RESTCONF inventory +Suite Setup Create Session session http://${CONTROLLER}:8080 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 + + + diff --git a/test/csit/suites/sp-of13/010__MD_SAL_NSF/020__restconf_statistics.txt b/test/csit/suites/sp-of13/010__MD_SAL_NSF/020__restconf_statistics.txt new file mode 100644 index 0000000000..7c331ef489 --- /dev/null +++ b/test/csit/suites/sp-of13/010__MD_SAL_NSF/020__restconf_statistics.txt @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Test suite for RESTCONF statistics +Suite Setup Create Session session http://${CONTROLLER}:8080 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 diff --git a/test/csit/suites/sp-of13/010__MD_SAL_NSF/030__restconf_topology.txt b/test/csit/suites/sp-of13/010__MD_SAL_NSF/030__restconf_topology.txt new file mode 100644 index 0000000000..ce43242e08 --- /dev/null +++ b/test/csit/suites/sp-of13/010__MD_SAL_NSF/030__restconf_topology.txt @@ -0,0 +1,77 @@ +*** Settings *** +Documentation Test suite for RESTCONF Topology +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${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 diff --git a/test/csit/suites/sp-of13/010__MD_SAL_NSF/040__restconf_frm.txt b/test/csit/suites/sp-of13/010__MD_SAL_NSF/040__restconf_frm.txt new file mode 100644 index 0000000000..3aa1007fe1 --- /dev/null +++ b/test/csit/suites/sp-of13/010__MD_SAL_NSF/040__restconf_frm.txt @@ -0,0 +1,60 @@ +*** Settings *** +Documentation Test suite for RESTCONF FRM +Suite Setup Create Session session http://${CONTROLLER}:8080 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} 2Foo204810.0.20.1/32152000openflow:1:1 + +*** 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 + diff --git a/test/csit/suites/sp-of13/010__MD_SAL_NSF/__init__.txt b/test/csit/suites/sp-of13/010__MD_SAL_NSF/__init__.txt new file mode 100644 index 0000000000..ea644f144e --- /dev/null +++ b/test/csit/suites/sp-of13/010__MD_SAL_NSF/__init__.txt @@ -0,0 +1,27 @@ +*** 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 diff --git a/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt new file mode 100644 index 0000000000..02c70b7de3 --- /dev/null +++ b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt @@ -0,0 +1,46 @@ +*** Settings *** +Documentation Test suite for RESTCONF inventory +Suite Setup Create Session session http://${CONTROLLER}:8080 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 + + + diff --git a/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt new file mode 100644 index 0000000000..7c331ef489 --- /dev/null +++ b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Test suite for RESTCONF statistics +Suite Setup Create Session session http://${CONTROLLER}:8080 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 diff --git a/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/030__restconf_topology.txt b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/030__restconf_topology.txt new file mode 100644 index 0000000000..b9dab2c589 --- /dev/null +++ b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/030__restconf_topology.txt @@ -0,0 +1,77 @@ +*** Settings *** +Documentation Test suite RESTCONF Topology +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${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 diff --git a/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/040__restconf_frm.txt b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/040__restconf_frm.txt new file mode 100644 index 0000000000..0632f3d744 --- /dev/null +++ b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/040__restconf_frm.txt @@ -0,0 +1,102 @@ +*** Settings *** +Documentation Test suite for RESTCONF FRM +Suite Setup Create Session session http://${CONTROLLER}:8080 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} 2Foo204810.0.10.1/32139200 +${BODY2} 2Foo204810.0.20.1/32152200160 + +*** 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 + diff --git a/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/__init__.txt b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/__init__.txt new file mode 100644 index 0000000000..7b77f73dc1 --- /dev/null +++ b/test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/__init__.txt @@ -0,0 +1,27 @@ +*** 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 diff --git a/test/csit/suites/sp-of13/030__AD_SAL_NSF/010__switch_manager.txt b/test/csit/suites/sp-of13/030__AD_SAL_NSF/010__switch_manager.txt new file mode 100644 index 0000000000..be2f4c5911 --- /dev/null +++ b/test/csit/suites/sp-of13/030__AD_SAL_NSF/010__switch_manager.txt @@ -0,0 +1,159 @@ +*** Settings *** +Documentation Test suite for Switch Manager +Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/SwitchManager.py +Variables ../../../variables/Variables.py +Library ../../../libraries/Topology.py + +*** Variables *** +${REST_CONTEXT} /controller/nb/v2/switchmanager + +*** Test Cases *** +List all nodes + [Documentation] List all nodes and their properties in the network. + [Tags] list_info + Log ${TOPO_TREE_LEVEL} + ${topo_nodes} Get Nodes From Topology ${TOPO_TREE_LEVEL} + ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/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 diff --git a/test/csit/suites/sp-of13/030__AD_SAL_NSF/020__statistics_manager.txt b/test/csit/suites/sp-of13/030__AD_SAL_NSF/020__statistics_manager.txt new file mode 100644 index 0000000000..adc6d9ce23 --- /dev/null +++ b/test/csit/suites/sp-of13/030__AD_SAL_NSF/020__statistics_manager.txt @@ -0,0 +1,43 @@ +*** Settings *** +Documentation Test suite for Statistics Manager +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${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} + + diff --git a/test/csit/suites/sp-of13/030__AD_SAL_NSF/030__topology_manager.txt b/test/csit/suites/sp-of13/030__AD_SAL_NSF/030__topology_manager.txt new file mode 100644 index 0000000000..58a4d08c0a --- /dev/null +++ b/test/csit/suites/sp-of13/030__AD_SAL_NSF/030__topology_manager.txt @@ -0,0 +1,51 @@ +*** Settings *** +Documentation Test suite for Topology Manager +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${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} diff --git a/test/csit/suites/sp-of13/030__AD_SAL_NSF/040__flow_programmer.txt b/test/csit/suites/sp-of13/030__AD_SAL_NSF/040__flow_programmer.txt new file mode 100644 index 0000000000..5546015066 --- /dev/null +++ b/test/csit/suites/sp-of13/030__AD_SAL_NSF/040__flow_programmer.txt @@ -0,0 +1,65 @@ +*** Settings *** +Documentation Test suite for Flow Programmer +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${name} flow1 +${key} flowConfig +${node_id} 00:00:00:00:00:00:00:02 +${REST_CONTEXT} /controller/nb/v2/flowprogrammer +${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} + diff --git a/test/csit/suites/sp-of13/030__AD_SAL_NSF/__init__.txt b/test/csit/suites/sp-of13/030__AD_SAL_NSF/__init__.txt new file mode 100644 index 0000000000..207406366f --- /dev/null +++ b/test/csit/suites/sp-of13/030__AD_SAL_NSF/__init__.txt @@ -0,0 +1,27 @@ +*** 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 diff --git a/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/010__switch_manager.txt b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/010__switch_manager.txt new file mode 100644 index 0000000000..be2f4c5911 --- /dev/null +++ b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/010__switch_manager.txt @@ -0,0 +1,159 @@ +*** Settings *** +Documentation Test suite for Switch Manager +Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/SwitchManager.py +Variables ../../../variables/Variables.py +Library ../../../libraries/Topology.py + +*** Variables *** +${REST_CONTEXT} /controller/nb/v2/switchmanager + +*** Test Cases *** +List all nodes + [Documentation] List all nodes and their properties in the network. + [Tags] list_info + Log ${TOPO_TREE_LEVEL} + ${topo_nodes} Get Nodes From Topology ${TOPO_TREE_LEVEL} + ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/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 diff --git a/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/020__statistics_manager.txt b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/020__statistics_manager.txt new file mode 100644 index 0000000000..adc6d9ce23 --- /dev/null +++ b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/020__statistics_manager.txt @@ -0,0 +1,43 @@ +*** Settings *** +Documentation Test suite for Statistics Manager +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${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} + + diff --git a/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/030__topology_manager.txt b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/030__topology_manager.txt new file mode 100644 index 0000000000..58a4d08c0a --- /dev/null +++ b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/030__topology_manager.txt @@ -0,0 +1,51 @@ +*** Settings *** +Documentation Test suite for Topology Manager +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${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} diff --git a/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/040__flow_programmer.txt b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/040__flow_programmer.txt new file mode 100644 index 0000000000..5546015066 --- /dev/null +++ b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/040__flow_programmer.txt @@ -0,0 +1,65 @@ +*** Settings *** +Documentation Test suite for Flow Programmer +Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions +Library Collections +Library ../../../libraries/RequestsLibrary.py +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +*** Variables *** +${name} flow1 +${key} flowConfig +${node_id} 00:00:00:00:00:00:00:02 +${REST_CONTEXT} /controller/nb/v2/flowprogrammer +${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} + diff --git a/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/__init__.txt b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/__init__.txt new file mode 100644 index 0000000000..c79119017f --- /dev/null +++ b/test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/__init__.txt @@ -0,0 +1,27 @@ +*** 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 -- 2.36.6