Update Robot Framework format - step 13
[integration/test.git] / csit / suites / ovsdb / Southbound_Domain / 020__connection_manager.robot
index 301f8a7711ce72cc7fc0753979f6a2c4629cbf31..04de1db840bc36e032044e7673e5d40a8c16be2c 100644 (file)
@@ -1,21 +1,26 @@
 *** Settings ***
-Documentation     Test suite for Connection Manager
-Suite Setup       OVSDB.Suite Setup
-Suite Teardown    Suite Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Force Tags        Southbound
-Library           RequestsLibrary
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OVSDB.robot
-Resource          ../../../variables/Variables.robot
-Resource          ../../../variables/ovsdb/Variables.robot
+Documentation       Test suite for Connection Manager
+
+Library             RequestsLibrary
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/Utils.robot
+Resource            ../../../libraries/OVSDB.robot
+Resource            ../../../variables/Variables.robot
+Resource            ../../../variables/ovsdb/Variables.robot
+
+Suite Setup         OVSDB.Suite Setup
+Suite Teardown      Suite Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Force Tags          southbound
+
 
 *** Variables ***
-${BRIDGE1}        ovscon_br1
-${BRIDGE2}        ovscon_br2
-@{NODE_LIST}      ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT}    ${TOOLS_SYSTEM_IP}    ${OVSDB_NODE_PORT}
-${OVSDB_UUID}     ${EMPTY}
+${BRIDGE1}          ovscon_br1
+${BRIDGE2}          ovscon_br2
+@{NODE_LIST}        ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT}    ${TOOLS_SYSTEM_IP}    ${OVSDB_NODE_PORT}
+${OVSDB_UUID}       ${EMPTY}
+
 
 *** Test Cases ***
 Connecting an OVS instance to the controller
@@ -26,7 +31,13 @@ Connecting an OVS instance to the controller
 Get Operational Topology to verify the ovs instance is connected to the controller
     [Documentation]    This request will fetch the operational topology from the connected OVSDB nodes
     @{list} =    BuiltIn.Create List    ovsdb://uuid    "remote-ip":"${TOOLS_SYSTEM_IP}"    "local-port":${OVSDBPORT}
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
     ${OVSDB_UUID} =    OVSDB.Get OVSDB UUID    ${TOOLS_SYSTEM_IP}
     BuiltIn.Set Suite Variable    ${OVSDB_UUID}
 
@@ -40,7 +51,13 @@ Create bridge manually
 Get Operational Topology to verify the bridge has been added
     [Documentation]    This request will fetch the operational topology from the connected OVSDB nodes
     @{list} =    BuiltIn.Create List    ${BRIDGE1}
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
 
 Get Config Topology to verify the manually added bridge is not added to the config datastore
     [Documentation]    This request will fetch the configuration topology from configuration data store
@@ -56,7 +73,13 @@ Create a Bridge through controller
 Get Operational Topology to verify the bridge has been added through rest call
     [Documentation]    This request will fetch the operational topology from the connected OVSDB nodes
     @{list} =    BuiltIn.Create List    ${BRIDGE2}
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
 
 Get Config Topology to verify the entry added to the config datastore
     [Documentation]    This request will fetch the configuration topology from configuration data store
@@ -82,7 +105,13 @@ Delete bridge manually
 Get Operational Topology to verify the bridge has been deleted manually
     [Documentation]    This request will fetch the operational topology from the connected OVSDB nodes
     @{list} =    BuiltIn.Create List    ${BRIDGE2}
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements Not At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
 
 Config Topology Still Contains Bridge
     [Documentation]    This request will fetch the configuration topology from configuration data store
@@ -93,13 +122,21 @@ Config Topology Still Contains Bridge
 
 Delete the Bridge through rest call
     [Documentation]    This request will delete the bridge node from the config data store.
