Adding SP edition of13 suite
authorLuis Gomez <ecelgp@gmail.com>
Tue, 8 Jul 2014 03:48:21 +0000 (20:48 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Tue, 8 Jul 2014 03:48:21 +0000 (20:48 -0700)
Change-Id: Ieca851e71057cac157a543a162280e148de9b4c4
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
20 files changed:
test/csit/suites/sp-of13/010__MD_SAL_NSF/010__restconf_inventory.txt [new file with mode: 0644]
test/csit/suites/sp-of13/010__MD_SAL_NSF/020__restconf_statistics.txt [new file with mode: 0644]
test/csit/suites/sp-of13/010__MD_SAL_NSF/030__restconf_topology.txt [new file with mode: 0644]
test/csit/suites/sp-of13/010__MD_SAL_NSF/040__restconf_frm.txt [new file with mode: 0644]
test/csit/suites/sp-of13/010__MD_SAL_NSF/__init__.txt [new file with mode: 0644]
test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt [new file with mode: 0644]
test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt [new file with mode: 0644]
test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/030__restconf_topology.txt [new file with mode: 0644]
test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/040__restconf_frm.txt [new file with mode: 0644]
test/csit/suites/sp-of13/020__MD_SAL_NSF_OF13/__init__.txt [new file with mode: 0644]
test/csit/suites/sp-of13/030__AD_SAL_NSF/010__switch_manager.txt [new file with mode: 0644]
test/csit/suites/sp-of13/030__AD_SAL_NSF/020__statistics_manager.txt [new file with mode: 0644]
test/csit/suites/sp-of13/030__AD_SAL_NSF/030__topology_manager.txt [new file with mode: 0644]
test/csit/suites/sp-of13/030__AD_SAL_NSF/040__flow_programmer.txt [new file with mode: 0644]
test/csit/suites/sp-of13/030__AD_SAL_NSF/__init__.txt [new file with mode: 0644]
test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/010__switch_manager.txt [new file with mode: 0644]
test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/020__statistics_manager.txt [new file with mode: 0644]
test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/030__topology_manager.txt [new file with mode: 0644]
test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/040__flow_programmer.txt [new file with mode: 0644]
test/csit/suites/sp-of13/040__AD_SAL_NSF_OF13/__init__.txt [new file with mode: 0644]

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 (file)
index 0000000..02c70b7
--- /dev/null
@@ -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 (file)
index 0000000..7c331ef
--- /dev/null
@@ -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 (file)
index 0000000..ce43242
--- /dev/null
@@ -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 (file)
index 0000000..3aa1007
--- /dev/null
@@ -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}                  <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
+
+*** Test Cases *** 
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]   Push
+    ${resp}   Putxml    session   ${REST_CON}/node/openflow:1/table/0/flow/152    data=${BODY2}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    152
+Verify after adding flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    30
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain     ${resp.content}    10.0.20.1
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}   Delete    session   ${REST_CON}/node/openflow:1/table/0/flow/152    
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    152
+
+#    Standing bug #368 - This has been fixed
+Verify after deleting flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    40
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    10.0.20.1
+
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 (file)
index 0000000..ea644f1
--- /dev/null
@@ -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 (file)
index 0000000..02c70b7
--- /dev/null
@@ -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 (file)
index 0000000..7c331ef
--- /dev/null
@@ -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 (file)
index 0000000..b9dab2c
--- /dev/null
@@ -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 (file)
index 0000000..0632f3d
--- /dev/null
@@ -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}                  <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
+${BODY2}                  <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
+
+*** Test Cases *** 
+Add a flow - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Push a flow through REST-API
+    [Tags]   Push
+    ${resp}   Putxml    session   ${REST_CON}/node/openflow:1/table/2/flow/139    data=${BODY1}
+    Should Be Equal As Strings    ${resp.status_code}    200
+       
+Verify after adding flow config - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    139    
+
+Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep   30
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain     ${resp.content}    10.0.10.1
+
+Remove a flow - - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}   Delete    session   ${REST_CON}/node/openflow:1/table/2/flow/139    
+    Should Be Equal As Strings    ${resp.status_code}    200
+   
+Verify after deleting flow config - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Not Contain     ${resp.content}    139
+
+# Reason in using high time is, I used STOPWATCH to check the timer after deleting the flow config
+Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep   30
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    10.0.10.1
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]   Push
+    ${resp}   Putxml    session   ${REST_CON}/node/openflow:1/table/2/flow/152    data=${BODY2}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    152
+Verify after adding flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    30        
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain     ${resp.content}    10.0.20.1
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}   Delete    session   ${REST_CON}/node/openflow:1/table/2/flow/152    
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Not Contain     ${resp.content}    152
+
+Verify after deleting flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    40
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    10.0.20.1
+
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 (file)
index 0000000..7b77f73
--- /dev/null
@@ -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 (file)
index 0000000..be2f4c5
--- /dev/null
@@ -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 (file)
index 0000000..adc6d9c
--- /dev/null
@@ -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 (file)
index 0000000..58a4d08
--- /dev/null
@@ -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 (file)
index 0000000..5546015
--- /dev/null
@@ -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 (file)
index 0000000..2074063
--- /dev/null
@@ -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 (file)
index 0000000..be2f4c5
--- /dev/null
@@ -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 (file)
index 0000000..adc6d9c
--- /dev/null
@@ -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 (file)
index 0000000..58a4d08
--- /dev/null
@@ -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 (file)
index 0000000..5546015
--- /dev/null
@@ -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 (file)
index 0000000..c791190
--- /dev/null
@@ -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