Should Not Contain ${output} 64 bytes
Ping Vm From Control Node
- [Arguments] ${vm_floating_ip}
+ [Arguments] ${vm_floating_ip} ${additional_args}=${EMPTY}
[Documentation] Ping VM floating IP from control node
Log ${vm_floating_ip}
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt ping -c 3 ${vm_floating_ip} 20s
+ ${output}= Write Commands Until Prompt ping ${additional_args} -c 3 ${vm_floating_ip} 20s
Log ${output}
Close Connection
Should Contain ${output} 64 bytes
Run Keyword If ${rcode} Write Commands Until Prompt exit
Check Ping
- [Arguments] ${ip_address}
+ [Arguments] ${ip_address} ${ttl}=64
[Documentation] Run Ping command on the IP available as argument
- ${output}= Write Commands Until Expected Prompt ping -c 3 ${ip_address} ${OS_SYSTEM_PROMPT}
+ ${output}= Write Commands Until Expected Prompt ping -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT}
Should Contain ${output} 64 bytes
Check Metadata Access
[Return] ${output}
Test Operations From Vm Instance
- [Arguments] ${net_name} ${src_ip} ${dest_ips} ${user}=cirros ${password}=cubswin:)
+ [Arguments] ${net_name} ${src_ip} ${dest_ips} ${user}=cirros ${password}=cubswin:) ${ttl}=64
[Documentation] Login to the vm instance using ssh in the network.
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
\ Log ${dest_ip}
\ ${string_empty}= Run Keyword And Return Status Should Be Empty ${dest_ip}
\ Run Keyword If ${string_empty} Continue For Loop
- \ Run Keyword If ${rcode} Check Ping ${dest_ip}
+ \ Run Keyword If ${rcode} Check Ping ${dest_ip} ttl=${ttl}
Run Keyword If ${rcode} Check Metadata Access
[Teardown] Exit From Vm Console
@{VM_INSTANCES_FLOATING} VmInstanceFloating1 VmInstanceFloating2
@{VM_INSTANCES_SNAT} VmInstanceSnat3 VmInstanceSnat4
@{SUBNETS_RANGE} 90.0.0.0/24
+# Parameter values below are based on releng/builder - changing them requires updates in releng/builder as well
${external_gateway} 10.10.10.250
+${external_pnf} 10.10.10.253
${external_subnet} 10.10.10.0/24
+${external_subnet_allocation_pool} start=10.10.10.2,end=10.10.10.249
+${external_internet_addr} 10.9.9.9
${external_net_name} external-net
${external_subnet_name} external-subnet
${network1_vlan_id} 167
Create External Network And Subnet
Create Network ${external_net_name} --router:external --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id}
- Create Subnet ${external_net_name} ${external_subnet_name} ${external_subnet} --gateway ${external_gateway}
+ Create Subnet ${external_net_name} ${external_subnet_name} ${external_subnet} --gateway ${external_gateway} --allocation-pool ${external_subnet_allocation_pool}
Create Router
[Documentation] Create Router and Add Interface to the subnets.
Ping External Gateway From Control Node
[Documentation] Check reachability of external gateway by pinging it from the control node.
- OpenStackOperations.Ping Vm From Control Node ${external_gateway}
+ OpenStackOperations.Ping Vm From Control Node ${external_gateway} additional_args=-I ${external_internet_addr}
Ping Vm Instance1 Floating IP From Control Node
[Documentation] Check reachability of VM instance through floating IP by pinging them.
- OpenStackOperations.Ping Vm From Control Node @{VM_FLOATING_IPS}[0]
+ OpenStackOperations.Ping Vm From Control Node @{VM_FLOATING_IPS}[0] additional_args=-I ${external_internet_addr}
Ping Vm Instance2 Floating IP From Control Node
[Documentation] Check reachability of VM instance through floating IP by pinging them.
- OpenStackOperations.Ping Vm From Control Node @{VM_FLOATING_IPS}[1]
+ OpenStackOperations.Ping Vm From Control Node @{VM_FLOATING_IPS}[1] additional_args=-I ${external_internet_addr}
+
+Ping External Network PNF from Vm Instance 1
+ [Documentation] Check reachability of External Network PNF from VM instance (with ttl=1 to make sure no router hops)
+ Pass Execution If "${ODL_STREAM}" == "boron" PNF subnet route support is not available in boron or earlier
+ ${dst_ip}= Create List ${external_pnf}
+ OpenStackOperations.Test Operations From Vm Instance @{NETWORKS_NAME}[0] @{FLOATING_VM_IPS}[0] ${dst_ip} ttl=1
Prepare SNAT - Install Netcat On Controller
Install Netcat On Controller
${external_physical_network} physnet1
${external_net_name} external-net
${external_subnet_name} external-subnet
+# Parameter values below are based on releng/builder - changing them requires updates in releng/builder as well
${external_gateway} 10.10.10.250
+${external_subnet_allocation_pool} start=10.10.10.2,end=10.10.10.249
${external_subnet} 10.10.10.0/24
${network_vlan_id} 167
\ Exit For Loop If '${feature_check_status}' == 'True'
Run Keyword If '${feature_check_status}' == 'True' Create Network ${external_net_name} --router:external --provider:network_type=flat --provider:physical_network=${external_physical_network}
... ELSE Create Network ${external_net_name} --router:external --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network_vlan_id}
- Create Subnet ${external_net_name} ${external_subnet_name} ${external_subnet} --gateway ${external_gateway}
+ Create Subnet ${external_net_name} ${external_subnet_name} ${external_subnet} --gateway ${external_gateway} --allocation-pool ${external_subnet_allocation_pool}
List Networks
${control_node_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Flexible SSH Login ${OS_USER}