Upgrade RF syntax for v3.2 compatibility
[integration/test.git] / csit / suites / netvirt / elan / elan_service_recovery.robot
index 0eb81c56cd58fc7e71c07167bbd1f65c04e524ab..14b9829af5345fa065cae4457109700a1c7c1e09 100644 (file)
@@ -1,6 +1,6 @@
 *** Settings ***
 Documentation     Test Suite for elan interface and service recovery
-Suite Setup       Start Suite
+Suite Setup       Suite Setup
 Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     OpenStackOperations.Get Test Teardown Debugs
@@ -32,8 +32,8 @@ ${NUM_OF_PORTS_PER_HOST}    2
 *** Test Cases ***
 To Verify ELAN Service Recovery
     [Documentation]    To Verify Elan Service recovery by deleting and recovering multiple flows
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_2_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[2]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[2]    actions=goto_table:${ELAN_DMACTABLE}
     ${flow_id} =    FlowLib.Get Flow Id    ${DPNID_1}    ${ELAN_SMAC_TABLE}    @{PORT_MAC_ADDR}[0]
     FlowLib.Delete Flow Via Restconf    ${DPNID_1}    ${ELAN_SMAC_TABLE}    ${flow_id}
     ${flow_id} =    FlowLib.Get Flow Id    ${DPNID_2}    ${ELAN_SMAC_TABLE}    @{PORT_MAC_ADDR}[2]
@@ -42,13 +42,13 @@ To Verify ELAN Service Recovery
     Utils.Check For Elements Not At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
     ${mac_elements} =    BuiltIn.Create List    @{PORT_MAC_ADDR}[2]
     Utils.Check For Elements Not At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_2}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ELAN_SMAC_TABLE}    False
+    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    False
     ...    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]
-    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_2_IP}    ${ELAN_SMAC_TABLE}    False
+    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ELAN_SMAC_TABLE}    False
     ...    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[2]
     KarafKeywords.Issue Command On Karaf Console    ${SERVICE-STATUS-CLI}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_2_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[2]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP2_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[2]    actions=goto_table:${ELAN_DMACTABLE}
     ${mac_elements} =    BuiltIn.Create List    @{PORT_MAC_ADDR}[0]
     Utils.Check For Elements At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
     ${mac_elements} =    BuiltIn.Create List    @{PORT_MAC_ADDR}[2]
@@ -56,23 +56,23 @@ To Verify ELAN Service Recovery
 
 To Verify Elan Interface recovery
     [Documentation]    To Verify the Elan Interface recovery by deleting single Flow
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ELAN_SMAC_TABLE}    True
+    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True
     ...    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
     ${flow_id} =    FlowLib.Get Flow Id    ${DPNID_1}    ${ELAN_SMAC_TABLE}    @{PORT_MAC_ADDR}[0]
     FlowLib.Delete Flow Via Restconf    ${DPNID_1}    ${ELAN_SMAC_TABLE}    ${flow_id}
     ${mac_elements} =    BuiltIn.Create List    @{PORT_MAC_ADDR}[0]
     Utils.Check For Elements Not At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
-    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ELAN_SMAC_TABLE}    False
+    BuiltIn.Wait Until Keyword Succeeds    60s    15s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    False
     ...    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]
     ${elan_instance_id} =    Get Elan Instance ID
     ${elan_interface_id} =    Get Elan Interfaces ID    ${elan_instance_id}    @{PORT_MAC_ADDR}[0]
     Recover Elan Flows    ${elan_interface_id}
     ${mac_elements} =    BuiltIn.Create List    @{PORT_MAC_ADDR}[0]
     BuiltIn.Wait Until Keyword Succeeds    10s    5s    Utils.Check For Elements At URI    ${CONFIG_NODES_API}/node/openflow:${DPNID_1}/table/${ELAN_SMAC_TABLE}    ${mac_elements}
-    OVSDB.Verify Dump Flows For Specific Table    ${OS_COMPUTE_1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
+    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${ELAN_SMAC_TABLE}    True    ${EMPTY}    dl_src=@{PORT_MAC_ADDR}[0]    actions=goto_table:${ELAN_DMACTABLE}
 
 *** Keywords ***
-Start Suite
+Suite Setup
     [Documentation]    Test Suite for Elan interface and service recovery
     OpenStackOperations.OpenStack Suite Setup
     Create Setup
@@ -81,22 +81,24 @@ Start Suite
 
 Create Neutron Ports
     [Documentation]    Create required number of ports under previously created subnets
-    : FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_HOST}
-    \    OpenStackOperations.Create Port    ${REQ_NETWORK}    @{PORT_LIST}[${index}]    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Port    ${REQ_NETWORK}    @{PORT_LIST}[${index + 2}]    sg=${SECURITY_GROUP}
+    FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_HOST}
+        OpenStackOperations.Create Port    ${REQ_NETWORK}    @{PORT_LIST}[${index}]    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Port    ${REQ_NETWORK}    @{PORT_LIST}[${index + 2}]    sg=${SECURITY_GROUP}
+    END
     @{PORT_MAC_ADDR} =    OpenStackOperations.Get Ports MacAddr    ${PORT_LIST}
     BuiltIn.Set Suite Variable    @{PORT_MAC_ADDR}
 
 Create Nova VMs
     [Arguments]    ${num_of_vms_per_dpn}
     [Documentation]    Create Vm instances on compute nodes
-    : FOR    ${index}    IN RANGE    0    ${num_of_vms_per_dpn}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORT_LIST}[${index}]    @{NET_1_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORT_LIST}[${index + 2}]    @{NET_2_VMS}[${index}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    FOR    ${index}    IN RANGE    0    ${num_of_vms_per_dpn}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORT_LIST}[${index}]    @{NET_1_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORT_LIST}[${index + 2}]    @{NET_2_VMS}[${index}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    END
     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
-    BuiltIn.Should Not Contain    @{NET_1_VM_IPS}    None
-    BuiltIn.Should Not Contain    @{NET_2_VM_IPS}    None
+    BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
+    BuiltIn.Should Not Contain    ${NET_2_VM_IPS}    None
     BuiltIn.Should Not Contain    ${NET_1_DHCP_IP}    None
     BuiltIn.Should Not Contain    ${NET_2_DHCP_IP}    None
 
@@ -108,8 +110,8 @@ Create Setup
     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
     Create Neutron Ports
     Create Nova VMs    ${2}
-    ${DPNID_1} =    OVSDB.Get DPID    ${OS_COMPUTE_1_IP}
-    ${DPNID_2} =    OVSDB.Get DPID    ${OS_COMPUTE_2_IP}
+    ${DPNID_1} =    OVSDB.Get DPID    ${OS_CMP1_IP}
+    ${DPNID_2} =    OVSDB.Get DPID    ${OS_CMP2_IP}
     BuiltIn.Set Suite Variable    ${DPNID_1}
     BuiltIn.Set Suite Variable    ${DPNID_2}