Introducing karaf-all and karaf-l2switch suites
authorLuis Gomez <ecelgp@gmail.com>
Sun, 7 Sep 2014 20:20:30 +0000 (13:20 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Sun, 7 Sep 2014 20:20:30 +0000 (13:20 -0700)
Change-Id: I38e8a9fb7990b4090a173dd06e91b4d75f09242a
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
71 files changed:
test/csit/suites/karaf-all/010__MD_SAL_NSF/010__restconf_inventory.txt [new file with mode: 0644]
test/csit/suites/karaf-all/010__MD_SAL_NSF/020__restconf_statistics.txt [new file with mode: 0644]
test/csit/suites/karaf-all/010__MD_SAL_NSF/030__restconf_topology.txt [new file with mode: 0644]
test/csit/suites/karaf-all/010__MD_SAL_NSF/040__restconf_frm.txt [new file with mode: 0644]
test/csit/suites/karaf-all/010__MD_SAL_NSF/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt [new file with mode: 0644]
test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt [new file with mode: 0644]
test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/030__restconf_topology.txt [new file with mode: 0644]
test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/040__restconf_frm.txt [new file with mode: 0644]
test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/030__AD_SAL_NSF/010__switch_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/030__AD_SAL_NSF/020__statistics_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/030__AD_SAL_NSF/030__topology_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/030__AD_SAL_NSF/040__flow_programmer.txt [new file with mode: 0644]
test/csit/suites/karaf-all/030__AD_SAL_NSF/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/010__switch_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/020__statistics_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/030__topology_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/040__flow_programmer.txt [new file with mode: 0644]
test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/050__AD_SAL_Apps/010__host_tracker.txt [new file with mode: 0644]
test/csit/suites/karaf-all/050__AD_SAL_Apps/020__static_route.txt [new file with mode: 0644]
test/csit/suites/karaf-all/050__AD_SAL_Apps/030__subnet_gateway.txt [new file with mode: 0644]
test/csit/suites/karaf-all/050__AD_SAL_Apps/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/010__host_tracker.txt [new file with mode: 0644]
test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/020__static_route.txt [new file with mode: 0644]
test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/030__subnet_gateway.txt [new file with mode: 0644]
test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/300__dst_ip.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/301__src_ip.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/302__dst_mac.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/304__eth_ip_port.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/305__ttl.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/306__eth_ip_qos.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/307__eth_ip_qos_port_tcpport.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/308__eth_ip_qos_port_tcpport_mpls.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/309__eth_ip_qos_sctp.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/310__eth_ip_qos_icmp.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/311__eth_arp.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/312__eth_arp_transport.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/313__eth_arp_transport_hardware.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/314__eth_vlan.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/315__timeout_vlan_pcp_vlan.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/316__eth_mpls_tc_bos.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/317__eth_ipv6.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/318__metadata.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/319__metadata_mask.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/320__ipv6_meta_qos_udp.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/321__ipv6_meta_qos_tcp.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/322__ipv6_flow.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/323__tunnel.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/324__ipv6_flow_label.txt [new file with mode: 0644]
test/csit/suites/karaf-all/070__Flows_OF13/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/080__Inventory_Performance/010__restconf_inventory.txt [new file with mode: 0644]
test/csit/suites/karaf-all/080__Inventory_Performance/020__switch_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/080__Inventory_Performance/030__statistics_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/080__Inventory_Performance/040__topology_manager.txt [new file with mode: 0644]
test/csit/suites/karaf-all/080__Inventory_Performance/050__ping_test.txt [new file with mode: 0644]
test/csit/suites/karaf-all/080__Inventory_Performance/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/090__OVSDB/010__bridge_domain.txt [new file with mode: 0644]
test/csit/suites/karaf-all/090__OVSDB/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-all/100__OVSDB_OF13/010__bridge_domain.txt [new file with mode: 0644]
test/csit/suites/karaf-all/100__OVSDB_OF13/__init__.txt [new file with mode: 0644]
test/csit/suites/karaf-l2switch/010__AddressTracking_OF13/010__restconf_inv_addresses.txt [moved from test/csit/suites/l2switch/010__AddressTracking_OF13/010__restconf_inv_addresses.txt with 100% similarity]
test/csit/suites/karaf-l2switch/010__AddressTracking_OF13/__init__.txt [moved from test/csit/suites/l2switch/010__AddressTracking_OF13/__init__.txt with 100% similarity]
test/csit/suites/karaf-l2switch/020__FlowProgramming_OF13/010__restconf_inv_flows.txt [moved from test/csit/suites/l2switch/020__FlowProgramming_OF13/010__restconf_inv_flows.txt with 100% similarity]
test/csit/suites/karaf-l2switch/020__FlowProgramming_OF13/__init__.txt [moved from test/csit/suites/l2switch/020__FlowProgramming_OF13/__init__.txt with 100% similarity]
test/csit/suites/karaf-l2switch/030__LoopRemoval_OF13/010__loop_of_3.txt [moved from test/csit/suites/l2switch/030__LoopRemoval_OF13/010__loop_of_3.txt with 100% similarity]
test/csit/suites/karaf-l2switch/030__LoopRemoval_OF13/020__ping.txt [moved from test/csit/suites/l2switch/030__LoopRemoval_OF13/020__ping.txt with 100% similarity]
test/csit/suites/karaf-l2switch/030__LoopRemoval_OF13/__init__.txt [moved from test/csit/suites/l2switch/030__LoopRemoval_OF13/__init__.txt with 100% similarity]
test/csit/suites/karaf-l2switch/topologies/customtopo.py [moved from test/csit/suites/l2switch/topologies/customtopo.py with 100% similarity]

diff --git a/test/csit/suites/karaf-all/010__MD_SAL_NSF/010__restconf_inventory.txt b/test/csit/suites/karaf-all/010__MD_SAL_NSF/010__restconf_inventory.txt
new file mode 100644 (file)
index 0000000..ab87a89
--- /dev/null
@@ -0,0 +1,46 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF inventory
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
+
+*** Test Cases *** 
+Get list of nodes
+    [Documentation]    Get the inventory
+       ${resp}    Get    session    ${REST_CONTEXT}
+       Should Be Equal As Strings    ${resp.status_code}    200
+       Should Contain     ${resp.content}      openflow:1
+       Should Contain     ${resp.content}      openflow:2
+       Should Contain     ${resp.content}      openflow:3
+       
+Get nodeconnector for a node 1
+    [Documentation]    Get the inventory for a node
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      openflow:1:1
+        Should Contain     ${resp.content}      openflow:1:2
+
+Get nodeconnector for a node 2
+    [Documentation]    Get the inventory for a node
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:2
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      openflow:2:1
+        Should Contain     ${resp.content}      openflow:2:2
+        Should Contain     ${resp.content}      openflow:2:3
+
+Get nodeconnector for a node 3
+    [Documentation]    Get the inventory for a node
+       ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:3
+       Should Be Equal As Strings   ${resp.status_code}    200
+       Should Contain     ${resp.content}      openflow:3:1
+       Should Contain     ${resp.content}      openflow:3:2
+       Should Contain     ${resp.content}      openflow:3:3
+
+       
+    
diff --git a/test/csit/suites/karaf-all/010__MD_SAL_NSF/020__restconf_statistics.txt b/test/csit/suites/karaf-all/010__MD_SAL_NSF/020__restconf_statistics.txt
new file mode 100644 (file)
index 0000000..bb4ea21
--- /dev/null
@@ -0,0 +1,33 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF statistics
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
+
+*** Test Cases ***     
+Get Stats for node 1
+    [Documentation]    Get the stats for a node
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      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/karaf-all/010__MD_SAL_NSF/030__restconf_topology.txt b/test/csit/suites/karaf-all/010__MD_SAL_NSF/030__restconf_topology.txt
new file mode 100644 (file)
index 0000000..b4e3495
--- /dev/null
@@ -0,0 +1,77 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF Topology 
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${topology1}    "flow:1"
+${node1}    "openflow:1"
+${node2}    "openflow:2"
+${node3}    "openflow:3"
+${key}       link
+${REST_CONTEXT_1}    /restconf/operational/network-topology:network-topology
+${REST_CONTEXT_2}    /restconf/operational/network-topology:network-topology/topology/flow:1
+${REST_CONTEXT_3}    /restconf/config/network-topology:network-topology/topology/flow:1/link/userlink
+
+*** Test Cases ***
+Get RESTCONF Topology
+    [Documentation]    Get RESTCONF Topology and validate the result.
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT_1}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain   ${resp.content}   ${topology1}  
+   
+List all the links
+    [Documentation]    List all the links in the topology.
+    [Tags]    get
+    ${body1}    Create Dictionary    dest-node=openflow:1    dest-tp=openflow:1:2
+    ${body2}    Create Dictionary    source-node=openflow:3    source-tp=openflow:3:3
+    ${link2}    Create Dictionary    link-id=openflow:3:3  destination=${body1}    source=${body2}
+    ${body1}    Create Dictionary    dest-node=openflow:1    dest-tp=openflow:1:1
+    ${body2}    Create Dictionary    source-node=openflow:2    source-tp=openflow:2:3
+    ${link1}    Create Dictionary    link-id=openflow:2:3  destination=${body1}    source=${body2}
+    ${body1}    Create Dictionary    dest-node=openflow:3    dest-tp=openflow:3:3
+    ${body2}    Create Dictionary    source-node=openflow:1    source-tp=openflow:1:2
+    ${link4}    Create Dictionary    link-id=openflow:1:2  destination=${body1}    source=${body2}
+    ${body1}    Create Dictionary    dest-node=openflow:2    dest-tp=openflow:2:3
+    ${body2}    Create Dictionary    source-node=openflow:1    source-tp=openflow:1:1
+    ${link3}    Create Dictionary    link-id=openflow:1:1  destination=${body1}    source=${body2}
+    ${links}    Create List    ${link1}    ${link2}   ${link3}   ${link4}
+    ${resp}    Get    session    ${REST_CONTEXT_2}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    topology
+    ${topology}    Get From List   ${content}    0
+    ${link}      Get From Dictionary    ${topology}    link
+    Sort List    ${link}
+    Lists Should be Equal    ${link}    ${links}
+
+Add a link
+    [Documentation]    Add a link, list to validate the result.
+    [Tags]    add
+    ${body1}    Create Dictionary    dest-node=openflow:3    dest-tp=openflow:3:1 
+    ${body2}    Create Dictionary    source-node=openflow:2    source-tp=openflow:2:1 
+    ${body3}    Create Dictionary    link-id=userlink  destination=${body1}    source=${body2}
+    ${links}    Create List    ${body3}
+    ${body}    Create Dictionary    link=${links}
+    ${resp}    Put    session    ${REST_CONTEXT_3}   data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Get    session    ${REST_CONTEXT_3}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${link}    Get From Dictionary    ${result}    link
+    Lists Should be Equal    ${link}    ${links}
+
+
+Remove a link
+    [Documentation]    Remove a link, list to validate the result.
+    [Tags]    remove
+    ${resp}    Delete   session    ${REST_CONTEXT_3}  
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Get    session    ${REST_CONTEXT_3}
+    Should Be Equal As Strings    ${resp.status_code}    404
diff --git a/test/csit/suites/karaf-all/010__MD_SAL_NSF/040__restconf_frm.txt b/test/csit/suites/karaf-all/010__MD_SAL_NSF/040__restconf_frm.txt
new file mode 100644 (file)
index 0000000..a4d4cfd
--- /dev/null
@@ -0,0 +1,60 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF FRM
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+
+${REST_CON}        /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}        /restconf/operational/opendaylight-inventory:nodes
+${BODY2}                  <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
+
+*** Test Cases *** 
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]   Push
+    ${resp}   Putxml    session   ${REST_CON}/node/openflow:1/table/0/flow/152    data=${BODY2}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    152
+Verify after adding flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    30
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain     ${resp.content}    10.0.20.1
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}   Delete    session   ${REST_CON}/node/openflow:1/table/0/flow/152    
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    152
+
+#    Standing bug #368 - This has been fixed
+Verify after deleting flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    40
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/0
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    10.0.20.1
+
diff --git a/test/csit/suites/karaf-all/010__MD_SAL_NSF/__init__.txt b/test/csit/suites/karaf-all/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/karaf-all/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt b/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/010__restconf_inventory.txt
new file mode 100644 (file)
index 0000000..ab87a89
--- /dev/null
@@ -0,0 +1,46 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF inventory
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
+
+*** Test Cases *** 
+Get list of nodes
+    [Documentation]    Get the inventory
+       ${resp}    Get    session    ${REST_CONTEXT}
+       Should Be Equal As Strings    ${resp.status_code}    200
+       Should Contain     ${resp.content}      openflow:1
+       Should Contain     ${resp.content}      openflow:2
+       Should Contain     ${resp.content}      openflow:3
+       
+Get nodeconnector for a node 1
+    [Documentation]    Get the inventory for a node
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      openflow:1:1
+        Should Contain     ${resp.content}      openflow:1:2
+
+Get nodeconnector for a node 2
+    [Documentation]    Get the inventory for a node
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:2
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      openflow:2:1
+        Should Contain     ${resp.content}      openflow:2:2
+        Should Contain     ${resp.content}      openflow:2:3
+
+Get nodeconnector for a node 3
+    [Documentation]    Get the inventory for a node
+       ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:3
+       Should Be Equal As Strings   ${resp.status_code}    200
+       Should Contain     ${resp.content}      openflow:3:1
+       Should Contain     ${resp.content}      openflow:3:2
+       Should Contain     ${resp.content}      openflow:3:3
+
+       
+    
diff --git a/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt b/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/020__restconf_statistics.txt
new file mode 100644 (file)
index 0000000..bb4ea21
--- /dev/null
@@ -0,0 +1,33 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF statistics
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
+
+*** Test Cases ***     
+Get Stats for node 1
+    [Documentation]    Get the stats for a node
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      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/karaf-all/020__MD_SAL_NSF_OF13/030__restconf_topology.txt b/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/030__restconf_topology.txt
new file mode 100644 (file)
index 0000000..8322bcf
--- /dev/null
@@ -0,0 +1,77 @@
+*** Settings ***
+Documentation     Test suite RESTCONF Topology 
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${topology1}    "flow:1"
+${node1}    "openflow:1"
+${node2}    "openflow:2"
+${node3}    "openflow:3"
+${key}       link
+${REST_CONTEXT_1}    /restconf/operational/network-topology:network-topology
+${REST_CONTEXT_2}    /restconf/operational/network-topology:network-topology/topology/flow:1
+${REST_CONTEXT_3}    /restconf/config/network-topology:network-topology/topology/flow:1/link/userlink
+
+*** Test Cases ***
+Get RESTCONF Topology
+    [Documentation]    Get RESTCONF Topology and validate the result.
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT_1}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain   ${resp.content}   ${topology1}  
+   
+List all the links
+    [Documentation]    List all the links in the topology.
+    [Tags]    get
+    ${body1}    Create Dictionary    dest-node=openflow:1    dest-tp=openflow:1:2
+    ${body2}    Create Dictionary    source-node=openflow:3    source-tp=openflow:3:3
+    ${link2}    Create Dictionary    link-id=openflow:3:3  destination=${body1}    source=${body2}
+    ${body1}    Create Dictionary    dest-node=openflow:1    dest-tp=openflow:1:1
+    ${body2}    Create Dictionary    source-node=openflow:2    source-tp=openflow:2:3
+    ${link1}    Create Dictionary    link-id=openflow:2:3  destination=${body1}    source=${body2}
+    ${body1}    Create Dictionary    dest-node=openflow:3    dest-tp=openflow:3:3
+    ${body2}    Create Dictionary    source-node=openflow:1    source-tp=openflow:1:2
+    ${link4}    Create Dictionary    link-id=openflow:1:2  destination=${body1}    source=${body2}
+    ${body1}    Create Dictionary    dest-node=openflow:2    dest-tp=openflow:2:3
+    ${body2}    Create Dictionary    source-node=openflow:1    source-tp=openflow:1:1
+    ${link3}    Create Dictionary    link-id=openflow:1:1  destination=${body1}    source=${body2}
+    ${links}    Create List    ${link1}    ${link2}   ${link3}   ${link4}
+    ${resp}    Get    session    ${REST_CONTEXT_2}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    topology
+    ${topology}    Get From List   ${content}    0
+    ${link}      Get From Dictionary    ${topology}    link
+    Sort List    ${link}
+    Lists Should be Equal    ${link}    ${links}
+
+Add a link
+    [Documentation]    Add a link, list to validate the result.
+    [Tags]    add
+    ${body1}    Create Dictionary    dest-node=openflow:3    dest-tp=openflow:3:1 
+    ${body2}    Create Dictionary    source-node=openflow:2    source-tp=openflow:2:1 
+    ${body3}    Create Dictionary    link-id=userlink  destination=${body1}    source=${body2}
+    ${links}    Create List    ${body3}
+    ${body}    Create Dictionary    link=${links}
+    ${resp}    Put    session    ${REST_CONTEXT_3}   data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Get    session    ${REST_CONTEXT_3}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${link}    Get From Dictionary    ${result}    link
+    Lists Should be Equal    ${link}    ${links}
+
+
+Remove a link
+    [Documentation]    Remove a link, list to validate the result.
+    [Tags]    remove
+    ${resp}    Delete   session    ${REST_CONTEXT_3}  
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Get    session    ${REST_CONTEXT_3}
+    Should Be Equal As Strings    ${resp.status_code}    404
diff --git a/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/040__restconf_frm.txt b/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/040__restconf_frm.txt
new file mode 100644 (file)
index 0000000..6f1e0b0
--- /dev/null
@@ -0,0 +1,102 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF FRM
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+
+${REST_CON}        /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}        /restconf/operational/opendaylight-inventory:nodes
+${BODY1}                  <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
+${BODY2}                  <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
+
+*** Test Cases *** 
+Add a flow - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Push a flow through REST-API
+    [Tags]   Push
+    ${resp}   Putxml    session   ${REST_CON}/node/openflow:1/table/2/flow/139    data=${BODY1}
+    Should Be Equal As Strings    ${resp.status_code}    200
+       
+Verify after adding flow config - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    139    
+
+Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep   30
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain     ${resp.content}    10.0.10.1
+
+Remove a flow - - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}   Delete    session   ${REST_CON}/node/openflow:1/table/2/flow/139    
+    Should Be Equal As Strings    ${resp.status_code}    200
+   
+Verify after deleting flow config - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Not Contain     ${resp.content}    139
+
+# Reason in using high time is, I used STOPWATCH to check the timer after deleting the flow config
+Verify after deleting flow operational - Sending IPv4 Dest Address and Eth type
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep   30
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    10.0.10.1
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]   Push
+    ${resp}   Putxml    session   ${REST_CON}/node/openflow:1/table/2/flow/152    data=${BODY2}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    152
+Verify after adding flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    30        
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain     ${resp.content}    10.0.20.1
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}   Delete    session   ${REST_CON}/node/openflow:1/table/2/flow/152    
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    ${resp}    Get    session     ${REST_CON}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Not Contain     ${resp.content}    152
+
+Verify after deleting flow operational - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]   Get
+    Sleep    40
+    ${resp}    Get    session     ${REST_OPR}/node/openflow:1/table/2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain     ${resp.content}    10.0.20.1
+
diff --git a/test/csit/suites/karaf-all/020__MD_SAL_NSF_OF13/__init__.txt b/test/csit/suites/karaf-all/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/karaf-all/030__AD_SAL_NSF/010__switch_manager.txt b/test/csit/suites/karaf-all/030__AD_SAL_NSF/010__switch_manager.txt
new file mode 100644 (file)
index 0000000..13e0694
--- /dev/null
@@ -0,0 +1,159 @@
+*** Settings ***
+Documentation     Test suite for Switch Manager
+Suite Setup       Create Session    ${ODL_CONTROLLER_SESSION}    http://${CONTROLLER}:${RESTPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           RequestsLibrary
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/SwitchManager.py
+Variables         ../../../variables/Variables.py
+Library           ../../../libraries/Topology.py
+
+*** Variables ***
+${REST_CONTEXT}    /controller/nb/v2/switchmanager
+
+*** Test Cases ***
+List all nodes
+    [Documentation]    List all nodes and their properties in the network.
+    [Tags]    list_info
+    Log    ${TOPO_TREE_LEVEL}
+    ${topo_nodes}    Get Nodes From Topology    ${TOPO_TREE_LEVEL}
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    ${jsondata}=    To JSON    ${resp.content}
+    ${nodes}    Extract All Nodes    ${jsondata}
+    List Should Contain Sublist   ${nodes}    ${topo_nodes}
+Check node 1 connectors 
+    [Documentation]    List node connectors and verify all connectors are there
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    Should Contain     ${resp.content}    s1-eth1
+    Should Contain     ${resp.content}    s1-eth2
+Check node 2 connectors               
+    [Documentation]    List node connectors and verify all connectors are there                      
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    Should Contain     ${resp.content}    s2-eth1             
+    Should Contain     ${resp.content}    s2-eth2  
+    Should Contain     ${resp.content}    s2-eth3
+Check node 3 connectors               
+    [Documentation]    List node connectors and verify all connectors are there                      
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    Should Contain     ${resp.content}    s3-eth1           
+    Should Contain     ${resp.content}    s3-eth2
+    Should Contain     ${resp.content}    s3-eth3
+Add property to node
+    [Documentation]    Add a property to node
+    Add property to node    OF    00:00:00:00:00:00:00:02    description     Switch2
+    Node property should exist    OF    00:00:00:00:00:00:00:02    description    Switch2
+#Remove property from node
+#    [Documentation]    Remove a property from node
+#    Remove property from node    OF    00:00:00:00:00:00:00:02    description
+#    Node property should not exist    OF    00:00:00:00:00:00:00:02     description    Switch2
+Add property to nodeconnector
+    [Documentation]    Add a property to nodeconnector
+    Add property to nodeconnector    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth    1000
+    Nodeconnector property should exist    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth    ${1000}
+
+Remove property from nodeconnector
+    [Documentation]    Remove a property from nodeconnector
+    Remove property from nodeconnector    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth
+    Nodeconnector property should not exist    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth    ${1000}
+
+*** Keywords ***
+Get node
+    [Arguments]    ${node_id}    ${node_type}
+    [Documentation]    Get a specific node
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    ${node}    Create Dictionary    id    ${node_id}    type    ${node_type}
+    ${content}    Extract All Nodes    ${result}
+    Log    ${content}
+    List Should Contain Value    ${content}    ${node}
+
+Add property to node
+    [Arguments]    ${node_type}    ${node_id}    ${property}    ${value}
+    [Documentation]    Add property to node
+    ${resp}    Put    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}/property/${property}/${value}
+    Should Be Equal As Strings    ${resp.status_code}    201    Response status code error
+
+Remove property from node
+    [Arguments]    ${node_type}    ${node_id}    ${property}
+    [Documentation]    Remove property from node
+    ${resp}    Delete    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}/property/${property}
+    Should Be Equal As Strings    ${resp.status_code}    204    Response status code error
+
+Add property to nodeconnector
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}    ${value}
+    [Documentation]    Add property to nodeconnector
+    ${resp}    Put    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodeconnector/${node_type}/${node_id}/${nc_type}/${nc_id}/property/${property}/${value}
+    Should Be Equal As Strings    ${resp.status_code}    201    Response status code error
+
+Remove property from nodeconnector
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}
+    [Documentation]    Remove property from nodeconnector
+    ${resp}    Delete    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodeconnector/${node_type}/${node_id}/${nc_type}/${nc_id}/property/${property}
+    Should Be Equal As Strings    ${resp.status_code}    204    Response status code error
+
+Node property should exist
+    [Arguments]    ${node_type}    ${node_id}    ${property}    ${value}
+    [Documentation]    Property of node should exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${nodes}    Extract All Nodes    ${result}
+    ${property_values}    Extract Node Property Values    ${result}    ${property}
+    ${node}    Create Dictionary    id    ${node_id}    type    ${node_type}
+    ${property_value}    Create Dictionary    value    ${value}
+    Log    ${property_value}
+    List Should Contain Value    ${nodes}    ${node}
+    List Should Contain Value    ${property_values}    ${property_value}
+
+Node property should not exist
+    [Arguments]    ${node_type}    ${node_id}    ${property}    ${value}
+    [Documentation]    Property of node should not exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${nodes}    Extract All Nodes    ${result}
+    ${properties}    Extract Node Property Values    ${result}    ${property}
+    ${node}    Create Dictionary    id    ${node_id}    type    ${node_type}
+    ${property}    Create Dictionary    value    ${value}
+    Log    ${property}
+    List Should Contain Value    ${nodes}    ${node}
+    List Should Not Contain Value    ${properties}    ${property}
+
+Nodeconnector property should exist
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}    ${value}
+    [Documentation]    Property of nodeconnector should exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${property_values}    Extract Nodeconnector Property Values    ${result}    ${property}
+    Log    ${property_values}
+    ${property_value}    Create Dictionary    value    ${value}
+    List Should Contain Value    ${property_values}    ${property_value}
+
+Nodeconnector property should not exist
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}    ${value}
+    [Documentation]    Property of nodeconnector should not exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${property_values}    Extract Nodeconnector Property Values    ${result}    ${property}
+    Log    ${property_values}
+    ${property_value}    Create Dictionary    value    ${value}
+    List Should not Contain Value    ${property_values}    ${property_value}
+
+List all nodeconnectors of node
+    [Arguments]    ${node_type}    ${node_id}
+    [Documentation]    List all nodeconnectors and properties of node
diff --git a/test/csit/suites/karaf-all/030__AD_SAL_NSF/020__statistics_manager.txt b/test/csit/suites/karaf-all/030__AD_SAL_NSF/020__statistics_manager.txt
new file mode 100644 (file)
index 0000000..9bd466e
--- /dev/null
@@ -0,0 +1,43 @@
+*** Settings ***
+Documentation     Test suite for Statistics Manager
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${node1}       "00:00:00:00:00:00:00:01"
+${node2}       "00:00:00:00:00:00:00:02"
+${node3}       "00:00:00:00:00:00:00:03"
+${key}             portStatistics
+${REST_CONTEXT}    /controller/nb/v2/statistics
+
+*** Test Cases ***
+get port stats
+    [Documentation]    Show port stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/port
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Contain X Times   ${resp.content}    ${node1}    4
+    Should Contain X Times   ${resp.content}    ${node2}    5
+    Should Contain X Times   ${resp.content}    ${node3}    5
+get flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Contain    ${resp.content}    ${node1}
+    Should Contain    ${resp.content}    ${node2}
+    Should Contain    ${resp.content}    ${node3}
+get table stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/table
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Contain    ${resp.content}    ${node1}
+    Should Contain    ${resp.content}    ${node2}
+    Should Contain    ${resp.content}    ${node3}
+
diff --git a/test/csit/suites/karaf-all/030__AD_SAL_NSF/030__topology_manager.txt b/test/csit/suites/karaf-all/030__AD_SAL_NSF/030__topology_manager.txt
new file mode 100644 (file)
index 0000000..230d6e7
--- /dev/null
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation     Test suite for Topology Manager
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${node1}   "00:00:00:00:00:00:00:01"
+${node2}   "00:00:00:00:00:00:00:02"
+${node3}   "00:00:00:00:00:00:00:03"
+${name}           test_userlink1
+${key}            userLinks
+${REST_CONTEXT}    /controller/nb/v2/topology
+
+*** Test Cases ***
+Get Topology
+    [Documentation]    Get Topology and validate the result.
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain X Times  ${resp.content}   ${node1}   4
+    Should Contain X Times  ${resp.content}   ${node2}   2
+    Should Contain X Times  ${resp.content}   ${node3}   2
+Add a userlink
+    [Documentation]    Add a userlink, list to validate the result.
+    [Tags]    add
+    ${body}    Create Dictionary    name    ${name}    status    Success    srcNodeConnector
+    ...    OF|1@OF|00:00:00:00:00:00:00:02    dstNodeConnector    OF|1@OF|00:00:00:00:00:00:00:03
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/userLink/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/userLinks
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+Remove a userlink
+    [Documentation]    Remove a userlink, list to validate the result.
+    [Tags]    remove
+    ${body}    Create Dictionary    name    ${name}    status    Success    srcNodeConnector
+    ...    OF|1@OF|00:00:00:00:00:00:00:02    dstNodeConnector    OF|1@OF|00:00:00:00:00:00:00:03
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/userLink/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/userLinks
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
diff --git a/test/csit/suites/karaf-all/030__AD_SAL_NSF/040__flow_programmer.txt b/test/csit/suites/karaf-all/030__AD_SAL_NSF/040__flow_programmer.txt
new file mode 100644 (file)
index 0000000..e4fac2a
--- /dev/null
@@ -0,0 +1,65 @@
+*** Settings ***
+Documentation     Test suite for Flow Programmer
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}  auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           flow1
+${key}            flowConfig
+${node_id}        00:00:00:00:00:00:00:02
+${REST_CONTEXT}    /controller/nb/v2/flowprogrammer
+${REST_CONTEXT_ST}    /controller/nb/v2/statistics
+${FLOW}           "10.0.0.1"
+
+*** Test Cases ***
+Add a flow
+    [Documentation]    Add a flow, list to validate the result.
+    [Tags]    add
+    ${node}    Create Dictionary    type    OF    id    ${node_id}
+    ${actions}    Create List    OUTPUT=1
+    ${body}    Create Dictionary    name    ${name}    installInHw    true    node
+    ...    ${node}    priority    1    etherType    0x800    nwDst
+    ...    10.0.0.1/32    actions    ${actions}
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+Check flow in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]   get
+    Sleep   30
+    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain    ${resp.content}    ${FLOW}
+Remove a flow
+    [Documentation]    Remove a flow, list to validate the result.
+    [Tags]    remove
+    ${node}    Create Dictionary    type    OF    id    ${node_id}
+    ${actions}    Create List    OUTPUT=1
+    ${body}    Create Dictionary    name    ${name}    installInHw    true    node
+    ...    ${node}    priority    1    etherType    0x800    nwDst
+    ...    10.0.0.1/32    actions    ${actions}
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+Check flow is not in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    Sleep   30
+    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
diff --git a/test/csit/suites/karaf-all/030__AD_SAL_NSF/__init__.txt b/test/csit/suites/karaf-all/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/karaf-all/040__AD_SAL_NSF_OF13/010__switch_manager.txt b/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/010__switch_manager.txt
new file mode 100644 (file)
index 0000000..13e0694
--- /dev/null
@@ -0,0 +1,159 @@
+*** Settings ***
+Documentation     Test suite for Switch Manager
+Suite Setup       Create Session    ${ODL_CONTROLLER_SESSION}    http://${CONTROLLER}:${RESTPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           RequestsLibrary
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/SwitchManager.py
+Variables         ../../../variables/Variables.py
+Library           ../../../libraries/Topology.py
+
+*** Variables ***
+${REST_CONTEXT}    /controller/nb/v2/switchmanager
+
+*** Test Cases ***
+List all nodes
+    [Documentation]    List all nodes and their properties in the network.
+    [Tags]    list_info
+    Log    ${TOPO_TREE_LEVEL}
+    ${topo_nodes}    Get Nodes From Topology    ${TOPO_TREE_LEVEL}
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    ${jsondata}=    To JSON    ${resp.content}
+    ${nodes}    Extract All Nodes    ${jsondata}
+    List Should Contain Sublist   ${nodes}    ${topo_nodes}
+Check node 1 connectors 
+    [Documentation]    List node connectors and verify all connectors are there
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    Should Contain     ${resp.content}    s1-eth1
+    Should Contain     ${resp.content}    s1-eth2
+Check node 2 connectors               
+    [Documentation]    List node connectors and verify all connectors are there                      
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:02
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    Should Contain     ${resp.content}    s2-eth1             
+    Should Contain     ${resp.content}    s2-eth2  
+    Should Contain     ${resp.content}    s2-eth3
+Check node 3 connectors               
+    [Documentation]    List node connectors and verify all connectors are there                      
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:03
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    Should Contain     ${resp.content}    s3-eth1           
+    Should Contain     ${resp.content}    s3-eth2
+    Should Contain     ${resp.content}    s3-eth3
+Add property to node
+    [Documentation]    Add a property to node
+    Add property to node    OF    00:00:00:00:00:00:00:02    description     Switch2
+    Node property should exist    OF    00:00:00:00:00:00:00:02    description    Switch2
+#Remove property from node
+#    [Documentation]    Remove a property from node
+#    Remove property from node    OF    00:00:00:00:00:00:00:02    description
+#    Node property should not exist    OF    00:00:00:00:00:00:00:02     description    Switch2
+Add property to nodeconnector
+    [Documentation]    Add a property to nodeconnector
+    Add property to nodeconnector    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth    1000
+    Nodeconnector property should exist    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth    ${1000}
+
+Remove property from nodeconnector
+    [Documentation]    Remove a property from nodeconnector
+    Remove property from nodeconnector    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth
+    Nodeconnector property should not exist    OF    00:00:00:00:00:00:00:02    OF    2    bandwidth    ${1000}
+
+*** Keywords ***
+Get node
+    [Arguments]    ${node_id}    ${node_type}
+    [Documentation]    Get a specific node
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    ${node}    Create Dictionary    id    ${node_id}    type    ${node_type}
+    ${content}    Extract All Nodes    ${result}
+    Log    ${content}
+    List Should Contain Value    ${content}    ${node}
+
+Add property to node
+    [Arguments]    ${node_type}    ${node_id}    ${property}    ${value}
+    [Documentation]    Add property to node
+    ${resp}    Put    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}/property/${property}/${value}
+    Should Be Equal As Strings    ${resp.status_code}    201    Response status code error
+
+Remove property from node
+    [Arguments]    ${node_type}    ${node_id}    ${property}
+    [Documentation]    Remove property from node
+    ${resp}    Delete    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}/property/${property}
+    Should Be Equal As Strings    ${resp.status_code}    204    Response status code error
+
+Add property to nodeconnector
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}    ${value}
+    [Documentation]    Add property to nodeconnector
+    ${resp}    Put    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodeconnector/${node_type}/${node_id}/${nc_type}/${nc_id}/property/${property}/${value}
+    Should Be Equal As Strings    ${resp.status_code}    201    Response status code error
+
+Remove property from nodeconnector
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}
+    [Documentation]    Remove property from nodeconnector
+    ${resp}    Delete    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodeconnector/${node_type}/${node_id}/${nc_type}/${nc_id}/property/${property}
+    Should Be Equal As Strings    ${resp.status_code}    204    Response status code error
+
+Node property should exist
+    [Arguments]    ${node_type}    ${node_id}    ${property}    ${value}
+    [Documentation]    Property of node should exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${nodes}    Extract All Nodes    ${result}
+    ${property_values}    Extract Node Property Values    ${result}    ${property}
+    ${node}    Create Dictionary    id    ${node_id}    type    ${node_type}
+    ${property_value}    Create Dictionary    value    ${value}
+    Log    ${property_value}
+    List Should Contain Value    ${nodes}    ${node}
+    List Should Contain Value    ${property_values}    ${property_value}
+
+Node property should not exist
+    [Arguments]    ${node_type}    ${node_id}    ${property}    ${value}
+    [Documentation]    Property of node should not exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${nodes}    Extract All Nodes    ${result}
+    ${properties}    Extract Node Property Values    ${result}    ${property}
+    ${node}    Create Dictionary    id    ${node_id}    type    ${node_type}
+    ${property}    Create Dictionary    value    ${value}
+    Log    ${property}
+    List Should Contain Value    ${nodes}    ${node}
+    List Should Not Contain Value    ${properties}    ${property}
+
+Nodeconnector property should exist
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}    ${value}
+    [Documentation]    Property of nodeconnector should exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${property_values}    Extract Nodeconnector Property Values    ${result}    ${property}
+    Log    ${property_values}
+    ${property_value}    Create Dictionary    value    ${value}
+    List Should Contain Value    ${property_values}    ${property_value}
+
+Nodeconnector property should not exist
+    [Arguments]    ${node_type}    ${node_id}    ${nc_type}    ${nc_id}    ${property}    ${value}
+    [Documentation]    Property of nodeconnector should not exist
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/${CONTAINER}/node/${node_type}/${node_id}
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    TO JSON    ${resp.content}
+    Log    ${result}
+    ${property_values}    Extract Nodeconnector Property Values    ${result}    ${property}
+    Log    ${property_values}
+    ${property_value}    Create Dictionary    value    ${value}
+    List Should not Contain Value    ${property_values}    ${property_value}
+
+List all nodeconnectors of node
+    [Arguments]    ${node_type}    ${node_id}
+    [Documentation]    List all nodeconnectors and properties of node
diff --git a/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/020__statistics_manager.txt b/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/020__statistics_manager.txt
new file mode 100644 (file)
index 0000000..9bd466e
--- /dev/null
@@ -0,0 +1,43 @@
+*** Settings ***
+Documentation     Test suite for Statistics Manager
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${node1}       "00:00:00:00:00:00:00:01"
+${node2}       "00:00:00:00:00:00:00:02"
+${node3}       "00:00:00:00:00:00:00:03"
+${key}             portStatistics
+${REST_CONTEXT}    /controller/nb/v2/statistics
+
+*** Test Cases ***
+get port stats
+    [Documentation]    Show port stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/port
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Contain X Times   ${resp.content}    ${node1}    4
+    Should Contain X Times   ${resp.content}    ${node2}    5
+    Should Contain X Times   ${resp.content}    ${node3}    5
+get flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Contain    ${resp.content}    ${node1}
+    Should Contain    ${resp.content}    ${node2}
+    Should Contain    ${resp.content}    ${node3}
+get table stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/table
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Should Contain    ${resp.content}    ${node1}
+    Should Contain    ${resp.content}    ${node2}
+    Should Contain    ${resp.content}    ${node3}
+
diff --git a/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/030__topology_manager.txt b/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/030__topology_manager.txt
new file mode 100644 (file)
index 0000000..230d6e7
--- /dev/null
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation     Test suite for Topology Manager
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${node1}   "00:00:00:00:00:00:00:01"
+${node2}   "00:00:00:00:00:00:00:02"
+${node3}   "00:00:00:00:00:00:00:03"
+${name}           test_userlink1
+${key}            userLinks
+${REST_CONTEXT}    /controller/nb/v2/topology
+
+*** Test Cases ***
+Get Topology
+    [Documentation]    Get Topology and validate the result.
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain X Times  ${resp.content}   ${node1}   4
+    Should Contain X Times  ${resp.content}   ${node2}   2
+    Should Contain X Times  ${resp.content}   ${node3}   2
+Add a userlink
+    [Documentation]    Add a userlink, list to validate the result.
+    [Tags]    add
+    ${body}    Create Dictionary    name    ${name}    status    Success    srcNodeConnector
+    ...    OF|1@OF|00:00:00:00:00:00:00:02    dstNodeConnector    OF|1@OF|00:00:00:00:00:00:00:03
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/userLink/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/userLinks
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+Remove a userlink
+    [Documentation]    Remove a userlink, list to validate the result.
+    [Tags]    remove
+    ${body}    Create Dictionary    name    ${name}    status    Success    srcNodeConnector
+    ...    OF|1@OF|00:00:00:00:00:00:00:02    dstNodeConnector    OF|1@OF|00:00:00:00:00:00:00:03
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/userLink/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/userLinks
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
diff --git a/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/040__flow_programmer.txt b/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/040__flow_programmer.txt
new file mode 100644 (file)
index 0000000..e4fac2a
--- /dev/null
@@ -0,0 +1,65 @@
+*** Settings ***
+Documentation     Test suite for Flow Programmer
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}  auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           flow1
+${key}            flowConfig
+${node_id}        00:00:00:00:00:00:00:02
+${REST_CONTEXT}    /controller/nb/v2/flowprogrammer
+${REST_CONTEXT_ST}    /controller/nb/v2/statistics
+${FLOW}           "10.0.0.1"
+
+*** Test Cases ***
+Add a flow
+    [Documentation]    Add a flow, list to validate the result.
+    [Tags]    add
+    ${node}    Create Dictionary    type    OF    id    ${node_id}
+    ${actions}    Create List    OUTPUT=1
+    ${body}    Create Dictionary    name    ${name}    installInHw    true    node
+    ...    ${node}    priority    1    etherType    0x800    nwDst
+    ...    10.0.0.1/32    actions    ${actions}
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+Check flow in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]   get
+    Sleep   30
+    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain    ${resp.content}    ${FLOW}
+Remove a flow
+    [Documentation]    Remove a flow, list to validate the result.
+    [Tags]    remove
+    ${node}    Create Dictionary    type    OF    id    ${node_id}
+    ${actions}    Create List    OUTPUT=1
+    ${body}    Create Dictionary    name    ${name}    installInHw    true    node
+    ...    ${node}    priority    1    etherType    0x800    nwDst
+    ...    10.0.0.1/32    actions    ${actions}
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+Check flow is not in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    Sleep   30
+    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
diff --git a/test/csit/suites/karaf-all/040__AD_SAL_NSF_OF13/__init__.txt b/test/csit/suites/karaf-all/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 
diff --git a/test/csit/suites/karaf-all/050__AD_SAL_Apps/010__host_tracker.txt b/test/csit/suites/karaf-all/050__AD_SAL_Apps/010__host_tracker.txt
new file mode 100644 (file)
index 0000000..a7f92c5
--- /dev/null
@@ -0,0 +1,60 @@
+*** Settings ***
+Documentation     Test suite for Host Tracker
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           10.0.1.4
+${key}            hostConfig
+${REST_CONTEXT}    /controller/nb/v2/hosttracker
+${REST_CONTEXT_ST}    /controller/nb/v2/statistics
+${FLOW}           "10.0.1.4"
+
+*** Test Cases ***
+Add a host
+    [Documentation]    Add a host, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    nodeType    OF    dataLayerAddress    5e:bf:79:84:10:a6    vlan
+    ...    1    nodeId    00:00:00:00:00:00:00:03    nodeConnectorId    2    networkAddress
+    ...    10.0.1.4    staticHost    ${True}    nodeConnectorType    OF
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/address/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/hosts/active
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body} 
+Check flow in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]   apps
+    Sleep   30
+    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain X Times   ${resp.content}    ${FLOW}   3
+Remove a host
+    [Documentation]    Remove a host, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    nodeType    OF    dataLayerAddress    5e:bf:79:84:10:a6    vlan
+    ...    1    nodeId    00:00:00:00:00:00:00:03    nodeConnectorId    2    networkAddress
+    ...    10.0.1.4    staticHost    ${True}    nodeConnectorType    OF
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/address/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+Check flow is not in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    apps
+    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/karaf-all/050__AD_SAL_Apps/020__static_route.txt b/test/csit/suites/karaf-all/050__AD_SAL_Apps/020__static_route.txt
new file mode 100644 (file)
index 0000000..48851c8
--- /dev/null
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation     Test suite for Static Route
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           test_route1
+${key}            staticRoute
+${REST_CONTEXT}    /controller/nb/v2/staticroute
+${REST_CONTEXT_HT}   /controller/nb/v2/hosttracker
+
+*** Test Cases ***
+Add a static route
+    [Documentation]    Add a static route, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    prefix    192.168.1.0/24    nextHop
+    ...    10.0.0.2
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/route/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/routes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+    Sleep    30
+#     This works locally but NOT in OpenDaylight
+#Check flow in flow stats
+#    [Documentation]    Show flow stats and validate result
+#    [Tags]    apps
+#    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+#    Should Be Equal As Strings    ${resp.status_code}    200 
+#    Log    ${resp.content}
+#    Should Contain X Times    ${resp.content}    10.0.0.2     3
+Remove a static route
+    [Documentation]    Remove a static route, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    prefix    192.168.1.0/24    nextHop
+    ...    10.0.0.2
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/route/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/routes
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+
diff --git a/test/csit/suites/karaf-all/050__AD_SAL_Apps/030__subnet_gateway.txt b/test/csit/suites/karaf-all/050__AD_SAL_Apps/030__subnet_gateway.txt
new file mode 100644 (file)
index 0000000..31c2d05
--- /dev/null
@@ -0,0 +1,65 @@
+*** Settings ***
+Documentation     Test suite for Subnet Gateway
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           test
+${key}            subnetConfig
+${REST_CONTEXT}    /controller/nb/v2/subnetservice
+${REST_CONTEXT_HT}   /controller/nb/v2/hosttracker
+
+*** Test Cases ***
+List Subnets
+    [Documentation]    List subnets and verify default is there
+    [Tags]    apps
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/subnets
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${subnet}    Get From Dictionary    ${result}    ${key}
+    ${content}   Get From List    ${subnet}    0
+    Dictionary Should Contain Value   ${content}   0.0.0.0/0
+Ping h1 to h4
+    [Documentation]    Ping h1 to h4, verify no packet loss
+    [Tags]   apps
+    Write   h1 ping -w 6 h4
+    Sleep   6
+    Write   h4 ping -w 6 h1
+    Sleep   6
+    ${result}    Read
+    Should Contain   ${result}   64 bytes
+List hosts
+    [Documentation]    List hosts and verify h1 and h4
+    [Tags]   apps
+    ${resp}    Get    session    ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    10.0.0.1
+    Should Contain     ${resp.content}    10.0.0.4
+Add a subnet
+    [Documentation]    Add a subnet, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    subnet    11.0.0.254/8
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/subnet/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/subnets
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+Remove a subnet
+    [Documentation]    Remove a subnet, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    subnet    11.0.0.254/8
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/subnet/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/subnets
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+
diff --git a/test/csit/suites/karaf-all/050__AD_SAL_Apps/__init__.txt b/test/csit/suites/karaf-all/050__AD_SAL_Apps/__init__.txt
new file mode 100644 (file)
index 0000000..a951e5a
--- /dev/null
@@ -0,0 +1,27 @@
+*** Settings ***
+Documentation     Test suite for AD-SAL Applications 
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Library     SSHLibrary
+
+*** Variables ***
+${start}=   sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 
+
+** Keywords ***
+Start Suite  
+    Log    Start mininet
+    Open Connection   ${MININET}     prompt=>
+    Login With Public Key    ${MININET_USER}   ${USER_HOME}/.ssh/id_rsa   any 
+    Write    sudo ovs-vsctl set-manager ptcp:6644
+    Write    sudo mn -c
+    Sleep    2
+    Write    ${start}
+    Sleep    30
+    Read
+Stop Suite
+    Log    Stop mininet
+    Read
+    Write    exit 
+    Sleep    6
+    Read 
+    Close Connection 
diff --git a/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/010__host_tracker.txt b/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/010__host_tracker.txt
new file mode 100644 (file)
index 0000000..a7f92c5
--- /dev/null
@@ -0,0 +1,60 @@
+*** Settings ***
+Documentation     Test suite for Host Tracker
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           10.0.1.4
+${key}            hostConfig
+${REST_CONTEXT}    /controller/nb/v2/hosttracker
+${REST_CONTEXT_ST}    /controller/nb/v2/statistics
+${FLOW}           "10.0.1.4"
+
+*** Test Cases ***
+Add a host
+    [Documentation]    Add a host, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    nodeType    OF    dataLayerAddress    5e:bf:79:84:10:a6    vlan
+    ...    1    nodeId    00:00:00:00:00:00:00:03    nodeConnectorId    2    networkAddress
+    ...    10.0.1.4    staticHost    ${True}    nodeConnectorType    OF
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/address/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/hosts/active
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body} 
+Check flow in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]   apps
+    Sleep   30
+    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    Should Contain X Times   ${resp.content}    ${FLOW}   3
+Remove a host
+    [Documentation]    Remove a host, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    nodeType    OF    dataLayerAddress    5e:bf:79:84:10:a6    vlan
+    ...    1    nodeId    00:00:00:00:00:00:00:03    nodeConnectorId    2    networkAddress
+    ...    10.0.1.4    staticHost    ${True}    nodeConnectorType    OF
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/address/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+Check flow is not in flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    apps
+    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/karaf-all/060__AD_SAL_Apps_OF13/020__static_route.txt b/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/020__static_route.txt
new file mode 100644 (file)
index 0000000..48851c8
--- /dev/null
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation     Test suite for Static Route
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           test_route1
+${key}            staticRoute
+${REST_CONTEXT}    /controller/nb/v2/staticroute
+${REST_CONTEXT_HT}   /controller/nb/v2/hosttracker
+
+*** Test Cases ***
+Add a static route
+    [Documentation]    Add a static route, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    prefix    192.168.1.0/24    nextHop
+    ...    10.0.0.2
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/route/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/routes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response status code error
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+    Sleep    30
+#     This works locally but NOT in OpenDaylight
+#Check flow in flow stats
+#    [Documentation]    Show flow stats and validate result
+#    [Tags]    apps
+#    ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
+#    Should Be Equal As Strings    ${resp.status_code}    200 
+#    Log    ${resp.content}
+#    Should Contain X Times    ${resp.content}    10.0.0.2     3
+Remove a static route
+    [Documentation]    Remove a static route, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    prefix    192.168.1.0/24    nextHop
+    ...    10.0.0.2
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/route/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/routes
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+
diff --git a/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/030__subnet_gateway.txt b/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/030__subnet_gateway.txt
new file mode 100644 (file)
index 0000000..31c2d05
--- /dev/null
@@ -0,0 +1,65 @@
+*** Settings ***
+Documentation     Test suite for Subnet Gateway
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${name}           test
+${key}            subnetConfig
+${REST_CONTEXT}    /controller/nb/v2/subnetservice
+${REST_CONTEXT_HT}   /controller/nb/v2/hosttracker
+
+*** Test Cases ***
+List Subnets
+    [Documentation]    List subnets and verify default is there
+    [Tags]    apps
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/subnets
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${subnet}    Get From Dictionary    ${result}    ${key}
+    ${content}   Get From List    ${subnet}    0
+    Dictionary Should Contain Value   ${content}   0.0.0.0/0
+Ping h1 to h4
+    [Documentation]    Ping h1 to h4, verify no packet loss
+    [Tags]   apps
+    Write   h1 ping -w 6 h4
+    Sleep   6
+    Write   h4 ping -w 6 h1
+    Sleep   6
+    ${result}    Read
+    Should Contain   ${result}   64 bytes
+List hosts
+    [Documentation]    List hosts and verify h1 and h4
+    [Tags]   apps
+    ${resp}    Get    session    ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
+    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Contain     ${resp.content}    10.0.0.1
+    Should Contain     ${resp.content}    10.0.0.4
+Add a subnet
+    [Documentation]    Add a subnet, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    subnet    11.0.0.254/8
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/subnet/${name}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/subnets
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+Remove a subnet
+    [Documentation]    Remove a subnet, list to validate the result.
+    [Tags]    apps
+    ${body}    Create Dictionary    name    ${name}    subnet    11.0.0.254/8
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/subnet/${name}
+    Should Be Equal As Strings    ${resp.status_code}    204
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/subnets
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
+
diff --git a/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/__init__.txt b/test/csit/suites/karaf-all/060__AD_SAL_Apps_OF13/__init__.txt
new file mode 100644 (file)
index 0000000..0f342ea
--- /dev/null
@@ -0,0 +1,27 @@
+*** Settings ***
+Documentation     Test suite for AD-SAL Applications mininet OF13
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Library     SSHLibrary
+
+*** Variables ***
+${start}=   sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13 
+
+** Keywords ***
+Start Suite  
+    Log    Start mininet
+    Open Connection   ${MININET}     prompt=>
+    Login With Public Key    ${MININET_USER}   ${USER_HOME}/.ssh/id_rsa   any 
+    Write    sudo ovs-vsctl set-manager ptcp:6644
+    Write    sudo mn -c
+    Sleep    2
+    Write    ${start}
+    Sleep    30
+    Read
+Stop Suite
+    Log    Stop mininet
+    Read
+    Write    exit 
+    Sleep    6
+    Read 
+    Close Connection 
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/300__dst_ip.txt b/test/csit/suites/karaf-all/070__Flows_OF13/300__dst_ip.txt
new file mode 100644 (file)
index 0000000..0cb793a
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for pushing/verify/remove a flow through RESTCONF
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f1.xml
+${FLOW}           124
+${TABLE}          2
+@{FLOWELMENTS}    nw_dst=10.0.1.0    table=2    dec_ttl
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/301__src_ip.txt b/test/csit/suites/karaf-all/070__Flows_OF13/301__src_ip.txt
new file mode 100644 (file)
index 0000000..6e6e8c8
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for pushing/verify/remove a flow through RESTCONF
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f2.xml
+${FLOW}           125
+${TABLE}          2
+@{FLOWELMENTS}    nw_src=10.0.0.1    table=2    drop
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/302__dst_mac.txt b/test/csit/suites/karaf-all/070__Flows_OF13/302__dst_mac.txt
new file mode 100644 (file)
index 0000000..369952c
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for pushing/verify/remove a flow through RESTCONF
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f3.xml
+${FLOW}           126
+${TABLE}          2
+@{FLOWELMENTS}    dl_src=00:00:00:00:00:01    table=2    drop
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/304__eth_ip_port.txt b/test/csit/suites/karaf-all/070__Flows_OF13/304__eth_ip_port.txt
new file mode 100644 (file)
index 0000000..c10b26b
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for IP,Ethernet and port
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f5.xml
+${FLOW}           128
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:ff:ff:ff:ff    table=2    dec_ttl    dl_src=00:00:00:00:23:ae    nw_src=10.1.2.0    nw_dst=20.4.0.0    in_port=0
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch    mpls-ttl
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/305__ttl.txt b/test/csit/suites/karaf-all/070__Flows_OF13/305__ttl.txt
new file mode 100644 (file)
index 0000000..5b05b6c
--- /dev/null
@@ -0,0 +1,122 @@
+*** Settings ***
+Documentation     OF1.3 Suite to cover TTL Actions
+...               - Set IP TTL
+...               - Decrement IP TTL
+...               - Copy TTL outwards
+...               - Copy TTL inwards
+...               - Set MPLS TTL
+...               - Decrement MPLS TTL
+...
+...               NOTE: for OVS, it appears that set_ttl, and both copy in/out are not supported, so need to skip those checks for now.
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Test Template     Create And Remove Flow
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           String
+Library           XML
+Resource          ../../../libraries/FlowLib.txt
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${GENERIC_ACTION_FLOW_FILE}    ${CURDIR}/../../../variables/xmls/genericActionFlow.xml
+${MININET_CMD}    sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,1 --switch ovsk,protocols=OpenFlow13
+${ipv4_src}       10.1.2.0/24
+${ipv4_dst}       40.4.0.0/16
+${eth_type}       0x800
+${eth_src}        00:00:00:01:23:ae
+${eth_dst}        ff:ff:ff:ff:ff:ff
+
+*** Test Cases ***    ODL flow action        action key                                                                                                                      action value    tableID    flowID    verify OVS?    OVS specific string?
+Set_IP_TTL            [Documentation]        OF1.3: \ OFPAT_SET_NW_TTL = 23, /* IP TTL. */\n(currently not supported on OVS)\n
+                      [Tags]                 ttl                                                                                                                             set
+                      set-nw-ttl-action      nw-ttl                                                                                                                          1               2          101       no             set_ttl
+
+Dec_TTL               [Documentation]        OF1.3: \ OFPAT_DEC_NW_TTL = 24, /* Decrement IP TTL. */\n
+                      [Tags]                 ttl                                                                                                                             dec
+                      dec-nw-ttl             none                                                                                                                            none            3          305       yes            dec_ttl
+
+Copy_TTL_In           [Documentation]        OFPAT_COPY_TTL_IN = 12, /* Copy TTL "inwards" -- from outermost to\nnext-to-outermost */\n(currently NOT supported in OVS)\n
+                      [Tags]                 ttl                                                                                                                             copyin
+                      copy-ttl-in            none                                                                                                                            none            9          202       no             copy_ttl_in
+
+Copy_TTL_Out          [Documentation]        OFPAT_COPY_TTL_OUT = 11, /* Copy TTL "outwards" -- from next-to-outermost\nto outermost */\n(currently NOT suported in OVS)
+                      [Tags]                 ttl                                                                                                                             copyout
+                      copy-ttl-out           none                                                                                                                            none            8          909       no             copy_ttl_out
+
+Set_MPLS_TTL          [Documentation]        OFPAT_SET_MPLS_TTL = 15, /* MPLS TTL */
+                      [Tags]                 ttl                                                                                                                             setmpls
+                      set-mpls-ttl-action    mpls-ttl                                                                                                                        1               4          505       yes            set_mpls_ttl
+
+Dec_MPLS_TTL          [Documentation]        OFPAT_DEC_MPLS_TTL = 16, /* Decrement MPLS TTL */
+                      [Tags]                 ttl                                                                                                                             decmpls
+                      dec-mpls-ttl           none                                                                                                                            none            2          1001      yes            dec_mpls_ttl
+
+*** Keywords ***
+Create And Remove Flow
+    [Arguments]    ${flow_action}    ${action_key}    ${action_value}    ${table_id}    ${flow_id}    ${verify_switch_flag}
+    ...    ${additional_ovs_flowelements}
+    @{OVS_FLOWELEMENTS}    Create List    dl_dst=${eth_dst}    table=${table_id}    dl_src=${eth_src}    nw_src=${ipv4_src}    nw_dst=${ipv4_dst}
+    ...    ${additional_ovs_flowelements}
+    ##The dictionaries here will be used to populate the match and action elements of the flow mod
+    ${ethernet_match_dict}=    Create Dictionary    type=${eth_type}    destination=${eth_dst}    source=${eth_src}
+    ${ipv4_match_dict}=    Create Dictionary    source=${ipv4_src}    destination=${ipv4_dst}
+    ##flow is a python Object to build flow details, including the xml format to send to controller
+    ${flow}=    Create Flow
+    Set "${flow}" "table_id" With "${table_id}"
+    Set "${flow}" "id" With "${flow_id}"
+    Clear Flow Actions    ${flow}
+    Set Flow Action    ${flow}    0    0    ${flow_action}
+    Set Flow Ethernet Match    ${flow}    ${ethernet_match_dict}
+    Set Flow IPv4 Match    ${flow}    ${ipv4_match_dict}
+    ##If the ${flow_action} contains the string "set" we need to include a deeper action detail (e.g. set-ttl needs a element to indicate the value to set it to)
+    Run Keyword If    "set" in "${flow_action}"    Add Flow XML Element    ${flow}    ${action_key}    ${action_value}    instructions/instruction/apply-actions/action/${flow_action}
+    Log    Flow XML is ${flow.xml}
+    Add Flow To Controller And Verify    ${flow.xml}    ${flow.table_id}    ${flow.id}
+    Run Keyword If    "${verify_switch_flag}" == "yes"    Verify Flow On Switch    ${OVS_FLOWELEMENTS}
+    Remove Flow From Controller And Verify    ${flow.xml}    ${flow.table_id}    ${flow.id}
+    Run Keyword If    "${verify_switch_flag}" == "yes"    Verify Flow Does Not Exist On Switch    ${OVS_FLOWELEMENTS}
+
+Add Flow To Controller And Verify
+    [Arguments]    ${flow_body}    ${table_id}    ${flow_id}
+    [Documentation]    Push flow through REST-API and verify in data-store
+    ${resp}    Put Xml    session    ${REST_CON}/node/openflow:1/table/${table_id}/flow/${flow_id}    data=${flow_body}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${table_id}/flow/${flow_id}    headers=${ACCEPT_XML}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${flow_body}    ${resp.content}
+
+Verify Flow On Switch
+    [Arguments]    ${flow_elements}
+    [Documentation]    Checking flow on switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${switchoutput}    Read Until    >
+    : FOR    ${flowElement}    IN    @{flow_elements}
+    \    should Contain    ${switchoutput}    ${flowElement}
+
+Remove Flow From Controller And Verify
+    [Arguments]    ${flow_body}    ${table_id}    ${flow_id}
+    [Documentation]    Remove flow
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${table_id}/flow/${flow_id}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${table_id}
+    Log    ${resp.content}
+    Should Not Contain    ${resp.content}    ${flow_id}
+
+Verify Flow Does Not Exist On Switch
+    [Arguments]    ${flow_elements}
+    [Documentation]    Checking flow on switch is removed
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${switchoutput}    Read Until    >
+    : FOR    ${flowElement}    IN    @{flow_elements}
+    \    should Not Contain    ${switchoutput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/306__eth_ip_qos.txt b/test/csit/suites/karaf-all/070__Flows_OF13/306__eth_ip_qos.txt
new file mode 100644 (file)
index 0000000..d315d77
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IP,Ethernet,DSCP and Action dec TTL
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f7.xml
+${FLOW}           130
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:ff:ff:ff:aa    table=2    nw_ecn=1    dl_src=00:00:00:11:23:ae    nw_src=10.1.2.0    nw_dst=20.4.0.0    dec_ttl
+...               nw_proto=56    nw_tos=60
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch    ${EMPTY}
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/307__eth_ip_qos_port_tcpport.txt b/test/csit/suites/karaf-all/070__Flows_OF13/307__eth_ip_qos_port_tcpport.txt
new file mode 100644 (file)
index 0000000..e0b73b6
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IP,Ethernet,QoS, TCP dst/src port and Action dec MPLS TTL
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f8.xml
+${FLOW}           131
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:29:01:19:61    table=2    nw_ecn=2    dl_src=00:00:00:11:23:ae    nw_src=17.0.0.0    nw_dst=172.168.0.0    dec_ttl
+...               tcp    nw_tos=8    in_port=0    tp_dst=8080    tp_src=25364
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch    ${EMPTY}
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/308__eth_ip_qos_port_tcpport_mpls.txt b/test/csit/suites/karaf-all/070__Flows_OF13/308__eth_ip_qos_port_tcpport_mpls.txt
new file mode 100644 (file)
index 0000000..272ec35
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IP,Ethernet,QoS, TCP dst/src port and Action dec MPLS TTL
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f9.xml
+${FLOW}           132
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=20:14:29:01:19:61    table=2    nw_ecn=3    dl_src=00:00:00:11:23:ae    nw_src=19.1.0.0    nw_dst=172.168.5.0    dec_ttl
+...               udp    nw_tos=32    in_port=0    tp_dst=8080    tp_src=25364
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/309__eth_ip_qos_sctp.txt b/test/csit/suites/karaf-all/070__Flows_OF13/309__eth_ip_qos_sctp.txt
new file mode 100644 (file)
index 0000000..5ccff76
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IP,Ethernet,QoS, SCTP dst/src port and Action dec TTL
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f10.xml
+${FLOW}           133
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:29:01:19:61    table=2    nw_ecn=0    dl_src=00:00:00:11:23:ae    nw_src=17.0.0.0    nw_dst=172.168.0.0    dec_ttl
+...               sctp    nw_tos=0    in_port=0    tp_dst=384    tp_src=768
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/310__eth_ip_qos_icmp.txt b/test/csit/suites/karaf-all/070__Flows_OF13/310__eth_ip_qos_icmp.txt
new file mode 100644 (file)
index 0000000..820fd99
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IP,Ethernet,QoS, SCTP dst/src port and Action dec TTL
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f11.xml
+${FLOW}           134
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:29:01:19:61    table=2    nw_ecn=3    dl_src=00:00:00:11:23:ae    nw_src=17.0.0.0    nw_dst=172.168.0.0    dec_ttl
+...               icmp    nw_tos=108    in_port=0    icmp_type=6    icmp_code=3
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/311__eth_arp.txt b/test/csit/suites/karaf-all/070__Flows_OF13/311__eth_arp.txt
new file mode 100644 (file)
index 0000000..49f15dc
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for Ethernet,QoS, ARP and Action drop
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f12.xml
+${FLOW}           135
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:ff:ff:ff:ff    table=2    dl_src=00:00:00:01:23:ae    drop    arp    arp_op=1
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/312__eth_arp_transport.txt b/test/csit/suites/karaf-all/070__Flows_OF13/312__eth_arp_transport.txt
new file mode 100644 (file)
index 0000000..9e4faef
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for Ethernet,QoS, ARP and Action drop
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f13.xml
+${FLOW}           136
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:ff:ff:ff:ff    table=2    dl_src=00:00:00:01:23:ae    drop    arp    arp_op=1    arp_spa=192.168.4.1
+...               arp_tpa=10.21.22.23
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/313__eth_arp_transport_hardware.txt b/test/csit/suites/karaf-all/070__Flows_OF13/313__eth_arp_transport_hardware.txt
new file mode 100644 (file)
index 0000000..ee7bdb8
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for Ethernet,QoS, ARP and Action drop
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f14.xml
+${FLOW}           137
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:ff:ff:ff:ff    table=2    dl_src=00:00:fc:01:23:ae    CONTROLLER:60    arp    arp_op=1    arp_spa=192.168.4.1
+...               arp_tpa=10.21.22.23    arp_tha=fe:dc:ba:98:76:54    arp_sha=12:34:56:78:98:ab
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/314__eth_vlan.txt b/test/csit/suites/karaf-all/070__Flows_OF13/314__eth_vlan.txt
new file mode 100644 (file)
index 0000000..a2d6530
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for Ethernet,QoS, ARP and Action drop
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f15.xml
+${FLOW}           138
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:29:01:19:61    table=2    dl_src=00:00:00:11:23:ae    dec_mpls_ttl    mpls    dl_vlan=78
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/315__timeout_vlan_pcp_vlan.txt b/test/csit/suites/karaf-all/070__Flows_OF13/315__timeout_vlan_pcp_vlan.txt
new file mode 100644 (file)
index 0000000..f6160d4
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for Time our values and Vlan and PCP Vlan
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f16.xml
+${FLOW}           139
+${TABLE}          2
+@{FLOWELMENTS}    table=2    idle_timeout=3400    hard_timeout=1200    priority=2    dl_vlan=78    dl_vlan_pcp=3
+...               dl_src=00:00:00:11:23:ae    dl_dst=ff:ff:29:01:19:61    dec_ttl
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/316__eth_mpls_tc_bos.txt b/test/csit/suites/karaf-all/070__Flows_OF13/316__eth_mpls_tc_bos.txt
new file mode 100644 (file)
index 0000000..2adc238
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for Ethernet,QoS, ARP and Action drop
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f17.xml
+${FLOW}           140
+${TABLE}          2
+@{FLOWELMENTS}    dl_dst=ff:ff:29:01:19:61    table=2    dl_src=00:00:00:11:23:ae    dec_mpls_ttl    mpls    mpls_label=567    mpls_tc=3
+...               mpls_bos=1    # mpls_label=567,mpls_tc=3,mpls_bos=1
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/317__eth_ipv6.txt b/test/csit/suites/karaf-all/070__Flows_OF13/317__eth_ipv6.txt
new file mode 100644 (file)
index 0000000..c8de82f
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for IPv6
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f18.xml
+${FLOW}           141
+${TABLE}          2
+@{FLOWELMENTS}    ipv6    ipv6_src=fe80::2acf:e9ff:fe21:6431,    ipv6_dst=aabb:1234:2acf:e9ff::/64    dec_ttl
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/318__metadata.txt b/test/csit/suites/karaf-all/070__Flows_OF13/318__metadata.txt
new file mode 100644 (file)
index 0000000..ef5daef
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for metadata
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f19.xml
+${FLOW}           142
+${TABLE}          2
+@{FLOWELMENTS}    metadata=0x3039    IN_PORT
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/319__metadata_mask.txt b/test/csit/suites/karaf-all/070__Flows_OF13/319__metadata_mask.txt
new file mode 100644 (file)
index 0000000..7958869
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for metadata and mask
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f20.xml
+${FLOW}           143
+${TABLE}          2
+@{FLOWELMENTS}    metadata=0x1010/0x12d692    LOCAL
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/320__ipv6_meta_qos_udp.txt b/test/csit/suites/karaf-all/070__Flows_OF13/320__ipv6_meta_qos_udp.txt
new file mode 100644 (file)
index 0000000..f76fc6f
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for metadata and mask
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f21.xml
+${FLOW}           144
+${TABLE}          2
+@{FLOWELMENTS}    metadata=0x3039    udp6    ipv6    ipv6_dst=fe80::2acf:e9ff:fe21:6431    nw_tos=32    nw_ecn=3    tp_src=25364
+...               tp_dst=8080    ipv6_src=1234:5678:9abc:def0:fdc0::/76    dec_ttl
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/321__ipv6_meta_qos_tcp.txt b/test/csit/suites/karaf-all/070__Flows_OF13/321__ipv6_meta_qos_tcp.txt
new file mode 100644 (file)
index 0000000..8bf00b5
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for metadata and mask
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f22.xml
+${FLOW}           145
+${TABLE}          2
+@{FLOWELMENTS}    metadata=0x3039    tcp6    ipv6    ipv6_dst=fe80:2acf:e9ff:fe21::/94    nw_tos=240    nw_ecn=3    tp_src=183
+...               tp_dst=8080    ipv6_src=1234:5678:9abc:def0:fdc0::/76    dec_ttl
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/322__ipv6_flow.txt b/test/csit/suites/karaf-all/070__Flows_OF13/322__ipv6_flow.txt
new file mode 100644 (file)
index 0000000..e681048
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IPv6 flow labelk
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f23.xml
+${FLOW}           146
+${TABLE}          2
+@{FLOWELMENTS}    metadata=0x3039    tcp6    ipv6    ipv6_dst=fe80:2acf:e9ff:fe21::/94    nw_tos=240    nw_ecn=3    tp_src=183
+...               tp_dst=8080    ipv6_src=1234:5678:9abc:def0:fdc0::/76    dec_ttl    ipv6_label=0x00021
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/323__tunnel.txt b/test/csit/suites/karaf-all/070__Flows_OF13/323__tunnel.txt
new file mode 100644 (file)
index 0000000..0c9dddb
--- /dev/null
@@ -0,0 +1,68 @@
+*** Settings ***
+Documentation     Test suite for Tunnel ID
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f24.xml
+${FLOW}           147
+${TABLE}          2
+@{FLOWELMENTS}    tun_id=0xa1f    TABLE
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/324__ipv6_flow_label.txt b/test/csit/suites/karaf-all/070__Flows_OF13/324__ipv6_flow_label.txt
new file mode 100644 (file)
index 0000000..d2bf2f9
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for IPv6 Flow label and ICMP type
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CON}       /restconf/config/opendaylight-inventory:nodes
+${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
+${FILE}           ${CURDIR}/../../../variables/xmls/f25.xml
+${FLOW}           148
+${TABLE}          2
+@{FLOWELMENTS}    icmp6    metadata=0x3039    ipv6_src=1234:5678:9abc:def0:fdc0::/76    ipv6_dst=fe80:2acf:e9ff:fe21::/94    dec_ttl    ipv6_label=0x00021    nw_tos=240
+...               nw_ecn=3    icmp_type=6    icmp_code=3    # ipv6_dst=fe80:2acf:e9ff:fe21::/94
+
+*** Test Cases ***
+Add a flow - Output to physical port#
+    [Documentation]    Push a flow through REST-API
+    [Tags]    Push
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Set Suite Variable    ${body}
+    ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after adding flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    compare xml    ${body}    ${resp.content}
+
+Verify flows after adding flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Contain    ${switchouput}    ${flowElement}
+
+Remove a flow - Output to physical port#
+    [Documentation]    Remove a flow
+    [Tags]    remove
+    ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
+    Should Be Equal As Strings    ${resp.status_code}    200
+
+Verify after deleting flow config - Output to physical port#
+    [Documentation]    Verify the flow
+    [Tags]    Get
+    ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
+    Should Not Contain    ${resp.content}    ${FLOW}
+
+Verify flows after deleting flow config on OVS
+    [Documentation]    Checking Flows on switch
+    [Tags]    Switch
+    Sleep    1
+    write    dpctl dump-flows -O OpenFlow13
+    ${body}    OperatingSystem.Get File    ${FILE}
+    Sleep    1
+    ${switchouput}    Read
+    : FOR    ${flowElement}    IN    @{FLOWELMENTS}
+    \    should Not Contain    ${switchouput}    ${flowElement}
diff --git a/test/csit/suites/karaf-all/070__Flows_OF13/__init__.txt b/test/csit/suites/karaf-all/070__Flows_OF13/__init__.txt
new file mode 100644 (file)
index 0000000..c4c6f00
--- /dev/null
@@ -0,0 +1,26 @@
+*** Settings ***
+Documentation     Test suite for the OpenDaylight base edition with of10
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Library           SSHLibrary
+
+*** Variables ***
+${start}          sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,1 --switch ovsk,protocols=OpenFlow13
+
+*** Keywords ***
+Start Suite
+    Log    Start the test on the base edition
+    Open Connection    ${MININET}    prompt=>
+    Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any
+    Write    sudo ovs-vsctl set-manager ptcp:6644
+    Write    sudo mn -c
+    Read Until  > 
+    Write    ${start}
+    Read Until  mininet>
+
+Stop Suite
+    Log    Stop the test on the base edition
+    Read
+    Write    exit
+    Read Until  >
+    Close Connection
diff --git a/test/csit/suites/karaf-all/080__Inventory_Performance/010__restconf_inventory.txt b/test/csit/suites/karaf-all/080__Inventory_Performance/010__restconf_inventory.txt
new file mode 100644 (file)
index 0000000..45b98ea
--- /dev/null
@@ -0,0 +1,57 @@
+*** Settings ***
+Documentation     Test suite for RESTCONF inventory
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
+
+
+*** Test Cases *** 
+Get list of nodes
+    [Documentation]    Get the inventory
+       ${resp}    Get    session    ${REST_CONTEXT}
+    Should Be Equal As Strings    ${resp.status_code}    200
+       ${TOPO_TREE_DEPTH}    Convert To Integer  ${TOPO_TREE_DEPTH}
+       ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+       ${numnodes}             Num Of Nodes    ${TOPO_TREE_DEPTH}      ${TOPO_TREE_FANOUT}
+       :FOR    ${IND}  IN RANGE        1       ${numnodes+1}   
+    \   Should Contain     ${resp.content}  openflow:${IND}
+
+Get nodeconnector for the root node 
+    [Documentation]    Get the inventory for the root node
+    ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+    ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
+    Should Be Equal As Strings   ${resp.status_code}    200
+    Check conn loop   ${TOPO_TREE_FANOUT}   1  ${resp.content}
+
+Get nodeconnector for a node 
+    [Documentation]    Get the inventory for a node
+    ${TOPO_TREE_DEPTH}    Convert To Integer  ${TOPO_TREE_DEPTH}
+    ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+    ${numnodes}     Num Of Nodes    ${TOPO_TREE_DEPTH}    ${TOPO_TREE_FANOUT}
+    :FOR    ${IND}  IN RANGE    2   ${numnodes+1}
+    \   ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:${IND}
+    \   Should Be Equal As Strings   ${resp.status_code}    200
+    \   Check conn loop   ${TOPO_TREE_FANOUT+1}   ${IND}  ${resp.content}
+
+Get Stats for a node
+    [Documentation]    Get the stats for a node
+    ${TOPO_TREE_DEPTH}    Convert To Integer  ${TOPO_TREE_DEPTH}
+    ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+    ${numnodes}     Num Of Nodes    ${TOPO_TREE_DEPTH}    ${TOPO_TREE_FANOUT}
+    :FOR    ${IND}  IN RANGE    1   ${numnodes+1}
+    \   ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:${IND}
+    \   Should Be Equal As Strings   ${resp.status_code}    200
+    \   Should Contain     ${resp.content}      opendaylight-port-statistics
+    \   Should Contain     ${resp.content}      opendaylight-flow-table-statistics
+
+*** Keywords ***
+Check conn loop
+    [Arguments]     ${arg}  ${outerind}     ${content}
+    :FOR    ${var}  IN RANGE    1   ${arg+1}
+    \   Should Contain     ${content}      openflow:${outerind}:${var}
diff --git a/test/csit/suites/karaf-all/080__Inventory_Performance/020__switch_manager.txt b/test/csit/suites/karaf-all/080__Inventory_Performance/020__switch_manager.txt
new file mode 100644 (file)
index 0000000..841a85d
--- /dev/null
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation     Test suite for Switch Manager
+Suite Setup       Create Session    ${ODL_CONTROLLER_SESSION}    http://${CONTROLLER}:${RESTPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           RequestsLibrary
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/SwitchManager.py
+Variables         ../../../variables/Variables.py
+Library           ../../../libraries/Topologynew.py
+
+*** Variables ***
+${REST_CONTEXT}    /controller/nb/v2/switchmanager
+
+*** Test Cases ***
+
+List all nodes
+    [Documentation]    List all nodes and their properties in the network.
+    [Tags]    list_info
+    Log    ${TOPO_TREE_LEVEL}
+    ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/nodes
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    ${jsondata}=    To JSON    ${resp.content}
+    ${nodes}    Extract All Nodes    ${jsondata}
+    List Should Contain Sublist   ${nodes}    ${topo_nodes}
+
+Check root node connectors 
+    [Documentation]    List node connectors and verify all connectors are there
+    [Tags]    list_info
+    ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
+    Should Be Equal As Strings    ${resp.status_code}    200    Response   status code error
+    ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+    Check conn loop     ${TOPO_TREE_FANOUT}   1   ${resp.content}
+
+Check node i connectors              
+    [Documentation]    List node connectors and verify all connectors are there                      
+    [Tags]    list_info
+    ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})   1
+    :FOR    ${ITEM}  IN     @{topo_nodes}
+    \   ${IND}  Get From Dictionary    ${ITEM}    id
+    \   ${resp}    Get    ${ODL_CONTROLLER_SESSION}    ${REST_CONTEXT}/default/node/OF/${IND}
+    \   Should Be Equal As Strings   ${resp.status_code}    200
+    \   Check conn loop   ${TOPO_TREE_FANOUT+1}   ${IND}  ${resp.content}
+
+*** Keywords ***
+Check conn loop
+    [Arguments]     ${arg}  ${outerind}     ${content}
+    :FOR    ${var}  IN RANGE    0   ${arg+1}
+    \   Should Contain     ${content}      "id":"${var}"
+
diff --git a/test/csit/suites/karaf-all/080__Inventory_Performance/030__statistics_manager.txt b/test/csit/suites/karaf-all/080__Inventory_Performance/030__statistics_manager.txt
new file mode 100644 (file)
index 0000000..790e59a
--- /dev/null
@@ -0,0 +1,48 @@
+*** Settings ***
+Documentation     Test suite for Statistics Manager
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/Topologynew.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${nodeprefix}   openflow:
+${key}             portStatistics
+${REST_CONTEXT}    /controller/nb/v2/statistics
+
+*** Test Cases ***
+get port stats
+    [Documentation]    Show port stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/port
+    Should Be Equal As Strings    ${resp.status_code}    200 
+       ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})   1
+    Should Contain X Times   ${resp.content}    "00:00:00:00:00:00:00:01"      ${TOPO_TREE_FANOUT+2}    
+    :FOR    ${ITEM}  IN        @{topo_nodes}
+    \   ${IND}  Get From Dictionary    ${ITEM}    id
+    \   Should Contain X Times   ${resp.content}    "${IND}"    ${TOPO_TREE_FANOUT+3}
+
+get flow stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/flow
+    Should Be Equal As Strings    ${resp.status_code}    200 
+       ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
+    :FOR    ${ITEM}  IN     @{topo_nodes}
+    \   ${IND}  Get From Dictionary    ${ITEM}    id
+    \   Should Contain    ${resp.content}    "${IND}"
+
+get table stats
+    [Documentation]    Show flow stats and validate result
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/table
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
+    :FOR    ${ITEM}  IN     @{topo_nodes}
+    \   ${IND}  Get From Dictionary    ${ITEM}    id
+    \   Should Contain    ${resp.content}    "${IND}"
+
diff --git a/test/csit/suites/karaf-all/080__Inventory_Performance/040__topology_manager.txt b/test/csit/suites/karaf-all/080__Inventory_Performance/040__topology_manager.txt
new file mode 100644 (file)
index 0000000..d510c46
--- /dev/null
@@ -0,0 +1,32 @@
+*** Settings ***
+Documentation     Test suite for Topology Manager
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/Topologynew.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${nodeprefix}   openflow:
+${REST_CONTEXT}    /controller/nb/v2/topology
+
+*** Test Cases ***
+Get Topology
+    [Documentation]    Get Topology and validate the result.
+    [Tags]    get
+    ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
+    Should Be Equal As Strings    ${resp.status_code}    200 
+    Log    ${resp.content}
+    ${TOPO_TREE_DEPTH}    Convert To Integer  ${TOPO_TREE_DEPTH}
+    ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+    Should Contain X Times  ${resp.content}   "00:00:00:00:00:00:00:01"   ${TOPO_TREE_FANOUT*2}
+    ${leaflist}    Get Ids Of Leaf Nodes    ${TOPO_TREE_FANOUT}   ${TOPO_TREE_DEPTH} 
+    ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})   1
+    :FOR    ${ITEM}  IN     @{topo_nodes}
+    \   ${IND}  Get From Dictionary    ${ITEM}    id
+    \   ${linkcnt}      Num Of Links For Node       ${IND}      ${leaflist}     ${TOPO_TREE_FANOUT}
+    \   Should Contain X Times  ${resp.content}     "${IND}"    ${linkcnt*2}   
+
+
diff --git a/test/csit/suites/karaf-all/080__Inventory_Performance/050__ping_test.txt b/test/csit/suites/karaf-all/080__Inventory_Performance/050__ping_test.txt
new file mode 100644 (file)
index 0000000..2046341
--- /dev/null
@@ -0,0 +1,22 @@
+*** Settings ***
+Documentation     Test suite for do pingall test
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+
+*** Test Cases ***
+Ping all
+    [Documentation]    Do ping all test, verify no packet loss
+    [Tags]   pingall
+       ${TOPO_TREE_DEPTH}    Convert To Integer  ${TOPO_TREE_DEPTH}
+    ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
+       ${numnodes}             Num Of Nodes            ${TOPO_TREE_DEPTH}      ${TOPO_TREE_FANOUT}
+       Write   pingall
+    Sleep   ${numnodes}
+    ${result}    Read
+    Should Not Contain   ${result}     X  
+
diff --git a/test/csit/suites/karaf-all/080__Inventory_Performance/__init__.txt b/test/csit/suites/karaf-all/080__Inventory_Performance/__init__.txt
new file mode 100644 (file)
index 0000000..b295c01
--- /dev/null
@@ -0,0 +1,36 @@
+*** Settings ***
+Documentation     Test suite for MD-SAL NSF
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Library     SSHLibrary
+Library       ../../../libraries/Common.py
+Variables     ../../../variables/Variables.py
+
+*** Variables ***
+
+${start}=  sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}
+
+** Keywords ***
+Start Suite  
+    Log    Start mininet
+    ${TOPO_TREE_DEPTH}    Convert To Integer    ${TOPO_TREE_DEPTH}
+    ${TOPO_TREE_FANOUT}    Convert To Integer    ${TOPO_TREE_FANOUT}
+    ${numnodes}     Num Of Nodes    ${TOPO_TREE_DEPTH}  ${TOPO_TREE_FANOUT}
+    Open Connection    ${MININET}     prompt=>
+    Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa   any 
+    Write    sudo ovs-vsctl set-manager ptcp:6644
+    Write    sudo mn -c
+    Sleep    2
+    Write    ${start}
+    Sleep    ${numnodes*2+30}
+    Read
+Stop Suite
+    Log    Stop mininet
+    ${TOPO_TREE_DEPTH}    Convert To Integer    ${TOPO_TREE_DEPTH}
+    ${TOPO_TREE_FANOUT}    Convert To Integer    ${TOPO_TREE_FANOUT}
+    ${numnodes}     Num Of Nodes    ${TOPO_TREE_DEPTH}  ${TOPO_TREE_FANOUT}
+    Read
+    Write    exit 
+    Sleep    ${numnodes*2}
+    Read 
+    Close Connection 
diff --git a/test/csit/suites/karaf-all/090__OVSDB/010__bridge_domain.txt b/test/csit/suites/karaf-all/090__OVSDB/010__bridge_domain.txt
new file mode 100644 (file)
index 0000000..04f7459
--- /dev/null
@@ -0,0 +1,123 @@
+*** Settings ***
+Documentation     Test suite for OVSDB Bridge Domain
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/Topology.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${key}             node
+${REST_CONTEXT_CM}    /controller/nb/v2/connectionmanager
+${REST_CONTEXT_BD}    /controller/nb/v2/networkconfig/bridgedomain
+
+*** Test Cases ***
+List connections
+    [Documentation]    Get node connections and validate result
+    [Tags]    ovsdb
+    ${topo_nodes}    Get Nodes From Topology    ${TOPO_TREE_LEVEL}
+    ${resp}    Get    session    ${REST_CONTEXT_CM}/nodes
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${nodes}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Sublist   ${nodes}    ${topo_nodes}
+Connect to mininet
+    [Documentation]    Connect to mininet, list the nodes and validate result
+    [Tags]    ovsdb
+    ${body}   Create Dictionary   type   OVS   id   MININET
+    ${resp}   Put   session   ${REST_CONTEXT_CM}/node/MININET/address/${MININET}/port/6644
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    Dictionaries Should Be Equal    ${result}   ${body}
+    ${resp}    Get    session    ${REST_CONTEXT_CM}/nodes
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+    Sleep   2
+Add bridge s4
+    [Documentation]    Add bridge s4
+    [Tags]    ovsdb
+    ${resp}    Post    session    ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4  data={}
+    Should Be Equal As Strings    ${resp.status_code}    201
+Delete s1 ports
+    [Documentation]    Delete s1 connected ports
+    [Tags]    ovsdb
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+Add s4 ports 
+    [Documentation]    Add s4 connected ports
+    [Tags]    ovsdb
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1   
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2 
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s4-eth1"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s4-eth2"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+Ping h1 to h4
+    [Documentation]    Ping h1 to h4, verify no packet loss
+    [Tags]   ovsdb
+    Sleep   5
+    Write   h1 ping -w 10 h4
+    Sleep   10
+    Write   h4 ping -w 10 h1
+    Sleep   10
+    ${result}    Read
+    Should Contain   ${result}   64 bytes
+Delete s4 ports
+    [Documentation]    Delete s4 connected ports
+    [Tags]    ovsdb
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+Add s1 ports 
+    [Documentation]    Add s1 connected ports
+    [Tags]    ovsdb
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s1-eth1"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s1-eth2"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+Delete bridge s4
+    [Documentation]    Delete bridge s4
+    [Tags]    ovsdb
+    ${resp}    Delete    session    ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4
+    Should Be Equal As Strings    ${resp.status_code}    200
+Disconnect mininet
+    [Documentation]    Disconnect mininet, list the nodes and validate result
+    [Tags]    ovsdb
+    ${body}   Create Dictionary   type   OVS   id   MININET
+    ${resp}   Delete   session   ${REST_CONTEXT_CM}/node/OVS/MININET
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${resp}    Get    session    ${REST_CONTEXT_CM}/nodes
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
diff --git a/test/csit/suites/karaf-all/090__OVSDB/__init__.txt b/test/csit/suites/karaf-all/090__OVSDB/__init__.txt
new file mode 100644 (file)
index 0000000..2783064
--- /dev/null
@@ -0,0 +1,27 @@
+*** Settings ***
+Documentation     Test suite for OVSDB
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Library     SSHLibrary
+
+*** Variables ***
+${start}=   sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 
+
+** Keywords ***
+Start Suite  
+    Log    Start mininet
+    Open Connection   ${MININET}     prompt=>
+    Login With Public Key    ${MININET_USER}   ${USER_HOME}/.ssh/id_rsa   any 
+    Write    sudo ovs-vsctl set-manager ptcp:6644
+    Write    sudo mn -c
+    Sleep    2
+    Write    ${start}
+    Sleep    20
+    Read
+Stop Suite
+    Log    Stop mininet
+    Read
+    Write    exit 
+    Sleep    6
+    Read 
+    Close Connection 
diff --git a/test/csit/suites/karaf-all/100__OVSDB_OF13/010__bridge_domain.txt b/test/csit/suites/karaf-all/100__OVSDB_OF13/010__bridge_domain.txt
new file mode 100644 (file)
index 0000000..04f7459
--- /dev/null
@@ -0,0 +1,123 @@
+*** Settings ***
+Documentation     Test suite for OVSDB Bridge Domain
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/Topology.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${key}             node
+${REST_CONTEXT_CM}    /controller/nb/v2/connectionmanager
+${REST_CONTEXT_BD}    /controller/nb/v2/networkconfig/bridgedomain
+
+*** Test Cases ***
+List connections
+    [Documentation]    Get node connections and validate result
+    [Tags]    ovsdb
+    ${topo_nodes}    Get Nodes From Topology    ${TOPO_TREE_LEVEL}
+    ${resp}    Get    session    ${REST_CONTEXT_CM}/nodes
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${nodes}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Sublist   ${nodes}    ${topo_nodes}
+Connect to mininet
+    [Documentation]    Connect to mininet, list the nodes and validate result
+    [Tags]    ovsdb
+    ${body}   Create Dictionary   type   OVS   id   MININET
+    ${resp}   Put   session   ${REST_CONTEXT_CM}/node/MININET/address/${MININET}/port/6644
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    Dictionaries Should Be Equal    ${result}   ${body}
+    ${resp}    Get    session    ${REST_CONTEXT_CM}/nodes
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Contain Value    ${content}    ${body}
+    Sleep   2
+Add bridge s4
+    [Documentation]    Add bridge s4
+    [Tags]    ovsdb
+    ${resp}    Post    session    ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4  data={}
+    Should Be Equal As Strings    ${resp.status_code}    201
+Delete s1 ports
+    [Documentation]    Delete s1 connected ports
+    [Tags]    ovsdb
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+Add s4 ports 
+    [Documentation]    Add s4 connected ports
+    [Tags]    ovsdb
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1   
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2 
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s4-eth1"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s4-eth2"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+Ping h1 to h4
+    [Documentation]    Ping h1 to h4, verify no packet loss
+    [Tags]   ovsdb
+    Sleep   5
+    Write   h1 ping -w 10 h4
+    Sleep   10
+    Write   h4 ping -w 10 h1
+    Sleep   10
+    ${result}    Read
+    Should Contain   ${result}   64 bytes
+Delete s4 ports
+    [Documentation]    Delete s4 connected ports
+    [Tags]    ovsdb
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    Delete   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    Should Be Equal As Strings    ${resp.status_code}    200
+Add s1 ports 
+    [Documentation]    Add s1 connected ports
+    [Tags]    ovsdb
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s1-eth1"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+    ${resp}   Post   session   ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3
+    ...   data={"type":"patch", "CUSTOM":{"peer":"s1-eth2"}}
+    Should Be Equal As Strings    ${resp.status_code}    201
+Delete bridge s4
+    [Documentation]    Delete bridge s4
+    [Tags]    ovsdb
+    ${resp}    Delete    session    ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4
+    Should Be Equal As Strings    ${resp.status_code}    200
+Disconnect mininet
+    [Documentation]    Disconnect mininet, list the nodes and validate result
+    [Tags]    ovsdb
+    ${body}   Create Dictionary   type   OVS   id   MININET
+    ${resp}   Delete   session   ${REST_CONTEXT_CM}/node/OVS/MININET
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${resp}    Get    session    ${REST_CONTEXT_CM}/nodes
+    Should Be Equal As Strings   ${resp.status_code}   200
+    ${result}    To JSON    ${resp.content}
+    ${content}    Get From Dictionary    ${result}    ${key}
+    List Should Not Contain Value    ${content}    ${body}
diff --git a/test/csit/suites/karaf-all/100__OVSDB_OF13/__init__.txt b/test/csit/suites/karaf-all/100__OVSDB_OF13/__init__.txt
new file mode 100644 (file)
index 0000000..a6e6479
--- /dev/null
@@ -0,0 +1,27 @@
+*** Settings ***
+Documentation     Test suite for OVSDB mininet OF13
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Library     SSHLibrary
+
+*** Variables ***
+${start}=   sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13 
+
+** Keywords ***
+Start Suite  
+    Log    Start mininet
+    Open Connection   ${MININET}     prompt=>
+    Login With Public Key    ${MININET_USER}   ${USER_HOME}/.ssh/id_rsa   any 
+    Write    sudo ovs-vsctl set-manager ptcp:6644
+    Write    sudo mn -c
+    Sleep    2
+    Write    ${start}
+    Sleep    20
+    Read
+Stop Suite
+    Log    Stop mininet
+    Read
+    Write    exit 
+    Sleep    6
+    Read 
+    Close Connection