*** Settings ***
Documentation Test suite to verify packet flows between vm instances.
-Suite Setup Devstack Suite Setup Tests
+Suite Setup BuiltIn.Run Keywords SetupUtils.Setup_Utils_For_Setup_And_Teardown
+... AND DevstackUtils.Devstack Suite Setup Tests
Suite Teardown Close All Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown Run Keywords Show Debugs ${NET_1_VM_INSTANCES}
+... AND Show Debugs ${NET_2_VM_INSTANCES}
+... AND Get OvsDebugInfo
Library SSHLibrary
Library OperatingSystem
Library RequestsLibrary
Resource ../../../libraries/Utils.robot
Resource ../../../libraries/OpenStackOperations.robot
Resource ../../../libraries/DevstackUtils.robot
+Resource ../../../libraries/SetupUtils.robot
*** Variables ***
@{NETWORKS_NAME} l2_network_1 l2_network_2
[Documentation] Create Sub Nets for the Networks with neutron request.
Create SubNet l2_network_2 l2_subnet_2 @{SUBNETS_RANGE}[1]
+Add Ssh Allow Rule
+ [Documentation] Allow all TCP packets for testing
+ Create Security Group csit "CSIT SSH Allow"
+ Create Security Rule ingress tcp 1 65535 0.0.0.0/0 csit
+ Create Security Rule egress tcp 1 65535 0.0.0.0/0 csit
+
Create Vm Instances For l2_network_1
[Documentation] Create Four Vm instances using flavor and image names for a network.
- Create Vm Instances l2_network_1 ${NET_1_VM_INSTANCES}
- [Teardown] Show Debugs ${NET_1_VM_INSTANCES}
+ Create Vm Instances l2_network_1 ${NET_1_VM_INSTANCES} sg=csit
Create Vm Instances For l2_network_2
[Documentation] Create Four Vm instances using flavor and image names for a network.
- Create Vm Instances l2_network_2 ${NET_2_VM_INSTANCES}
- [Teardown] Show Debugs ${NET_2_VM_INSTANCES}
+ Create Vm Instances l2_network_2 ${NET_2_VM_INSTANCES} sg=csit
Ping Vm Instance1 In l2_network_1
[Documentation] Check reachability of vm instances by pinging to them.
+ Get OvsDebugInfo
Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[0]
Ping Vm Instance2 In l2_network_1
[Documentation] Check reachability of vm instances by pinging to them.
+ Get OvsDebugInfo
Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[1]
Ping Vm Instance3 In l2_network_1
[Documentation] Check reachability of vm instances by pinging to them.
+ Get OvsDebugInfo
Ping Vm From DHCP Namespace l2_network_1 @{NET_1_VM_IPS}[2]
Ping Vm Instance1 In l2_network_2
[Documentation] Check reachability of vm instances by pinging to them.
+ Get OvsDebugInfo
Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[0]
Ping Vm Instance2 In l2_network_2
[Documentation] Check reachability of vm instances by pinging to them.
+ Get OvsDebugInfo
Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[1]
Ping Vm Instance3 In l2_network_2
[Documentation] Check reachability of vm instances by pinging to them.
+ Get OvsDebugInfo
Ping Vm From DHCP Namespace l2_network_2 @{NET_2_VM_IPS}[2]
Connectivity Tests From Vm Instance1 In l2_network_1
[Documentation] Logging to the vm instance1
${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
Log ${dst_ip_list}
+ Get OvsDebugInfo
Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
Connectivity Tests From Vm Instance2 In l2_network_1
[Documentation] Logging to the vm instance2
${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
Log ${dst_ip_list}
+ Get OvsDebugInfo
Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
Connectivity Tests From Vm Instance3 In l2_network_1
[Documentation] Logging to the vm instance2
${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1]
Log ${dst_ip_list}
+ Get OvsDebugInfo
Test Operations From Vm Instance l2_network_1 @{NET_1_VM_IPS}[2] ${dst_ip_list}
Connectivity Tests From Vm Instance1 In l2_network_2
[Documentation] Logging to the vm instance using generated key pair.
${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
Log ${dst_ip_list}
+ Get OvsDebugInfo
Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
Connectivity Tests From Vm Instance2 In l2_network_2
[Documentation] Logging to the vm instance using generated key pair.
${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
Log ${dst_ip_list}
+ Get OvsDebugInfo
Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
Connectivity Tests From Vm Instance3 In l2_network_2
[Documentation] Logging to the vm instance using generated key pair.
${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1]
Log ${dst_ip_list}
+ Get OvsDebugInfo
Test Operations From Vm Instance l2_network_2 @{NET_2_VM_IPS}[2] ${dst_ip_list}
Delete A Vm Instance
No Ping For Deleted Vm
[Documentation] Check non reachability of deleted vm instances by pinging to them.
+ Get OvsDebugInfo
${output}= Ping From DHCP Should Not Succeed l2_network_1 @{NET_1_VM_IPS}[0]
Delete Vm Instances In l2_network_1