Documentation Test suite to validate elan service functionality in ODL environment.
... The assumption of this suite is that the environment is already configured with the proper
... integration bridges and vxlan tunnels.
-Suite Setup OpenStackOperations.OpenStack Suite Setup
+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
@{NET_3_VMS} elan_net_3_vm_1 elan_net_3_vm_2
*** Test Cases ***
-Create Single Elan
- OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
- OpenStackOperations.Create Network @{NETWORKS}[0]
- OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] ${SUBNET_CIDRS[0]}
- OpenStackOperations.Create Port @{NETWORKS}[0] ${NET_1_PORTS[0]} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Port @{NETWORKS}[0] ${NET_1_PORTS[1]} sg=${SECURITY_GROUP}
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${PORT_URL} ${NET_1_PORTS}
- OpenStackOperations.Create Vm Instance With Port On Compute Node ${NET_1_PORTS[0]} ${NET_1_VMS[0]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node ${NET_1_PORTS[1]} ${NET_1_VMS[1]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
- Builtin.Set Suite Variable @{NET_1_VM_IPS}
- BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
- BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
- @{NET_1_MACS} = BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Get Ports MacAddr ${NET_1_PORTS}
- Builtin.Set Suite Variable @{NET_1_MACS}
-
Verify Datapath for Single ELAN with Multiple DPN
[Documentation] Verify Flow Table and Datapath
${smac_cn1} = BuiltIn.Create List @{NET_1_MACS}[0]
[Documentation] Verify Flow table after all VM instance deleted
: FOR ${vm} IN @{NET_1_VMS}
\ OpenStackOperations.Delete Vm Instance ${vm}
- BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${OS_CMP1_IP} ${NET_1_MACS}
- BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${OS_CMP2_IP} ${NET_1_MACS}
+ Verify Flows Are Removed For ELAN Service On All compute Nodes ${NET_1_MACS}
Verify Datapath for Multiple ELAN with Multiple DPN
[Documentation] Verify Flow Table and Data path for Multiple ELAN with Multiple DPN
BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Present For ELAN Service ${OS_CMP1_IP} ${smac_cn1} ${MAC_LIST}
${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPS[1]} ping -c 3 @{NET_2_VM_IPS}[0]
BuiltIn.Should Contain ${output} ${PING_REGEXP}
- [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
- ... AND MultipleElan Testsuite Cleanup
*** Keywords ***
+Suite Setup
+ OpenStackOperations.OpenStack Suite Setup
+ Create Single Elan
+ OpenStackOperations.Show Debugs @{NET_1_VMS}
+ OpenStackOperations.Get Suite Debugs
+
+Create Single Elan
+ OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
+ OpenStackOperations.Create Network @{NETWORKS}[0]
+ OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] ${SUBNET_CIDRS[0]}
+ OpenStackOperations.Create Port @{NETWORKS}[0] ${NET_1_PORTS[0]} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Port @{NETWORKS}[0] ${NET_1_PORTS[1]} sg=${SECURITY_GROUP}
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${PORT_URL} ${NET_1_PORTS}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node ${NET_1_PORTS[0]} ${NET_1_VMS[0]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node ${NET_1_PORTS[1]} ${NET_1_VMS[1]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
+ Builtin.Set Suite Variable @{NET_1_VM_IPS}
+ BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
+ BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
+ @{NET_1_MACS} = BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Get Ports MacAddr ${NET_1_PORTS}
+ Builtin.Set Suite Variable @{NET_1_MACS}
+
MultipleElan Testsuite Setup
[Documentation] Create additional ELAN for multipleElan with Multiple DPN test
OpenStackOperations.Create Network @{NETWORKS}[1]
Builtin.Set Suite Variable @{VM_MACAddr_elan_net_2}
@{VM_MACAddr_elan_net_3} BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Get Ports MacAddr ${NET_3_PORTS}
Builtin.Set Suite Variable @{VM_MACAddr_elan_net_3}
-
-MultipleElan Testsuite Cleanup
- [Documentation] Delete elan_net_2 network,subnet and port
- OpenStackOperations.Get Test Teardown Debugs
- : FOR ${vm} IN @{NET_2_VMS} @{NET_3_VMS}
- \ OpenStackOperations.Delete Vm Instance ${vm}
- : FOR ${Port} IN @{NET_2_PORTS} @{NET_3_PORTS}
- \ OpenStackOperations.Delete Port ${Port}
- OpenStackOperations.Delete SubNet @{SUBNETS}[1]
- OpenStackOperations.Delete SubNet @{SUBNETS}[2]
- OpenStackOperations.Delete Network @{NETWORKS}[1]
- OpenStackOperations.Delete Network @{NETWORKS}[2]
+ OpenStackOperations.Show Debugs @{NET_2_VMS} @{NET_3_VMS}
+ OpenStackOperations.Get Suite Debugs
Verify Flows Are Present For ELAN Service
[Arguments] ${ip} ${smacs} ${dmacs}
Builtin.Log ${dmac_output}
: FOR ${dmac} IN @{smacs}
\ ${resp} = BuiltIn.Should Not Contain ${dmac_output} ${dmac}
+
+Verify Flows Are Removed For ELAN Service On All compute Nodes
+ [Arguments] ${smacs}
+ : FOR ${ip} IN @{OS_CMP_IPS}
+ \ BuiltIn.Wait Until Keyword Succeeds 30s 10s Verify Flows Are Removed For ELAN Service ${ip} ${smacs}
*** Settings ***
Documentation Test suite for VM based Host Route Handling
-Suite Setup Create Setup
+Suite Setup Suite Setup
Suite Teardown OpenStackOperations.OpenStack Suite Teardown
Library Collections
Library RequestsLibrary
Verify No Hostroutes In Subnet ${SUBNETS[${0}]} destination='${NON_NEUTRON_DESTINATION[${0}]}${PREFIX24}',\\sgateway='${SUBNET_GW_IP[${0}]}'
*** Keywords ***
-Create Setup
+Suite Setup
[Documentation] Creates initial setup
VpnOperations.Basic Suite Setup
: FOR ${network} IN @{NETWORKS}
*** Settings ***
Documentation Test Suite for Gateway mac based L2L3 seggragation
-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
BuiltIn.Should Match Regexp ${output} .*${VRF_ID}.*${REQ_SUBNET_CIDR[1]}
*** Keywords ***
-Start Suite
+Suite Setup
[Documentation] Test Suite for Gateway mac based L2L3 seggragation
VpnOperations.Basic Suite Setup
Create Setup
+ OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
+ OpenStackOperations.Get Suite Debugs
Create Neutron Networks
[Arguments] ${NUM_OF_NETWORK}
*** Settings ***
Documentation Test suite for ODL Upgrade. It is assumed that OLD + OpenStack
... integrated environment is deployed and ready.
-Suite Setup OpenStackOperations.OpenStack Suite Setup
+Suite Setup Suite Setup
Suite Teardown Upgrade Suite Teardown
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown Get Test Teardown Debugs
Wait Until Keyword Succeeds 90s 10s Check Resource Connectivity
*** Keywords ***
+Suite Setup
+ OpenStackOperations.OpenStack Suite Setup
+ Create Resources
+ OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
+ OpenStackOperations.Get Suite Debugs
+
Create Resources
[Documentation] Create 2 VXLAN networks, subnets with 2 VMs each and a router. Ping all 4 VMs.
: FOR ${net} IN @{NETWORKS}
... presence of LPort tags, ELAN tags and MPLS labels on the
... wire and instead, replaces them with VNIs supplied by the
... tenant’s OpenStack.
-Suite Setup Start Suite
-Suite Teardown Stop Suite
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup VpnOperations.VNI Test Setup
Test Teardown VpnOperations.VNI Test Teardown
Library OperatingSystem
... @{VNI6_NETWORKS}[3] @{VM_IP_NET2}[0] @{VM_IP_NET3}[0] ${IP}
*** Keywords ***
-Start Suite
+Suite Setup
[Documentation] Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs.
... Create Two VMs for TC1 : (VM1, N1, Compute1) and (VM2, N2, Compute2) and R1
BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp"
BuiltIn.Set Suite Variable ${VM_IP_NET1}
BuiltIn.Should Not Contain ${VM_IP_NET0} None
BuiltIn.Should Not Contain ${VM_IP_NET1} None
- Get OvsDebugInfo
+ OpenStackOperations.Show Debugs @{VNI6_NET_0_VMS} @{VNI6_NET_1_VMS}
+ OpenStackOperations.Get Suite Debugs
-Stop Suite
+Suite Teardown
BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp"
OpenStackOperations.OpenStack Suite Teardown
... presence of LPort tags, ELAN tags and MPLS labels on the
... wire and instead, replaces them with VNIs supplied by the
... tenant’s OpenStack.
-Suite Setup Start Suite
-Suite Teardown Stop Suite
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup VpnOperations.VNI Test Setup
Test Teardown VpnOperations.VNI Test Teardown
Library OperatingSystem
BuiltIn.Should Be True ${diff_count_ingress_port2} >= ${DEFAULT_PING_COUNT}
*** Keywords ***
-Start Suite
+Suite Setup
[Documentation] Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs.
BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp"
VpnOperations.Basic Suite Setup
BuiltIn.Set Suite Variable @{VNI_NET_1_VM_IPS}
BuiltIn.Should Not Contain ${VNI_NET_1_VM_IPS} None
BuiltIn.Should Not Contain ${vni_net_1_dhcp_ip} None
- Get OvsDebugInfo
+ OpenStackOperations.Show Debugs @{NET_1_VMS}
+ OpenStackOperations.Get Suite Debugs
-Stop Suite
+Suite Teardown
BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp"
OpenStackOperations.OpenStack Suite Teardown
... presence of LPort tags, ELAN tags and MPLS labels on the
... wire and instead, replaces them with VNIs supplied by the
... tenant’s OpenStack.
-Suite Setup Start Suite
-Suite Teardown Stop Suite
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup VpnOperations.VNI Test Setup
Test Teardown VpnOperations.VNI Test Teardown
Library OperatingSystem
... @{VNI_NETWORKS}[5] @{NET_4_VM_IPS}[0] @{NET_5_VM_IPS}[0] ${IP}
*** Keywords ***
-Start Suite
+Suite Setup
[Documentation] Create Basic setup for the feature. Creates single network, subnet, two ports and two VMs.
... Create Two VMs for TC1 : (VM1, N1, Compute1) and (VM2, N2, Compute2) and R1
BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp"
BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
BuiltIn.Should Not Contain ${NET_0_DHCP_IP} None
BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
- Get OvsDebugInfo
+ OpenStackOperations.Show Debugs @{VNI_NET_0_VMS} @{VNI_NET_1_VMS}
+ OpenStackOperations.Get Suite Debugs
-Stop Suite
+Suite Teardown
BuiltIn.Return From Keyword If "${OS_DEPLOY}" == "1cmb-0ctl-0cmp"
OpenStackOperations.OpenStack Suite Teardown
*** Settings ***
Documentation Test suite for ARP Request. More test cases to be added in subsequent patches.
-Suite Setup VpnOperations.Basic Suite Setup
-Suite Teardown OpenStackOperations.OpenStack Suite Teardown
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown OpenStackOperations.Get Test Teardown Debugs
Library RequestsLibrary
Library SSHLibrary
-Resource ../../../libraries/OpenStackOperations.robot
Resource ../../../libraries/DevstackUtils.robot
-Resource ../../../libraries/VpnOperations.robot
+Resource ../../../libraries/OpenStackOperations.robot
Resource ../../../libraries/SetupUtils.robot
+Resource ../../../libraries/VpnOperations.robot
Resource ../../../variables/netvirt/Variables.robot
Resource ../../../variables/Variables.robot
${RPING_EXP_STR} broadcast
*** Test Cases ***
-Create Neutron Networks
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
- ${neutron_networks} = OpenStackOperations.List Networks
- : FOR ${network} IN @{NETWORKS}
- \ BuiltIn.Should Contain ${neutron_networks} ${network}
- ${NET_ID} = OpenStackOperations.Get Net Id @{NETWORKS}[0]
- BuiltIn.Set Suite Variable ${NET_ID}
-
-Create Neutron Subnets
- : FOR ${i} IN RANGE 0 3
- \ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDRS}[${i}]
- ${neutron_subnets} = OpenStackOperations.List Subnets
- : FOR ${subnet} IN @{SUBNETS}
- \ BuiltIn.Should Contain ${neutron_subnets} ${subnet}
-
-Add Ssh Allow All Rule
- OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
-
-Create Neutron Ports
- OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
- OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
- OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
- OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
- OpenStackOperations.Create Port @{NETWORKS}[2] @{PORTS}[4] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
- OpenStackOperations.Create Port @{NETWORKS}[2] @{PORTS}[5] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
- Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${CONFIG_API}/neutron:neutron/ports/ ${PORTS}
-
-Create Nova VMs
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[4] @{NET_3_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[5] @{NET_3_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- @{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}
- @{NET_3_VM_IPS} ${NET_3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_3_VMS}
- BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
- BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
- BuiltIn.Set Suite Variable @{NET_3_VM_IPS}
- BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
- BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
- BuiltIn.Should Not Contain ${NET_3_VM_IPS} None
- BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
- BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
- BuiltIn.Should Not Contain ${NET_3_DHCP_IP} None
-
-Create Router
- OpenStackOperations.Create Router ${ROUTER}
- OpenStackOperations.Add Router Interface ${ROUTER} @{SUBNETS}[1]
- OpenStackOperations.Add Router Interface ${ROUTER} @{SUBNETS}[2]
-
-Create L3VPN
- ${tenant_id} = OpenStackOperations.Get Tenant ID From Network ${NET_ID}
- VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] name=${VPN_NAMES[0]} rd=${RD1} exportrt=${EXPORT_RT} importrt=${IMPORT_RT} tenantid=${tenant_id}
- ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
- BuiltIn.Should Contain ${resp} @{VPN_INSTANCE_IDS}[0]
-
-Associate L3VPN To ROUTER
- VpnOperations.Associate L3VPN To Network networkid=${NET_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
- ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
- BuiltIn.Should Contain ${resp} ${NET_ID}
- ${ROUTER_ID} = OpenStackOperations.Get Router Id ${ROUTER}
- BuiltIn.Set Suite Variable ${ROUTER_ID}
- VpnOperations.Associate VPN to Router routerid=${ROUTER_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
- ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
- BuiltIn.Should Contain ${resp} ${ROUTER_ID}
-
Verify Setup
[Documentation] Verify that VMs received ip and ping is happening between different VM
${vms} = BuiltIn.Create List @{NET_1_VM_IPS} @{NET_2_VM_IPS} @{NET_3_VM_IPS}
[Tags] not-implemented exclude
TODO
-Cleanup
+*** Keywords ***
+Suite Setup
+ VpnOperations.Basic Suite Setup
+ : FOR ${network} IN @{NETWORKS}
+ \ OpenStackOperations.Create Network ${network}
+ ${neutron_networks} = OpenStackOperations.List Networks
+ : FOR ${network} IN @{NETWORKS}
+ \ BuiltIn.Should Contain ${neutron_networks} ${network}
+ ${NET_ID} = OpenStackOperations.Get Net Id @{NETWORKS}[0]
+ BuiltIn.Set Suite Variable ${NET_ID}
+ : FOR ${i} IN RANGE 0 3
+ \ OpenStackOperations.Create SubNet @{NETWORKS}[${i}] @{SUBNETS}[${i}] @{SUBNET_CIDRS}[${i}]
+ ${neutron_subnets} = OpenStackOperations.List Subnets
+ : FOR ${subnet} IN @{SUBNETS}
+ \ BuiltIn.Should Contain ${neutron_subnets} ${subnet}
+ OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
+ OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
+ OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
+ OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
+ OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
+ OpenStackOperations.Create Port @{NETWORKS}[2] @{PORTS}[4] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
+ OpenStackOperations.Create Port @{NETWORKS}[2] @{PORTS}[5] sg=${SECURITY_GROUP} allowed_address_pairs=@{EXTRA_NW_IP}
+ Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${CONFIG_API}/neutron:neutron/ports/ ${PORTS}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[4] @{NET_3_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[5] @{NET_3_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ @{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}
+ @{NET_3_VM_IPS} ${NET_3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_3_VMS}
+ BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
+ BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
+ BuiltIn.Set Suite Variable @{NET_3_VM_IPS}
+ BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
+ BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
+ BuiltIn.Should Not Contain ${NET_3_VM_IPS} None
+ BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
+ BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
+ BuiltIn.Should Not Contain ${NET_3_DHCP_IP} None
+ OpenStackOperations.Create Router ${ROUTER}
+ OpenStackOperations.Add Router Interface ${ROUTER} @{SUBNETS}[1]
+ OpenStackOperations.Add Router Interface ${ROUTER} @{SUBNETS}[2]
+ ${tenant_id} = OpenStackOperations.Get Tenant ID From Network ${NET_ID}
+ VpnOperations.VPN Create L3VPN vpnid=@{VPN_INSTANCE_IDS}[0] name=${VPN_NAMES[0]} rd=${RD1} exportrt=${EXPORT_RT} importrt=${IMPORT_RT} tenantid=${tenant_id}
+ ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Should Contain ${resp} @{VPN_INSTANCE_IDS}[0]
+ Associate L3VPN To ROUTER
+ OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} @{NET_3_VMS}
+ OpenStackOperations.Get Suite Debugs
+
+Suite Teardown
[Documentation] Delete the setup
- VpnOperations.Dissociate L3VPN From Networks networkid=${NET_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
- VpnOperations.Dissociate VPN to Router routerid=${ROUTER_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
- OpenStackOperations.Remove Interface ${ROUTER} @{SUBNETS}[1]
- OpenStackOperations.Remove Interface ${ROUTER} @{SUBNETS}[2]
- OpenStackOperations.Delete Router ${ROUTER}
- @{vms} = BuiltIn.Create List @{NET_1_VMS} @{NET_2_VMS} @{NET_3_VMS}
- @{sgs} = BuiltIn.Create List ${SECURITY_GROUP}
- OpenStackOperations.Neutron Cleanup ${vms} ${NETWORKS} ${SUBNETS} ${PORTS} ${sgs}
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.Dissociate L3VPN From Networks networkid=${NET_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.Dissociate VPN to Router routerid=${ROUTER_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
+ OpenStackOperations.OpenStack Suite Teardown
-*** Keywords ***
-Start Suite
- [Documentation] Run at start of the suite
- OpenStackOperations.OpenStack Suite Setup
- TemplatedRequests.Create Default Session timeout=10
+Associate L3VPN To ROUTER
+ VpnOperations.Associate L3VPN To Network networkid=${NET_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
+ ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Should Contain ${resp} ${NET_ID}
+ ${ROUTER_ID} = OpenStackOperations.Get Router Id ${ROUTER}
+ BuiltIn.Set Suite Variable ${ROUTER_ID}
+ VpnOperations.Associate VPN to Router routerid=${ROUTER_ID} vpnid=@{VPN_INSTANCE_IDS}[0]
+ ${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Should Contain ${resp} ${ROUTER_ID}
Verify Ping On Same Networks
[Documentation] Verify ping among VM of same network
Documentation Test suite to validate vpnservice functionality in an openstack integrated environment.
... The assumption of this suite is that the environment is already configured with the proper
... integration bridges and vxlan tunnels.
-Suite Setup VpnOperations.Basic Suite Setup
-Suite Teardown OpenStackOperations.OpenStack Suite Teardown
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown OpenStackOperations.Get Test Teardown Debugs
Library OperatingSystem
${INVALID_VPN_INSTANCE_ID} AAAAAAAAAA-4848-4949-9494-666666666666
*** Test Cases ***
-Create Neutron Networks
- # TODO: Many of these steps to verify if updates occurred should be in a different suite
- # that is checking for such operations.
- OpenStackOperations.Create Network @{NETWORKS}[0]
- OpenStackOperations.Create Network @{NETWORKS}[1]
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
- OpenStackOperations.Update Network @{NETWORKS}[0] additional_args=--description ${UPDATE_NETWORK}
- ${output} = OpenStackOperations.Show Network @{NETWORKS}[0]
- BuiltIn.Should Contain ${output} ${UPDATE_NETWORK}
-
-Create Neutron Subnets
- OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
- OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
- OpenStackOperations.Update SubNet @{SUBNETS}[0] additional_args=--description ${UPDATE_SUBNET}
- ${output} = OpenStackOperations.Show SubNet @{SUBNETS}[0]
- BuiltIn.Should Contain ${output} ${UPDATE_SUBNET}
-
-Add Ssh Allow All Rule
- OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
-
-Create Neutron Ports
- ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
- Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${PORT_URL} ${PORTS}
- ${PORTS_MACADDR} = Get Ports MacAddr ${PORTS}
- Set Suite Variable ${PORTS_MACADDR}
- Update Port @{PORTS}[0] additional_args=--description ${UPDATE_PORT}
- ${output} = Show Port @{PORTS}[0]
- Should Contain ${output} ${UPDATE_PORT}
-
-Create Nova VMs
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- @{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.Set Suite Variable @{NET_1_VM_IPS}
- BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
- 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
- BuiltIn.Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNET_CIDRS}
- [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
- ... AND OpenStackOperations.Get Test Teardown Debugs
-
Check ELAN Datapath Traffic Within The Networks
[Documentation] Checks datapath within the same network with different vlans.
${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ping -c 3 @{NET_1_VM_IPS}[1]
${resp} = VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[2]
BuiltIn.Should Contain ${resp} @{VPN_INSTANCE_IDS}[2]
-Delete Multiple L3VPN
- [Documentation] Delete three L3VPNs created using Multiple L3VPN Test
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[1]
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[2]
+*** Keywords ***
+Suite Setup
+ VpnOperations.Basic Suite Setup
+ OpenStackOperations.Create Network @{NETWORKS}[0]
+ OpenStackOperations.Create Network @{NETWORKS}[1]
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
+ OpenStackOperations.Update Network @{NETWORKS}[0] additional_args=--description ${UPDATE_NETWORK}
+ ${output} = OpenStackOperations.Show Network @{NETWORKS}[0]
+ BuiltIn.Should Contain ${output} ${UPDATE_NETWORK}
+ OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
+ OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
+ OpenStackOperations.Update SubNet @{SUBNETS}[0] additional_args=--description ${UPDATE_SUBNET}
+ ${output} = OpenStackOperations.Show SubNet @{SUBNETS}[0]
+ BuiltIn.Should Contain ${output} ${UPDATE_SUBNET}
+ OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
+ ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
+ Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${PORT_URL} ${PORTS}
+ ${PORTS_MACADDR} = Get Ports MacAddr ${PORTS}
+ Set Suite Variable ${PORTS_MACADDR}
+ Update Port @{PORTS}[0] additional_args=--description ${UPDATE_PORT}
+ ${output} = Show Port @{PORTS}[0]
+ Should Contain ${output} ${UPDATE_PORT}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ @{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.Set Suite Variable @{NET_1_VM_IPS}
+ BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
+ 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
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNET_CIDRS}
+ OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
+ OpenStackOperations.Get Suite Debugs
+
+Suite Teardown
+ [Documentation] Delete the setup
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[1]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[2]
+ OpenStackOperations.OpenStack Suite Teardown
... integrated environment.
... The assumption of this suite is that the environment is already configured with the proper
... integration bridges and vxlan tunnels.
-Suite Setup VpnOperations.Basic Suite Setup
-Suite Teardown VpnOperations.Basic Vpnservice Suite Cleanup
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown OpenStackOperations.Get Test Teardown Debugs
Library Collections
@{RDS} ["2506:2"] ["2606:2"] ["2706:2"]
*** Test Cases ***
-Create Neutron Networks
- [Documentation] Create two networks.
- OpenStackOperations.Create Network @{NETWORKS}[0]
- OpenStackOperations.Create Network @{NETWORKS}[1]
- ${NET_LIST} = OpenStackOperations.List Networks
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
- OpenStackOperations.Update Network @{NETWORKS}[0] additional_args=--description ${UPDATE_NETWORK}
- ${output} = OpenStackOperations.Show Network @{NETWORKS}[0]
- BuiltIn.Should Contain ${output} ${UPDATE_NETWORK}
-
-Create Neutron Subnets
- [Documentation] Create subnets for previously created networks.
- OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS4}[0] @{SUBNETS4_CIDR}[0]
- OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS6}[0] @{SUBNETS6_CIDR}[0] ${SUBNET_ADDITIONAL_ARGS}
- OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS4}[1] @{SUBNETS4_CIDR}[1]
- OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS6}[1] @{SUBNETS6_CIDR}[1] ${SUBNET_ADDITIONAL_ARGS}
- ${SUB_LIST} = OpenStackOperations.List Subnets
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS4}
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS6}
- OpenStackOperations.Update SubNet @{SUBNETS4}[0] additional_args=--description ${UPDATE_SUBNET}
- ${output} = OpenStackOperations.Show SubNet @{SUBNETS4}[0]
- BuiltIn.Should Contain ${output} ${UPDATE_SUBNET}
+Check ELAN Datapath Traffic Within The Networks
+ [Documentation] Checks datapath within the same network with different vlans.
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[0]} ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV6[0]} ping6 -I ${NET_1_VM_IPV6[0]} -c 3 ${NET_1_VM_IPV6[1]}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV4[0]} ping -I ${NET_2_VM_IPV4[0]} -c 3 ${NET_2_VM_IPV4[1]}
+ BuiltIn.Should Contain ${output} 64 bytes
+ ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV6[0]} ping6 -I ${NET_2_VM_IPV6[0]} -c 3 ${NET_2_VM_IPV6[1]}
+ BuiltIn.Should Contain ${output} 64 bytes
Create Router
[Documentation] Create Router.
BuiltIn.Set Suite Variable ${GW_IPV4_ADDRS}
BuiltIn.Set Suite Variable ${GW_IPV6_ADDRS}
-Create Allow All Security Group IPv4+IPv6
- [Documentation] Create neutron security group with Allow All rule set for IPv4 ethertype.
- ... Then add in this group Allow All rule set for IPv6 ethertype.
- OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv4
- OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=tcp
- OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=tcp
- OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress ethertype=IPv6 protocol=icmp
- OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress ethertype=IPv6 protocol=icmp
- OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=udp
- OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=udp
-
-Create Neutron Ports
- [Documentation] Create 2 ports in previously created IPv4 subnets and 2 ports in previously created IPv6 subnets.
- ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[1]
- OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${PORT_URL} ${PORTS}
- ${PORTS_MACADDR} = OpenStackOperations.Get Ports MacAddr ${PORTS}
- BuiltIn.Set Suite Variable ${PORTS_MACADDR}
- OpenStackOperations.Update Port @{PORTS}[0] additional_args=--name ${UPDATE_PORT}
- ${output} = Show Port ${UPDATE_PORT}
- BuiltIn.Should Contain ${output} ${UPDATE_PORT}
- OpenStackOperations.Update Port ${UPDATE_PORT} additional_args=--name @{PORTS}[0]
-
-Create Nova VMs
- [Documentation] Launch a VM for each previously created port.
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] ${NET_1_VM_INSTANCES[0]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] ${NET_1_VM_INSTANCES[1]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] ${NET_2_VM_INSTANCES[0]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] ${NET_2_VM_INSTANCES[1]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- ${VM_INSTANCES} = BuiltIn.Create List @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES}
- BuiltIn.Set Suite Variable ${VM_INSTANCES}
- BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Wait For Routes To Propogate ${NETWORKS} ${SUBNETS4_CIDR}
- BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Wait For Routes To Propogate ${NETWORKS} ${SUBNETS6_CIDR}
- @{NET_1_VM_IPV4} ${NET_1_DHCP_IPV4} = OpenStackOperations.Get VM IPs @{NET_1_VM_INSTANCES}
- @{NET_2_VM_IPV4} ${NET_2_DHCP_IPV4} = OpenStackOperations.Get VM IPs @{NET_2_VM_INSTANCES}
- BuiltIn.Should Not Contain ${NET_1_VM_IPV4} None
- BuiltIn.Should Not Contain ${NET_2_VM_IPV4} None
- BuiltIn.Should Not Contain ${NET_1_DHCP_IPV4} None
- BuiltIn.Should Not Contain ${NET_2_DHCP_IPV4} None
- BuiltIn.Log Collect VMs IPv6 addresses
- ${prefix_net10} = String.Replace String @{SUBNETS6_CIDR}[0] ${IP6_SUBNET_CIDR_SUFFIX} ${IP6_ADDR_SUFFIX}
- ${prefix_net20} = String.Replace String @{SUBNETS6_CIDR}[1] ${IP6_SUBNET_CIDR_SUFFIX} ${IP6_ADDR_SUFFIX}
- ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
- ... true ${NET_1_VM_INSTANCES} @{NETWORKS}[0] ${prefix_net10}
- ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
- ... true ${NET_2_VM_INSTANCES} @{NETWORKS}[1] ${prefix_net20}
- ${NET_1_VM_IPV6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_1_VM_INSTANCES} @{NETWORKS}[0] ${prefix_net10}
- ${NET_2_VM_IPV6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_2_VM_INSTANCES} @{NETWORKS}[1] ${prefix_net20}
- ${LOOP_COUNT} Get Length ${NET_1_VM_INSTANCES}
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain @{NET_1_VM_IPV6}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_1_VM_INSTANCES}[${index}] 30s
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain @{NET_2_VM_IPV6}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_2_VM_INSTANCES}[${index}] 30s
- BuiltIn.Set Suite Variable ${NET_1_VM_IPV4}
- BuiltIn.Set Suite Variable ${NET_2_VM_IPV4}
- BuiltIn.Set Suite Variable ${NET_1_VM_IPV6}
- BuiltIn.Set Suite Variable ${NET_2_VM_IPV6}
- ${VM_IPS} = BuiltIn.Create List @{NET_1_VM_IPV4} @{NET_2_VM_IPV4} @{NET_1_VM_IPV6} @{NET_2_VM_IPV6}
- BuiltIn.Set Suite Variable ${VM_IPS}
- [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES}
- ... AND OpenStackOperations.Get Test Teardown Debugs
-
-Check ELAN Datapath Traffic Within The Networks
- [Documentation] Checks datapath within the same network with different vlans.
- ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV4[0]} ping -I ${NET_1_VM_IPV4[0]} -c 3 ${NET_1_VM_IPV4[1]}
- BuiltIn.Should Contain ${output} 64 bytes
- ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] ${NET_1_VM_IPV6[0]} ping6 -I ${NET_1_VM_IPV6[0]} -c 3 ${NET_1_VM_IPV6[1]}
- BuiltIn.Should Contain ${output} 64 bytes
- ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV4[0]} ping -I ${NET_2_VM_IPV4[0]} -c 3 ${NET_2_VM_IPV4[1]}
- BuiltIn.Should Contain ${output} 64 bytes
- ${output} = OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[1] ${NET_2_VM_IPV6[0]} ping6 -I ${NET_2_VM_IPV6[0]} -c 3 ${NET_2_VM_IPV6[1]}
- BuiltIn.Should Contain ${output} 64 bytes
-
Check L3_Datapath Traffic Across Networks With Router
[Documentation] L3 Datapath test across networks using previously created router.
BuiltIn.Log Verification of FIB Entries and Flow
BuiltIn.Should Contain ${resp} ${VPN_INSTANCE_ID[2]}
*** Keywords ***
+Suite Setup
+ VpnOperations.Basic Suite Setup
+ OpenStackOperations.Create Network @{NETWORKS}[0]
+ OpenStackOperations.Create Network @{NETWORKS}[1]
+ ${NET_LIST} = OpenStackOperations.List Networks
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
+ OpenStackOperations.Update Network @{NETWORKS}[0] additional_args=--description ${UPDATE_NETWORK}
+ ${output} = OpenStackOperations.Show Network @{NETWORKS}[0]
+ BuiltIn.Should Contain ${output} ${UPDATE_NETWORK}
+ OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS4}[0] @{SUBNETS4_CIDR}[0]
+ OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS6}[0] @{SUBNETS6_CIDR}[0] ${SUBNET_ADDITIONAL_ARGS}
+ OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS4}[1] @{SUBNETS4_CIDR}[1]
+ OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS6}[1] @{SUBNETS6_CIDR}[1] ${SUBNET_ADDITIONAL_ARGS}
+ ${SUB_LIST} = OpenStackOperations.List Subnets
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS4}
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS6}
+ OpenStackOperations.Update SubNet @{SUBNETS4}[0] additional_args=--description ${UPDATE_SUBNET}
+ ${output} = OpenStackOperations.Show SubNet @{SUBNETS4}[0]
+ BuiltIn.Should Contain ${output} ${UPDATE_SUBNET}
+ OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv4
+ OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=tcp
+ OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=tcp
+ OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress ethertype=IPv6 protocol=icmp
+ OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress ethertype=IPv6 protocol=icmp
+ OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=udp
+ OpenStackOperations.Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress ethertype=IPv6 port_range_max=65535 port_range_min=1 protocol=udp
+ ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[1]
+ OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ OpenStackOperations.Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ OpenStackOperations.Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${PORT_URL} ${PORTS}
+ ${PORTS_MACADDR} = OpenStackOperations.Get Ports MacAddr ${PORTS}
+ BuiltIn.Set Suite Variable ${PORTS_MACADDR}
+ OpenStackOperations.Update Port @{PORTS}[0] additional_args=--name ${UPDATE_PORT}
+ ${output} = Show Port ${UPDATE_PORT}
+ BuiltIn.Should Contain ${output} ${UPDATE_PORT}
+ OpenStackOperations.Update Port ${UPDATE_PORT} additional_args=--name @{PORTS}[0]
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] ${NET_1_VM_INSTANCES[0]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] ${NET_1_VM_INSTANCES[1]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] ${NET_2_VM_INSTANCES[0]} ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] ${NET_2_VM_INSTANCES[1]} ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ ${VM_INSTANCES} = BuiltIn.Create List @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES}
+ BuiltIn.Set Suite Variable ${VM_INSTANCES}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Wait For Routes To Propogate ${NETWORKS} ${SUBNETS4_CIDR}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s OpenStackOperations.Wait For Routes To Propogate ${NETWORKS} ${SUBNETS6_CIDR}
+ @{NET_1_VM_IPV4} ${NET_1_DHCP_IPV4} = OpenStackOperations.Get VM IPs @{NET_1_VM_INSTANCES}
+ @{NET_2_VM_IPV4} ${NET_2_DHCP_IPV4} = OpenStackOperations.Get VM IPs @{NET_2_VM_INSTANCES}
+ BuiltIn.Should Not Contain ${NET_1_VM_IPV4} None
+ BuiltIn.Should Not Contain ${NET_2_VM_IPV4} None
+ BuiltIn.Should Not Contain ${NET_1_DHCP_IPV4} None
+ BuiltIn.Should Not Contain ${NET_2_DHCP_IPV4} None
+ BuiltIn.Log Collect VMs IPv6 addresses
+ ${prefix_net10} = String.Replace String @{SUBNETS6_CIDR}[0] ${IP6_SUBNET_CIDR_SUFFIX} ${IP6_ADDR_SUFFIX}
+ ${prefix_net20} = String.Replace String @{SUBNETS6_CIDR}[1] ${IP6_SUBNET_CIDR_SUFFIX} ${IP6_ADDR_SUFFIX}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+ ... true ${NET_1_VM_INSTANCES} @{NETWORKS}[0] ${prefix_net10}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+ ... true ${NET_2_VM_INSTANCES} @{NETWORKS}[1] ${prefix_net20}
+ ${NET_1_VM_IPV6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_1_VM_INSTANCES} @{NETWORKS}[0] ${prefix_net10}
+ ${NET_2_VM_IPV6} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses false ${NET_2_VM_INSTANCES} @{NETWORKS}[1] ${prefix_net20}
+ ${LOOP_COUNT} Get Length ${NET_1_VM_INSTANCES}
+ : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain @{NET_1_VM_IPV6}[${index}] None
+ \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_1_VM_INSTANCES}[${index}] 30s
+ \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain @{NET_2_VM_IPV6}[${index}] None
+ \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{NET_2_VM_INSTANCES}[${index}] 30s
+ BuiltIn.Set Suite Variable ${NET_1_VM_IPV4}
+ BuiltIn.Set Suite Variable ${NET_2_VM_IPV4}
+ BuiltIn.Set Suite Variable ${NET_1_VM_IPV6}
+ BuiltIn.Set Suite Variable ${NET_2_VM_IPV6}
+ ${VM_IPS} = BuiltIn.Create List @{NET_1_VM_IPV4} @{NET_2_VM_IPV4} @{NET_1_VM_IPV6} @{NET_2_VM_IPV6}
+ BuiltIn.Set Suite Variable ${VM_IPS}
+ OpenStackOperations.Show Debugs @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES}
+ OpenStackOperations.Get Suite Debugs
+
+Suite Teardown
+ [Documentation] Delete the setup
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_ID}[0]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_ID}[1]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_ID}[2]
+ OpenStackOperations.OpenStack Suite Teardown
+
Verify GWMAC Flow Entry On Flow Table
[Arguments] ${cnIp}
[Documentation] Verify GWMAC Table, ARP Response table and Dispatcher table.
Documentation Test suite to validate IPv6 vpnservice functionality in an Openstack integrated environment.
... The assumption of this suite is that the environment is already configured with the proper
... integration bridges and vxlan tunnels.
-Suite Setup VpnOperations.Basic Suite Setup
-Suite Teardown OpenStackOperations.OpenStack Suite Teardown
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown OpenStackOperations.Get Test Teardown Debugs
Library OperatingSystem
@{RDS} ["2206:2"] ["2306:2"] ["2406:2"]
*** Test Cases ***
-Create Neutron Networks
- OpenStackOperations.Create Network @{NETWORKS}[0]
- OpenStackOperations.Create Network @{NETWORKS}[1]
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
- OpenStackOperations.Update Network @{NETWORKS}[0] additional_args=--description ${UPDATE_NETWORK}
- ${output} = OpenStackOperations.Show Network @{NETWORKS}[0]
- BuiltIn.Should Contain ${output} ${UPDATE_NETWORK}
-
-Create Neutron Subnets
- ${net1_additional_args}= BuiltIn.Catenate --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_IPV6_ADDR_POOL}
- ${net2_additional_args}= BuiltIn.Catenate --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_IPV6_ADDR_POOL}
- OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0] ${net1_additional_args}
- OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1] ${net2_additional_args}
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
- OpenStackOperations.Update SubNet @{SUBNETS}[0] additional_args=--description ${UPDATE_SUBNET}
- ${output} = OpenStackOperations.Show SubNet @{SUBNETS}[0]
- BuiltIn.Should Contain ${output} ${UPDATE_SUBNET}
-
-Create Router
- OpenStackOperations.Create Router ${ROUTER}
- ${router_list} = BuiltIn.Create List ${ROUTER}
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${ROUTER_URL} ${router_list}
-
-Add Interfaces To Router
- : FOR ${interface} IN @{SUBNETS}
- \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
- ${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
- : FOR ${interface} IN @{SUBNETS}
- \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${interface}
- \ BuiltIn.Should Contain ${interface_output} ${subnet_id}
- ${GWMAC_ADDRS} ${GWIP_ADDRS} = VpnOperations.Get Gateway MAC And IP Address ${ROUTER} ${IP6_REGEX}
- BuiltIn.Set Suite Variable ${GWMAC_ADDRS}
- BuiltIn.Set Suite Variable ${GWIP_ADDRS}
-
-Add Ssh V6 Allow All Rule
- OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv6
-
-Create Neutron Ports
- ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
- Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- BuiltIn.Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${PORT_URL} ${PORTS}
- OpenStackOperations.Update Port @{PORTS}[0] additional_args=--name ${UPDATE_PORT}
- ${output} = Show Port ${UPDATE_PORT}
- BuiltIn.Should Contain ${output} ${UPDATE_PORT}
- OpenStackOperations.Update Port ${UPDATE_PORT} additional_args=--name @{PORTS}[0]
-
-Create Nova VMs
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
- ${vms}= BuiltIn.Create List @{NET_1_VMS} @{NET_2_VMS}
- : FOR ${vm} IN @{vms}
- \ OpenStackOperations.Poll VM Is ACTIVE ${vm}
- BuiltIn.Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNET_CIDRS}
- ${prefix_net10} = Replace String @{SUBNET_CIDRS}[0] ::/64 (:[a-f0-9]{,4}){,4}
- ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
- ... fail_on_none=true vm_list=${NET_1_VMS} network=@{NETWORKS}[0] subnet=${prefix_net10}
- ${prefix_net20} = Replace String @{SUBNET_CIDRS}[1] ::/64 (:[a-f0-9]{,4}){,4}
- ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
- ... fail_on_none=true vm_list=${NET_2_VMS} network=@{NETWORKS}[1] subnet=${prefix_net20}
- ${VM_IP_NET10} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses fail_on_none=false vm_list=${NET_1_VMS} network=@{NETWORKS}[0] subnet=${prefix_net10}
- ${VM_IP_NET20} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses fail_on_none=false vm_list=${NET_2_VMS} network=@{NETWORKS}[1] subnet=${prefix_net20}
- ${VM_INSTANCES} = Collections.Combine Lists ${NET_1_VMS} ${NET_2_VMS}
- ${VM_IPS}= Collections.Combine Lists ${VM_IP_NET10} ${VM_IP_NET20}
- ${LOOP_COUNT} BuiltIn.Get Length ${NET_1_VMS}
- : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
- \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain @{VM_IPS}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' OpenStack CLI openstack console log show @{VM_INSTANCES}[${index}] 30s
- OpenStackOperations.Copy DHCP Files From Control Node
- BuiltIn.Set Suite Variable ${VM_IP_NET10}
- BuiltIn.Set Suite Variable ${VM_IP_NET20}
- BuiltIn.Should Not Contain ${VM_IP_NET10} None
- BuiltIn.Should Not Contain ${VM_IP_NET20} None
- [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
- ... AND OpenStackOperations.Get Test Teardown Debugs
-
Check ELAN Datapath Traffic Within The Networks
${output}= OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{VM_IP_NET10}[0] ping6 -c 3 @{VM_IP_NET10}[1]
BuiltIn.Should Contain ${output} 64 bytes
${resp}= VpnOperations.VPN Get L3VPN vpnid=@{VPN_INSTANCE_IDS}[2]
BuiltIn.Should Contain ${resp} @{VPN_INSTANCE_IDS}[2]
-Delete Multiple L3VPN
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[1]
- VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[2]
+*** Keywords ***
+Suite Setup
+ VpnOperations.Basic Suite Setup
+ OpenStackOperations.Create Network @{NETWORKS}[0]
+ OpenStackOperations.Create Network @{NETWORKS}[1]
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
+ OpenStackOperations.Update Network @{NETWORKS}[0] additional_args=--description ${UPDATE_NETWORK}
+ ${output} = OpenStackOperations.Show Network @{NETWORKS}[0]
+ BuiltIn.Should Contain ${output} ${UPDATE_NETWORK}
+ ${net1_additional_args}= BuiltIn.Catenate --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_IPV6_ADDR_POOL}
+ ${net2_additional_args}= BuiltIn.Catenate --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_IPV6_ADDR_POOL}
+ OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0] ${net1_additional_args}
+ OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1] ${net2_additional_args}
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
+ OpenStackOperations.Update SubNet @{SUBNETS}[0] additional_args=--description ${UPDATE_SUBNET}
+ ${output} = OpenStackOperations.Show SubNet @{SUBNETS}[0]
+ BuiltIn.Should Contain ${output} ${UPDATE_SUBNET}
+ OpenStackOperations.Create Router ${ROUTER}
+ ${router_list} = BuiltIn.Create List ${ROUTER}
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Utils.Check For Elements At URI ${ROUTER_URL} ${router_list}
+ : FOR ${interface} IN @{SUBNETS}
+ \ OpenStackOperations.Add Router Interface ${ROUTER} ${interface}
+ ${interface_output} = OpenStackOperations.Show Router Interface ${ROUTER}
+ : FOR ${interface} IN @{SUBNETS}
+ \ ${subnet_id} = OpenStackOperations.Get Subnet Id ${interface}
+ \ BuiltIn.Should Contain ${interface_output} ${subnet_id}
+ ${GWMAC_ADDRS} ${GWIP_ADDRS} = VpnOperations.Get Gateway MAC And IP Address ${ROUTER} ${IP6_REGEX}
+ BuiltIn.Set Suite Variable ${GWMAC_ADDRS}
+ BuiltIn.Set Suite Variable ${GWIP_ADDRS}
+ OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv6
+ ${allowed_address_pairs_args} = BuiltIn.Set Variable --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
+ Create Port @{NETWORKS}[0] @{PORTS}[0] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Create Port @{NETWORKS}[0] @{PORTS}[1] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Create Port @{NETWORKS}[1] @{PORTS}[2] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ Create Port @{NETWORKS}[1] @{PORTS}[3] sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ BuiltIn.Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${PORT_URL} ${PORTS}
+ OpenStackOperations.Update Port @{PORTS}[0] additional_args=--name ${UPDATE_PORT}
+ ${output} = Show Port ${UPDATE_PORT}
+ BuiltIn.Should Contain ${output} ${UPDATE_PORT}
+ OpenStackOperations.Update Port ${UPDATE_PORT} additional_args=--name @{PORTS}[0]
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
+ ${vms}= BuiltIn.Create List @{NET_1_VMS} @{NET_2_VMS}
+ : FOR ${vm} IN @{vms}
+ \ OpenStackOperations.Poll VM Is ACTIVE ${vm}
+ BuiltIn.Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNET_CIDRS}
+ ${prefix_net10} = Replace String @{SUBNET_CIDRS}[0] ::/64 (:[a-f0-9]{,4}){,4}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+ ... fail_on_none=true vm_list=${NET_1_VMS} network=@{NETWORKS}[0] subnet=${prefix_net10}
+ ${prefix_net20} = Replace String @{SUBNET_CIDRS}[1] ::/64 (:[a-f0-9]{,4}){,4}
+ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Wait Until Keyword Succeeds 3x 60s OpenStackOperations.Collect VM IPv6 SLAAC Addresses
+ ... fail_on_none=true vm_list=${NET_2_VMS} network=@{NETWORKS}[1] subnet=${prefix_net20}
+ ${VM_IP_NET10} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses fail_on_none=false vm_list=${NET_1_VMS} network=@{NETWORKS}[0] subnet=${prefix_net10}
+ ${VM_IP_NET20} = OpenStackOperations.Collect VM IPv6 SLAAC Addresses fail_on_none=false vm_list=${NET_2_VMS} network=@{NETWORKS}[1] subnet=${prefix_net20}
+ ${VM_INSTANCES} = Collections.Combine Lists ${NET_1_VMS} ${NET_2_VMS}
+ ${VM_IPS}= Collections.Combine Lists ${VM_IP_NET10} ${VM_IP_NET20}
+ ${LOOP_COUNT} BuiltIn.Get Length ${NET_1_VMS}
+ : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
+ \ ${status} ${message} Run Keyword And Ignore Error BuiltIn.Should Not Contain @{VM_IPS}[${index}] None
+ \ Run Keyword If '${status}' == 'FAIL' OpenStack CLI openstack console log show @{VM_INSTANCES}[${index}] 30s
+ OpenStackOperations.Copy DHCP Files From Control Node
+ BuiltIn.Set Suite Variable ${VM_IP_NET10}
+ BuiltIn.Set Suite Variable ${VM_IP_NET20}
+ BuiltIn.Should Not Contain ${VM_IP_NET10} None
+ BuiltIn.Should Not Contain ${VM_IP_NET20} None
+ OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
+ OpenStackOperations.Get Suite Debugs
+
+Suite Teardown
+ [Documentation] Delete the setup
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[0]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[1]
+ BuiltIn.Run Keyword And Ignore Error VpnOperations.VPN Delete L3VPN vpnid=@{VPN_INSTANCE_IDS}[2]
+ OpenStackOperations.OpenStack Suite Teardown
[Documentation] Test Suite for Network and Subnet Broadcast with security group
OpenStackOperations.OpenStack Suite Setup
Create Setup
+ OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
+ OpenStackOperations.Get Suite Debugs
Create Setup
: FOR ${network} IN @{NETWORKS}