-    ${resp} =    RequestsLibrary.Delete Request    session    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE2}
+    ${resp} =    RequestsLibrary.Delete Request
+    ...    session
+    ...    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE2}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    204
 
 Get Operational Topology after Deletion of Bridge
     [Documentation]    This request will fetch the operational topology after the Bridge is deleted
     @{list} =    BuiltIn.Create List    ${BRIDGE2}
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements Not At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
 
 Trunk And Vlan Tag Is Removed From Operational
     [Documentation]    Verify that when the vlan tag is added and removed from an ovs port, it should be accurately reflected
@@ -113,34 +150,64 @@ Trunk And Vlan Tag Is Removed From Operational
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set port vlan-tag-port trunks=[181,182]
     BuiltIn.Wait Until Keyword Succeeds    5s    1s    OVSDB.Verify OVS Reports Connected
     OVSDB.Collect OVSDB Debugs
-    @{list}    BuiltIn.Create List    vlan-tag-br    vlan-tag-port    "ovsdb:vlan-tag":81    "trunk":181    "trunk":182
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    @{list} =    BuiltIn.Create List
+    ...    vlan-tag-br
+    ...    vlan-tag-port
+    ...    "ovsdb:vlan-tag":81
+    ...    "trunk":181
+    ...    "trunk":182
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl clear port vlan-tag-port tag
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl remove port vlan-tag-port trunks 181
-    @{list}    BuiltIn.Create List    "ovsdb:vlan-tag":81    "trunk":181
+    @{list}    BuiltIn.Create List    "ovsdb:vlan-tag":81    "trunk":181
     OVSDB.Collect OVSDB Debugs
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements Not At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl clear port vlan-tag-port trunks
-    @{list}    BuiltIn.Create List    "ovsdb:vlan-tag":81    "trunk":181    "trunk":182
+    @{list}    BuiltIn.Create List    "ovsdb:vlan-tag":81    "trunk":181    "trunk":182
     OVSDB.Collect OVSDB Debugs
-    BuiltIn.Wait Until Keyword Succeeds    8s    2s    Utils.Check For Elements Not At URI    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}    ${list}    pretty_print_json=True
+    BuiltIn.Wait Until Keyword Succeeds
+    ...    8s
+    ...    2s
+    ...    Utils.Check For Elements Not At URI
+    ...    ${RFC8040_OPERATIONAL_TOPO_OVSDB1_API}
+    ...    ${list}
+    ...    pretty_print_json=True
     [Teardown]    Builtin.Run Keywords    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
     ...    AND    Utils.Report_Failure_Due_To_Bug    OVSDB-413
 
 Check For Bug 4756
     [Documentation]    bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
     ...    case executed.
-    Utils.Check Karaf Log File Does Not Have Messages    ${ODL_SYSTEM_IP}    SimpleShardDataTreeCohort.*Unexpected failure in validation phase
+    Utils.Check Karaf Log File Does Not Have Messages
+    ...    ${ODL_SYSTEM_IP}
+    ...    SimpleShardDataTreeCohort.*Unexpected failure in validation phase
     [Teardown]    Utils.Report_Failure_Due_To_Bug    4756
 
 Check For Bug 4794
     [Documentation]    bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
     ...    case executed.
-    Utils.Check Karaf Log File Does Not Have Messages    ${ODL_SYSTEM_IP}    Shard.*shard-topology-operational An exception occurred while preCommitting transaction
+    Utils.Check Karaf Log File Does Not Have Messages
+    ...    ${ODL_SYSTEM_IP}
+    ...    Shard.*shard-topology-operational An exception occurred while preCommitting transaction
     [Teardown]    Utils.Report_Failure_Due_To_Bug    4794
 
+
 *** Keywords ***
 Suite Teardown
     [Documentation]    Cleans up test environment, close existing sessions.
-    @{uris} =    Builtin.Create List    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE1}    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE2}
+    @{uris} =    Builtin.Create List
+    ...    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE1}
+    ...    ${RFC8040_SOUTHBOUND_NODE_API}uuid%2F${OVSDB_UUID}%2Fbridge%2F${BRIDGE2}
     OVSDB.Suite Teardown    ${uris}