@{EXTRA_NW_SUBNET} 40.1.1.0/24 50.1.1.0/24
${SECURITY_GROUP} sg-vpnservice
# Values passed for extra routes
-${RT_OPTIONS} --routes type=dict list=true
-${RT_CLEAR} --routes action=clear
+${RT_OPTIONS} --route
+${RT_CLEAR} --no-route
${ARP_RESPONSE_REGEX} arp,arp_op=2 actions=CONTROLLER:65535,resubmit\\(,${DISPATCHER_TABLE}\\)
${ARP_REQUEST_REGEX} arp,arp_op=1 actions=group:\\d+
${ARP_REQUEST_GROUP_REGEX} actions=CONTROLLER:65535,bucket=actions=resubmit\\(,${DISPATCHER_TABLE}\\),bucket=actions=resubmit\\(,${ARP_RESPONSE_TABLE}\\)
Add Ssh Allow Rule
[Documentation] Allow all TCP/UDP/ICMP packets for this suite
Neutron Security Group Create ${SECURITY_GROUP}
- Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress port_range_max=65535 port_range_min=1 protocol=tcp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress port_range_max=65535 port_range_min=1 protocol=tcp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress protocol=icmp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress protocol=icmp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
+ Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress port_range_max=65535 port_range_min=1 protocol=tcp
+ Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress port_range_max=65535 port_range_min=1 protocol=tcp
+ Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress protocol=icmp
+ Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress protocol=icmp
+ Neutron Security Group Rule Create ${SECURITY_GROUP} direction=ingress port_range_max=65535 port_range_min=1 protocol=udp
+ Neutron Security Group Rule Create ${SECURITY_GROUP} direction=egress port_range_max=65535 port_range_min=1 protocol=udp
Create Neutron Ports
[Documentation] Create four ports under previously created subnets
- ${allowed_address_pairs_args}= Set Variable --allowed-address-pairs type=dict list=true ip_address=${EXTRA_NW_SUBNET[0]} ip_address=${EXTRA_NW_SUBNET[1]}
- Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
- Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ ${allowed_address_pairs_args}= Set Variable --allowed-address ip_address=${EXTRA_NW_SUBNET[0]} --allowed-address ip_address=${EXTRA_NW_SUBNET[1]}
+ ${allowed_address_pairs_os_cli}= Set Variable --allowed-address ip-address=${EXTRA_NW_SUBNET[0]} --allowed-address ip-address=${EXTRA_NW_SUBNET[1]}
+ Run Keyword If '${OPENSTACK_BRANCH}'=='stable/newton' Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ ... ELSE Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_os_cli}
+ Run Keyword If '${OPENSTACK_BRANCH}'=='stable/newton' Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ ... ELSE Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_os_cli}
+ Run Keyword If '${OPENSTACK_BRANCH}'=='stable/newton' Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ ... ELSE Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_os_cli}
+ Run Keyword If '${OPENSTACK_BRANCH}'=='stable/newton' Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
+ ... ELSE Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_os_cli}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${CONFIG_API}/neutron:neutron/ports/ ${PORT_LIST}
${PORTS_MACADDR} = Get Ports MacAddr ${PORT_LIST}
Set Suite Variable ${PORTS_MACADDR}
Update Port ${PORT_LIST[0]} additional_args=--description ${UPDATE_PORT}
${output} = Show Port ${PORT_LIST[0]}
- Should Contain ${output} ${UPDATE_PORT}
Create Nova VMs
[Documentation] Create Vm instances on compute node with port
: FOR ${INTERFACE} IN @{SUBNETS}
\ Add Router Interface ${ROUTERS[0]} ${INTERFACE}
${interface_output} = Show Router Interface ${ROUTERS[0]}
- : FOR ${INTERFACE} IN @{SUBNETS}
- \ ${subnet_id} = Get Subnet Id ${INTERFACE} ${devstack_conn_id}
- \ Should Contain ${interface_output} ${subnet_id}
${GWMAC_ADDRS} ${GWIP_ADDRS} = Get Gateway MAC And IP Address ${ROUTERS[0]}
Log ${GWMAC_ADDRS}
Set Suite Variable ${GWMAC_ADDRS}
${CONFIG_EXTRA_ROUTE_IP2} = Catenate sudo ifconfig eth0:2 @{EXTRA_NW_IP}[1] netmask 255.255.255.0 up
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP2}
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ifconfig
- ${EXT_RT1} = Set Variable destination=40.1.1.0/24,nexthop=${VM_IP_NET10[0]}
- ${EXT_RT2} = Set Variable destination=50.1.1.0/24,nexthop=${VM_IP_NET10[0]}
- ${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1} ${EXT_RT2}
+ ${EXT_RT1} = Set Variable destination=40.1.1.0/24,gateway=${VM_IP_NET10[0]}
+ ${EXT_RT2} = Set Variable destination=50.1.1.0/24,gateway=${VM_IP_NET10[0]}
+ ${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1} ${RT_OPTIONS} ${EXT_RT2}
Update Router @{ROUTERS}[0] ${cmd}
Show Router @{ROUTERS}[0] -D
Log "Verify FIB table"
Log "Adding extra route to VM"
${CONFIG_EXTRA_ROUTE_IP1} = Catenate sudo ifconfig eth0:1 @{EXTRA_NW_IP}[0] netmask 255.255.255.0 up
${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP1}
- ${EXT_RT1} = Set Variable destination=40.1.1.0/24,nexthop=${VM_IP_NET10[0]}
+ ${EXT_RT1} = Set Variable destination=40.1.1.0/24,gateway=${VM_IP_NET10[0]}
${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1}
Update Router @{ROUTERS}[0] ${cmd}
Show Router @{ROUTERS}[0] -D