${BFD_ENABLED_TRUE} true
${PING_REGEXP} , 0% packet loss
${VAR_BASE} ${CURDIR}/../../../variables/netvirt
+${SECURITY_GROUP} sg-vpnservice-bfd
*** Test Cases ***
TC00 Verify Setup
[Documentation] Verify if tunnels are present. If not then create new tunnel.
: FOR ${VM} IN @{VM_INSTANCES_NET1} @{VM_INSTANCES_NET2}
- \ Wait Until Keyword Succeeds 25s 5s Verify VM Is ACTIVE ${VM}
+ \ Poll VM Is ACTIVE ${VM}
${VM_IP_NET1} ${VM_IP_NET2} Wait Until Keyword Succeeds 180s 10s Verify VMs received IP
Set Suite Variable ${VM_IP_NET2}
Set Suite Variable ${VM_IP_NET1}
Log ${count}
Run Keyword If ${count} == 0 Create Tunnel
[Teardown] Run Keywords Show Debugs @{VM_INSTANCES_NET1} @{VM_INSTANCES_NET2}
- ... AND Get Suite Teardown Debugs
+ ... AND Get Test Teardown Debugs
TC01 Verify That Default Tunnel Type Is Set To BFD
[Documentation] Verify that the default tunnel type is set to BFD if both the devices support BFD
Should Contain ${SUB_LIST} ${SUBNETS[0]}
Should Contain ${SUB_LIST} ${SUBNETS[1]}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
- Neutron Security Group Create sg-vpnservice1
- Neutron Security Group Rule Create sg-vpnservice1 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 sg-vpnservice1 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 sg-vpnservice1 direction=ingress protocol=icmp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create sg-vpnservice1 direction=egress protocol=icmp remote_ip_prefix=0.0.0.0/0
- Neutron Security Group Rule Create sg-vpnservice1 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 sg-vpnservice1 direction=egress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
+ OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
Log Create four ports under previously created subnets
- Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=sg-vpnservice1
- Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=sg-vpnservice1
- Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=sg-vpnservice1
- Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=sg-vpnservice1
+ Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=${SECURITY_GROUP}
+ Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=${SECURITY_GROUP}
+ Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=${SECURITY_GROUP}
+ Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=${SECURITY_GROUP}
Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${PORT_URL} ${PORT_LIST}
Log Create VM Instances
- Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES_NET1[0]} ${OS_COMPUTE_1_IP} sg=sg-vpnservice1
- Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES_NET1[1]} ${OS_COMPUTE_2_IP} sg=sg-vpnservice1
- Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES_NET2[0]} ${OS_COMPUTE_1_IP} sg=sg-vpnservice1
- Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES_NET2[1]} ${OS_COMPUTE_2_IP} sg=sg-vpnservice1
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES_NET1[0]} ${OS_COMPUTE_1_IP} sg=${SECURITY_GROUP}
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES_NET1[1]} ${OS_COMPUTE_2_IP} sg=${SECURITY_GROUP}
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES_NET2[0]} ${OS_COMPUTE_1_IP} sg=${SECURITY_GROUP}
+ Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES_NET2[1]} ${OS_COMPUTE_2_IP} sg=${SECURITY_GROUP}
Verify VMs received IP
[Documentation] Verify VMs received IP
${LOOP_COUNT} Get Length ${VM_INSTANCES_NET1}
: FOR ${index} IN RANGE 0 ${LOOP_COUNT}
\ ${status} ${message} Run Keyword And Ignore Error Should Not Contain @{VM_IPS}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{VM_INSTANCES}[${index}] 30s
+ \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt openstack console log show @{VM_INSTANCES}[${index}] 30s
Log ${VM_IP_NET1}
Log ${VM_IP_NET2}
Should Not Contain ${VM_IP_NET2} None
Log Delete networks
: FOR ${Network} IN @{NETWORKS}
\ Delete Network ${Network}
- Delete SecurityGroup sg-vpnservice1
+ Delete SecurityGroup ${SECURITY_GROUP}