Changing extension from .txt to .robot
[integration/test.git] / test / csit / suites / l2switch / Loop_Removal_OF13 / 010__loop_of_3.robot
diff --git a/test/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot b/test/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot
new file mode 100644 (file)
index 0000000..18d52ae
--- /dev/null
@@ -0,0 +1,47 @@
+*** Settings ***
+Documentation     Test suite for Ring/Loop topology of size 3
+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 opendaylight-inventory
+    [Documentation]    Get all nodes and all link states (forwarding/discarding)
+       ${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
+        Should Contain X Times    ${resp.content}   forwarding  4
+        Should Contain X Times    ${resp.content}   discarding  2
+
+Get nodeconnectors for node 1
+    [Documentation]    Get the inventory for node 1
+        ${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
+        Should Contain     ${resp.content}      openflow:1:3
+
+Get nodeconnectors for node 2
+    [Documentation]    Get the inventory for node 2
+        ${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 nodeconnectors for node 3
+    [Documentation]    Get the inventory for node 3
+        ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:3
+        Should Be Equal As Strings   ${resp.status_code}    200
+        Should Contain     ${resp.content}      openflow:3:1
+        Should Contain     ${resp.content}      openflow:3:2
+        Should Contain     ${resp.content}      openflow:3:3
+