Upgrade RF syntax for v3.2 compatibility
[integration/test.git] / csit / suites / netvirt / subnet_routing / subnet_routing_and_multicast.robot
index 304240336f541c557263a6692b565ff7435a10d1..7d3befff8363653cea734b27d1c978b4baaedfd3 100644 (file)
@@ -28,6 +28,7 @@ ${DCGW_SYSTEM_IP}    ${TOOLS_SYSTEM_1_IP}
 ${RPING_MIP_IP}    sudo arping -I eth0:1 -c 5 -b -s @{EXTRA_NW_SUBNET}[0] @{EXTRA_NW_SUBNET}[0]
 ${RPING_MIP_IP1}    sudo arping -I eth0:1 -c 5 -b -s @{EXTRA_NW_SUBNET}[1] @{EXTRA_NW_SUBNET}[1]
 ${RPING_MIP_IP2}    sudo arping -I eth0:1 -c 5 -b -s @{EXTRA_NW_SUBNET}[2] @{EXTRA_NW_SUBNET}[2]
+${RPING_MIP_IP3}    sudo arping -I eth0:1 -c 5 -b -s ${NEW_EXTRA_NW_SUBNET} ${NEW_EXTRA_NW_SUBNET}
 @{INTERFACE_STATE}    up    down
 @{NETWORKS}       mc_net_1    mc_net_2    mc_net_3
 @{NET_1_VMS}      mc_net_1_vm_1    mc_net_1_vm_2    mc_net_1_vm_3    mc_net_1_vm_4
@@ -39,6 +40,7 @@ ${RPING_MIP_IP2}    sudo arping -I eth0:1 -c 5 -b -s @{EXTRA_NW_SUBNET}[2] @{EXT
 @{SUBNETS}        mc_sub_1    mc_sub_2    mc_sub_3
 @{SUBNET_CIDR}    10.1.0.0/24    10.2.0.0/24    10.3.0.0/24
 @{EXTRA_NW_SUBNET}    10.1.0.100    10.2.0.100    10.3.0.100
+${NEW_EXTRA_NW_SUBNET}    10.1.0.110
 ${MASK}           255.255.255.0
 
 *** Test Cases ***
@@ -76,6 +78,56 @@ Verify The Subnet Route For Multiple Subnets On Multi VSwitch Topology When Qbgp
     BgpOperations.Restart BGP Processes On ODL    ${ODL_SYSTEM_IP}
     Verify Ping between Inter Intra And Enterprise host
 
+Verify The Subnet Route When Vswitch Hosting Subnet Route Is Restarted On Single Vswitch Topology
+    [Documentation]    Restart single OVS node on which subnet route is configured and verify enterprise hosts reachability
+    OVSDB.Restart OVSDB    ${OS_COMPUTE_2_IP}
+    BuiltIn.Wait Until Keyword Succeeds    10s    20s    OVSDB.Verify Ovsdb State    ${OS_COMPUTE_2_IP}
+    VpnOperations.Verify Tunnel Status as UP
+    Verify Ping between Inter Intra And Enterprise host
+
+Verify The Subnet Route When Vswitch Hosting Subnet Enterprise Host Is Restarted On Multiple Vswitch Topology
+    [Documentation]    Restart the OVS node on both compute nodes and verify the subnet route
+    OVSDB.Restart OVSDB    ${OS_COMPUTE_1_IP}
+    OVSDB.Restart OVSDB    ${OS_COMPUTE_2_IP}
+    BuiltIn.Wait Until Keyword Succeeds    10s    20s    OVSDB.Verify Ovsdb State    ${OS_COMPUTE_1_IP}
+    BuiltIn.Wait Until Keyword Succeeds    10s    20s    OVSDB.Verify Ovsdb State    ${OS_COMPUTE_2_IP}
+    VpnOperations.Verify Tunnel Status as UP
+    Verify Ping between Inter Intra And Enterprise host
+
+Verify The Subnet Route For One Subnet On Single Vswitch
+    [Documentation]    Verify the subnet route for one subnet on a single VSwitch
+    ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[2]    @{NET_2_VM_IPS}[1]    ping -c 3 @{EXTRA_NW_SUBNET}[1]
+    BuiltIn.Should Contain    ${output}    64 bytes
+    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${EXTRA_NW_SUBNET}
+    Verify Ping between Inter Intra And Enterprise host
+
+Verify The Subnet Route For Multiple Subnets On Multi Vswitch Topology
+    [Documentation]    Configure one more IP on sub interface and verify the subnet route for multiple subnets on multi VSwitch topology
+    BuiltIn.Log    Bring up enterprise host in another vswitch
+    Configure_IP_On_Sub_Interface    @{NETWORKS}[0]    ${NEW_EXTRA_NW_SUBNET}    @{NET_1_VM_IPS}[2]    ${MASK}
+    Verify_IP_Configured_On_Sub_Interface    @{NETWORKS}[0]    ${NEW_EXTRA_NW_SUBNET}    @{NET_1_VM_IPS}[2]
+    ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[2]    ${RPING_MIP_IP3}
+    BuiltIn.Should Contain    ${output}    broadcast
+    BuiltIn.Should Contain    ${output}    Received 0 reply
+    ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[2]    @{NET_1_VM_IPS}[2]    ping -c 3 ${NEW_EXTRA_NW_SUBNET}
+    BuiltIn.Should Contain    ${output}    64 bytes
+    Verify Ping between Inter Intra And Enterprise host
+
+Verify The Subnet Route When The Network Is Removed From The Vpn
+    [Documentation]    Dissociate vpn from the network and verify the subnet route
+    FOR    ${network}    IN    @{NETWORKS}
+        ${network_id} =    OpenStackOperations.Get Net Id    ${network}
+        VpnOperations.Dissociate L3VPN From Networks    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
+    END
+    ${vm_ip_list} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}
+    Utils.Check For Elements Not At URI    ${FIB_ENTRY_URL}    ${vm_ip_list}
+    FOR    ${network}    IN    @{NETWORKS}
+        ${network_id} =    OpenStackOperations.Get Net Id    ${network}
+        VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
+    END
+    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ip_list}
+    Verify Ping between Inter Intra And Enterprise host
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Test Suite for Subnet_Routing_and_Multicast_Deployments.
@@ -104,9 +156,10 @@ Create Setup
     Create Nova VMs
     Create Sub Interfaces And Verify
     Create L3VPN
