- Create Setup
-
-Create Setup
- [Documentation] Create networks, subnets, ports and VMs
- : FOR ${network} IN @{NETWORKS}
- \ OpenStackOperations.Create Network ${network}
- ${neutron_networks} = OpenStackOperations.List Networks
- : FOR ${network} IN @{NETWORKS}
- \ BuiltIn.Should Contain ${neutron_networks} ${network}
- : 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}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HN} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[1] @{NET_1_VMS}[1] ${OS_CMP2_HN} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[2] @{NET_2_VMS}[0] ${OS_CMP1_HN} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[3] @{NET_2_VMS}[1] ${OS_CMP2_HN} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[4] @{NET_3_VMS}[0] ${OS_CMP1_HN} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Vm Instance With Port On Compute Node @{PORTS}[5] @{NET_3_VMS}[1] ${OS_CMP2_HN} sg=${SECURITY_GROUP}
- OpenStackOperations.Create Router ${ROUTERS}
- OpenStackOperations.Add Router Interface ${ROUTERS} @{SUBNETS}[1]
- OpenStackOperations.Add Router Interface ${ROUTERS} @{SUBNETS}[2]
- ${net_id} = OpenStackOperations.Get Net Id @{NETWORKS}[0]
- BuiltIn.Set Suite Variable ${net_id}
- ${tenant_id} = OpenStackOperations.Get Tenant ID From Network ${net_id}
- BuiltIn.Set Suite Variable ${tenant_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]
- 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 ${ROUTERS}
- 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}