+*** 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