Use OS_CMP in place of OS_COMPUTE 13/75213/9
authorSam Hague <shague@redhat.com>
Thu, 16 Aug 2018 01:22:29 +0000 (21:22 -0400)
committerSam Hague <shague@redhat.com>
Thu, 16 Aug 2018 22:10:39 +0000 (18:10 -0400)
Change-Id: I3cbfb6946676aa8731821cf5d35f4a82de7269ab
Signed-off-by: Sam Hague <shague@redhat.com>
csit/suites/openstack/securitygroup/security_group_l3bcast.robot

index 2a121c59c9f84765e0465897410e10211de55d54..4da29402af0b1d2df6b7a58a0f6b1fbd33901059 100644 (file)
@@ -33,9 +33,6 @@ ${ROUTER}         sgbcast_router
 ${DUMP_FLOW}      sudo ovs-ofctl dump-flows br-int -OOpenflow13
 ${DUMP_PORT_DESC}    sudo ovs-ofctl dump-ports-desc br-int -OOpenflow13
 ${PACKET_COUNT}    5
-${PACKET_COUNT_CMB}    10
-${PACKET_DIFF}    0
-${PACKET_DIFF_CMB}    5
 ${BCAST_IP}       255.255.255.255
 ${SUBNET1_BCAST_IP}    55.0.0.255
 ${SUBNET2_BCAST_IP}    56.0.0.255
@@ -44,33 +41,35 @@ ${ENABLE_BCAST}    echo 0 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_broadca
 *** Test case ***
 Verify Network Broadcast traffic between the VMs hosted in Single Network
     [Documentation]    This TC is to verify Network Broadcast traffic between the VMs hosted in Same Network on same/different compute node
-    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_COMPUTE1_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}
-    ...    @{VM_IPS}[0]    same    pingsuccess
+    ${pkt_check} =    BuiltIn.Set Variable If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    10    5
+    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_CMP1_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}
+    ...    @{VM_IPS}[0]    same    pingsuccess    pkt_check=${pkt_check}
 
 Verify Network Broadcast traffic between the VMs hosted in Multi Network
     [Documentation]    This TC is to verify Network Broadcast traffic between the VMs hosted in Different Network on same/different compute node.
-    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_COMPUTE1_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}
-    ...    @{VM_IPS}[3]    different    pingsuccess
+    ${pkt_check} =    BuiltIn.Set Variable If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    5    0
+    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_CMP1_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}
+    ...    @{VM_IPS}[3]    different    pingsuccess    pkt_check=${pkt_check}
 
 Verify Subnet Broadcast traffic between the VMs hosted on same compute node in Single Network
     [Documentation]    Verify L3-Subnet Broadcast traffic between the VMs hosted on same compute node in Single Network
-    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_COMPUTE1_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET1_BCAST_IP}
-    ...    @{VM_IPS}[0]    same    pingsuccess    ${VM2_SUBMETA}    additional_args=| grep ${VM2_SUBMETA}
+    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_CMP1_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET1_BCAST_IP}
+    ...    @{VM_IPS}[0]    same    pingsuccess    ${VM2_SUBMETA}    pkt_check=5    additional_args=| grep ${VM2_SUBMETA}
 
 Verify Subnet Broadcast traffic between the VMs hosted on Different compute node in Single Network
     [Documentation]    Verify L3-Subnet Broadcast traffic between the VMs hosted on same compute node in Single Network
-    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_COMPUTE2_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET1_BCAST_IP}
-    ...    @{VM_IPS}[0]    same    pingsuccess    ${VM3_SUBMETA}    additional_args=| grep ${VM3_SUBMETA}
+    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_CMP2_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET1_BCAST_IP}
+    ...    @{VM_IPS}[0]    same    pingsuccess    ${VM3_SUBMETA}    pkt_check=5    additional_args=| grep ${VM3_SUBMETA}
 
 Verify Subnet Broadcast traffic between the VMs hosted on same compute node in Multi Network
     [Documentation]    Verify L3-Subnet Broadcast traffic between the VMs hosted on same compute node in Multi Network
-    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_COMPUTE1_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET2_BCAST_IP}
-    ...    @{VM_IPS}[0]    different    nosuccess    ${VM4_SUBMETA}    additional_args=| grep ${VM4_SUBMETA}
+    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_CMP1_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET2_BCAST_IP}
+    ...    @{VM_IPS}[0]    different    nosuccess    ${VM4_SUBMETA}    pkt_check=0    additional_args=| grep ${VM4_SUBMETA}
 
 Verify Subnet Broadcast traffic between the VMs hosted on Different compute node in Multi Network
     [Documentation]    Verify L3-Subnet Broadcast traffic between the VMs hosted on Different compute node in Multi Network
-    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_COMPUTE2_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET2_BCAST_IP}
-    ...    @{VM_IPS}[0]    different    nosuccess    ${VM5_SUBMETA}    additional_args=| grep ${VM5_SUBMETA}
+    Wait Until Keyword Succeeds    30s    5s    Verify L3Broadcast With Antispoofing Table    ${OS_CMP2_IP}    ${EGRESS_ACL_TABLE}    ${SUBNET2_BCAST_IP}
+    ...    @{VM_IPS}[0]    different    nosuccess    ${VM5_SUBMETA}    pkt_check=0    additional_args=| grep ${VM5_SUBMETA}
 
 *** Keywords ***
 Start Suite
@@ -155,7 +154,7 @@ Get Submetadata
 
 Verify L3Broadcast With Antispoofing Table
     [Arguments]    ${OS_COMPUTE_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}    ${vm_ip}    ${subnet_var}    ${ping_response}='pingsuccess'
-    ...    ${vm_submeta}=''    ${additional_args}=${EMPTY}
+    ...    ${vm_submeta}=''    ${pkt_check}=0    ${additional_args}=${EMPTY}
     [Documentation]    Verify the l3 broadcast requests are hitting to antispoofing table in same subnet
     ${get_pkt_count_before_bcast} =    OvsManager.Get Packet Count In Table For IP    ${OS_COMPUTE_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}    additional_args=| grep ${vm_submeta}
     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    ${vm_ip}    ping -c ${PACKET_COUNT} ${BCAST_IP}
@@ -164,5 +163,4 @@ Verify L3Broadcast With Antispoofing Table
     ${bcast_egress} =    Utils.Run Command On Remote System And Log    ${OS_COMPUTE_IP}    ${DUMP_FLOW} | grep table=${EGRESS_ACL_TABLE} | grep ${BCAST_IP} ${additional_args}
     ${get_pkt_count_after_bcast} =    OvsManager.Get Packet Count In Table For IP    ${OS_COMPUTE_IP}    ${EGRESS_ACL_TABLE}    ${BCAST_IP}    additional_args=| grep ${vm_submeta}
     ${pkt_diff} =    Evaluate    int(${get_pkt_count_after_bcast})-int(${get_pkt_count_before_bcast})
-    BuiltIn.Run Keyword If    '${subnet_var}' == 'same'    Should Be Equal As Numbers    ${pkt_diff}    ${PACKET_COUNT}
-    ...    ELSE    Should Be True    ${pkt_diff}==0
+    BuiltIn.Should Be Equal As Numbers    ${pkt_diff}    ${pkt_check}