-    : FOR    ${network}    IN    @{NETWORKS}
-    \    ${network_id} =    OpenStackOperations.Get Net Id    ${network}
-    \    VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
+    FOR    ${network}    IN    @{NETWORKS}
+        ${network_id} =    OpenStackOperations.Get Net Id    ${network}
+        VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
+    END
     Create BGP Config On ODL
     Create BGP Config On DCGW
     BuiltIn.Wait Until Keyword Succeeds    60s    10s    VpnOperations.Verify Tunnel Status as UP
@@ -119,15 +172,17 @@ Create Setup
 
 Create Neutron Networks
     [Documentation]    Create required number of networks
-    : FOR    ${net}    IN    @{NETWORKS}
-    \    OpenStackOperations.Create Network    ${net}
+    FOR    ${net}    IN    @{NETWORKS}
+        OpenStackOperations.Create Network    ${net}
+    END
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
 
 Create Neutron Subnets
     [Arguments]    ${num_of_network}    ${additional_args}=${EMPTY}    ${verbose}=TRUE
     [Documentation]    Create required number of subnets for previously created networks
-    : FOR    ${index}    IN RANGE    0    ${num_of_network}
-    \    OpenStackOperations.Create SubNet    @{NETWORKS}[${index}]    @{SUBNETS}[${index}]    @{SUBNET_CIDR}[${index}]
+    FOR    ${index}    IN RANGE    0    ${num_of_network}
+        OpenStackOperations.Create SubNet    @{NETWORKS}[${index}]    @{SUBNETS}[${index}]    @{SUBNET_CIDR}[${index}]
+    END
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
 
 Create Neutron Ports
@@ -135,22 +190,26 @@ Create Neutron Ports
     ${allowed_address_pairs_args1} =    BuiltIn.Set Variable    --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
     ${allowed_address_pairs_args2} =    BuiltIn.Set Variable    --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[2]
     ${allowed_address_pairs_args3} =    BuiltIn.Set Variable    --allowed-address ip-address=@{EXTRA_NW_SUBNET}[2] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0]
-    : FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
-    \    OpenStackOperations.Create Port    @{NETWORKS}[0]    @{NET_1_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args1}
-    : FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
-    \    OpenStackOperations.Create Port    @{NETWORKS}[1]    @{NET_2_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args2}
-    : FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
-    \    OpenStackOperations.Create Port    @{NETWORKS}[2]    @{NET_3_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args3}
+    FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
+        OpenStackOperations.Create Port    @{NETWORKS}[0]    @{NET_1_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args1}
+    END
+    FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
+        OpenStackOperations.Create Port    @{NETWORKS}[1]    @{NET_2_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args2}
+    END
+    FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
+        OpenStackOperations.Create Port    @{NETWORKS}[2]    @{NET_3_PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args3}
+    END
 
 Create Nova VMs
     [Documentation]    Create Vm instances on compute nodes
-    : FOR    ${index}    IN RANGE    0    2
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_1_PORTS}[${index}]    @{NET_1_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_1_PORTS}[${index+2}]    @{NET_1_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_2_PORTS}[${index}]    @{NET_2_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_2_PORTS}[${index+2}]    @{NET_2_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_3_PORTS}[${index}]    @{NET_3_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_3_PORTS}[${index+2}]    @{NET_3_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    FOR    ${index}    IN RANGE    0    2
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_1_PORTS}[${index}]    @{NET_1_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_1_PORTS}[${index+2}]    @{NET_1_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_2_PORTS}[${index}]    @{NET_2_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_2_PORTS}[${index+2}]    @{NET_2_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_3_PORTS}[${index}]    @{NET_3_VMS}[${index}]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
+        OpenStackOperations.Create Vm Instance With Port On Compute Node    @{NET_3_PORTS}[${index+2}]    @{NET_3_VMS}[${index+2}]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
+    END
     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
     @{NET_2_VM_IPS}    ${NET2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
     @{NET_3_VM_IPS}    ${NET3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}