From 68dc079fef646a1935bfa8c6a53ba522fe774691 Mon Sep 17 00:00:00 2001 From: Oleksandr Zharov Date: Wed, 3 Jan 2024 15:55:17 +0100 Subject: [PATCH 1/1] Remove testplans and suites for openstack Removed testplans and suites for no more active openstack project. JIRA: INTTEST-140 Change-Id: I3742f67e948318b5f0457a314b965d7a3138143f Signed-off-by: Oleksandr Zharov --- .../l2gw/01_Configure_verify_l2gateway.robot | 502 ---------- csit/suites/openstack/clustering/ha_l2.robot | 283 ------ csit/suites/openstack/clustering/ha_l3.robot | 484 ---------- .../clustering/ha_l3_block_port.robot | 303 ------ .../connectivity/external_network.robot | 360 ------- csit/suites/openstack/connectivity/l2.robot | 127 --- csit/suites/openstack/connectivity/l3.robot | 267 ------ .../connectivity/live_migration.robot | 81 -- .../connectivity/security_group.robot | 285 ------ csit/suites/openstack/extensions/sfc.robot | 894 ------------------ .../openstack/neutron/001__reachability.robot | 26 - .../openstack/neutron/010__networks.robot | 54 -- .../openstack/neutron/020__subnets.robot | 55 -- .../suites/openstack/neutron/030__ports.robot | 54 -- .../openstack/neutron/040__delete_ports.robot | 46 - .../neutron/050__delete_subnets.robot | 47 - .../neutron/060__delete_networks.robot | 46 - csit/suites/openstack/neutron/__init__.robot | 39 - csit/suites/openstack/securitygroup/acl.robot | 253 ----- .../neutron_security_group.robot | 146 --- .../security_group_l3bcast.robot | 303 ------ csit/suites/openstack/tempest/tempest.robot | 73 -- csit/testplans/vtn-1node-openstack.txt | 1 - 23 files changed, 4729 deletions(-) delete mode 100644 csit/suites/l2gw/01_Configure_verify_l2gateway.robot delete mode 100644 csit/suites/openstack/clustering/ha_l2.robot delete mode 100644 csit/suites/openstack/clustering/ha_l3.robot delete mode 100644 csit/suites/openstack/clustering/ha_l3_block_port.robot delete mode 100644 csit/suites/openstack/connectivity/external_network.robot delete mode 100644 csit/suites/openstack/connectivity/l2.robot delete mode 100644 csit/suites/openstack/connectivity/l3.robot delete mode 100644 csit/suites/openstack/connectivity/live_migration.robot delete mode 100644 csit/suites/openstack/connectivity/security_group.robot delete mode 100644 csit/suites/openstack/extensions/sfc.robot delete mode 100644 csit/suites/openstack/neutron/001__reachability.robot delete mode 100644 csit/suites/openstack/neutron/010__networks.robot delete mode 100644 csit/suites/openstack/neutron/020__subnets.robot delete mode 100644 csit/suites/openstack/neutron/030__ports.robot delete mode 100644 csit/suites/openstack/neutron/040__delete_ports.robot delete mode 100644 csit/suites/openstack/neutron/050__delete_subnets.robot delete mode 100644 csit/suites/openstack/neutron/060__delete_networks.robot delete mode 100644 csit/suites/openstack/neutron/__init__.robot delete mode 100644 csit/suites/openstack/securitygroup/acl.robot delete mode 100644 csit/suites/openstack/securitygroup/neutron_security_group.robot delete mode 100644 csit/suites/openstack/securitygroup/security_group_l3bcast.robot delete mode 100644 csit/suites/openstack/tempest/tempest.robot delete mode 100644 csit/testplans/vtn-1node-openstack.txt diff --git a/csit/suites/l2gw/01_Configure_verify_l2gateway.robot b/csit/suites/l2gw/01_Configure_verify_l2gateway.robot deleted file mode 100644 index 2024b07463..0000000000 --- a/csit/suites/l2gw/01_Configure_verify_l2gateway.robot +++ /dev/null @@ -1,502 +0,0 @@ -*** Settings *** -Documentation Test Suite for verification of HWVTEP usecases - -Resource ../../libraries/L2GatewayOperations.robot - -Suite Setup Basic Suite Setup -Suite Teardown Basic Suite Teardown -Test Teardown Get L2gw Debug Info - - -*** Test Cases *** -TC01 Configure Hwvtep Manager OVS Manager Controller And Verify - [Documentation] Configure ODL at ${ODL_IP} as manager for HWVTEP - L2GatewayOperations.Add Vtep Manager And Verify ${ODL_IP} - -TC02 Create First Set Of Network Subnet And Ports - [Documentation] Create Networks and Ports - OpenStackOperations.Create Network ${NET_1} ${NET_ADDT_ARG} ${NET_1_SEGID} - ${output}= OpenStackOperations.List Networks - Should Contain ${output} ${NET_1} - OpenStackOperations.Create SubNet ${NET_1} ${SUBNET_1} ${SUBNET_RANGE1} ${SUBNET_ADDT_ARG} - ${output}= OpenStackOperations.List Subnets - Should Contain ${output} ${SUBNET_1} - OpenStackOperations.Create And Configure Security Group ${SECURITY_GROUP_L2GW} - OpenStackOperations.Create Port ${NET_1} ${OVS_PORT_1} sg=${SECURITY_GROUP_L2GW} - OpenStackOperations.Create Neutron Port With Additional Params - ... ${NET_1} - ... ${HWVTEP_PORT_1} - ... ${SECURITY_GROUP_L2GW_NONE} - ${port_mac}= Get Port Mac ${OVS_PORT_1} #port_mac[0] - ${port_ip}= Get Port Ip ${OVS_PORT_1} #port_ip[0] - Append To List ${port_mac_list} ${port_mac} - Append To List ${port_ip_list} ${port_ip} - ${port_mac}= Get Port Mac ${HWVTEP_PORT_1} #port_mac[1] - ${port_ip}= Get Port Ip ${HWVTEP_PORT_1} #port_ip[1] - Append To List ${port_mac_list} ${port_mac} - Append To List ${port_ip_list} ${port_ip} - -TC03 Update Port For Hwvtep And Attach Port To Namespace - [Documentation] Update the Neutron Ports for required to connect to HWVTEP and attach that port to tap port in namespace - L2GatewayOperations.Update Port For Hwvtep ${HWVTEP_PORT_1} - Wait Until Keyword Succeeds - ... 30s - ... 2s - ... L2GatewayOperations.Attach Port To Hwvtep Namespace - ... ${port_mac_list[1]} - ... ${HWVTEP_NS1} - ... ${NS_TAP1} - -TC04 Create Vms On Compute Node - [Documentation] Create VM on compute node and verify that VM got IP address - # FIXME! Don't need this in queens, but do in earlier releases - OpenStackOperations.Create Nano Flavor - OpenStackOperations.Create Vm Instance With Port On Compute Node - ... ${OVS_PORT_1} - ... ${OVS_VM1_NAME} - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP_L2GW} - ${vm_ip}= Wait Until Keyword Succeeds 60s 2s L2GatewayOperations.Verify Nova VM IP ${OVS_VM1_NAME} - Log ${vm_ip} - Should Contain ${vm_ip} ${port_ip_list[0]} - -TC05 Create L2Gateway And Connection And Verify - [Documentation] Create L2GW and Connection using Neutron CLI. Verify info in hardware_vtep db in HWVTEP emulator. - ${output}= L2GatewayOperations.Create Verify L2Gateway ${HWVTEP_BRIDGE} ${NS_PORT1} ${L2GW_NAME1} - Log ${output} - ${output}= Wait Until Keyword Succeeds - ... 30s - ... 2s - ... L2GatewayOperations.Create Verify L2Gateway Connection - ... ${L2GW_NAME1} - ... ${NET_1} - Log ${output} - Wait Until Keyword Succeeds 30s 2s L2GatewayOperations.Verify Ovs Tunnel ${HWVTEP_IP} ${OVS_IP} - ${output}= ITM Get Tunnels - Log ${output} - Should Contain ${output} physicalswitch/${HWVTEP_BRIDGE} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${TUNNEL_TABLE} - ... enable="true" - ${phy_port_out}= Get Vtep List ${PHYSICAL_PORT_TABLE} - Validate Regexp In String ${phy_port_out} ${VLAN_BINDING_REGEX} 1 - ${list}= Create List ${OVS_IP} ${HWVTEP_IP} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${PHYSICAL_LOCATOR_TABLE} - ... @{list} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${UCAST_MACS_REMOTE_TABLE} - ... ${port_mac_list[0]} - -TC06 Dhcp Ip Allocation For Hwvtep Tap Port - [Documentation] Verify that HWVTEP port gets an IP address - Wait Until Keyword Succeeds - ... 180s - ... 10s - ... L2GatewayOperations.Namespace Dhclient Verify - ... ${HWVTEP_NS1} - ... ${NS_TAP1} - ... ${port_ip_list[1]} - -TC07 Verify Ping From Compute Node Vm To Hwvtep - [Documentation] Verify that VM on Compute Node can ping HWVTEP port - ${output}= Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Execute Command on VM Instance - ... ${NET_1} - ... ${port_ip_list[0]} - ... ping -c 3 ${port_ip_list[1]} - Log ${output} - Should Not Contain ${output} ${PACKET_LOSS} - ${src_mac_list}= Create List ${port_mac_list[0]} - ${dst_mac_list}= Create List ${port_mac_list[1]} - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Elan Flow Entries - ... ${OVS_IP} - ... ${src_mac_list} - ... ${dst_mac_list} - -TC08 Ping Verification From Namespace Tap To Ovs Vm - [Documentation] Verify that HWVTEP port can ping VM on compute node - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Ping In Namespace Extra Timeout - ... ${HWVTEP_NS1} - ... ${port_mac_list[1]} - ... ${port_ip_list[0]} - -TC09 Additional Network Subnet Port Creation - [Documentation] Create 2nd network and ports - OpenStackOperations.Create Network ${NET_2} ${NET_ADDT_ARG} ${NET_2_SEGID} - ${output}= OpenStackOperations.List Networks - Should Contain ${output} ${NET_2} - OpenStackOperations.Create SubNet ${NET_2} ${SUBNET_2} ${SUBNET_RANGE2} ${SUBNET_ADDT_ARG} - ${output}= OpenStackOperations.List Subnets - Should Contain ${output} ${SUBNET_2} - OpenStackOperations.Create Port ${NET_2} ${OVS_PORT_2} sg=${SECURITY_GROUP_L2GW} - OpenStackOperations.Create Neutron Port With Additional Params - ... ${NET_2} - ... ${HWVTEP_PORT_2} - ... ${SECURITY_GROUP_L2GW_NONE} - ${port_mac}= Get Port Mac ${OVS_PORT_2} #port_mac[2] - ${port_ip}= Get Port Ip ${OVS_PORT_2} #port_ip[2] - Append To List ${port_mac_list} ${port_mac} - Append To List ${port_ip_list} ${port_ip} - ${port_mac}= Get Port Mac ${HWVTEP_PORT_2} #port_mac[3] - ${port_ip}= Get Port Ip ${HWVTEP_PORT_2} #port_ip[3] - Append To List ${port_mac_list} ${port_mac} - Append To List ${port_ip_list} ${port_ip} - -TC10 Update And Attach Second Port To Hwvtep Create L2gw Connection - [Documentation] Update ports in Neutron so they can be connected to HWVTEP, create 2nd L2GW and Connection, and Verify - L2GatewayOperations.Update Port For Hwvtep ${HWVTEP_PORT_2} - Wait Until Keyword Succeeds - ... 30s - ... 2s - ... L2GatewayOperations.Attach Port To Hwvtep Namespace - ... ${port_mac_list[3]} - ... ${HWVTEP_NS2} - ... ${NS2_TAP1} - OpenStackOperations.Create Vm Instance With Port On Compute Node - ... ${OVS_PORT_2} - ... ${OVS_VM2_NAME} - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP_L2GW} - ${vm_ip}= Wait Until Keyword Succeeds 60s 2s L2GatewayOperations.Verify Nova VM IP ${OVS_VM2_NAME} - Log ${vm_ip} - Should Contain ${vm_ip} ${port_ip_list[2]} - ${output}= L2GatewayOperations.Create Verify L2Gateway ${HWVTEP_BRIDGE} ${NS_PORT2} ${L2GW_NAME2} - Log ${output} - ${output}= L2GatewayOperations.Create Verify L2Gateway Connection ${L2GW_NAME2} ${NET_2} - Log ${output} - ${phy_port_out}= Get Vtep List ${PHYSICAL_PORT_TABLE} - Validate Regexp In String ${phy_port_out} ${VLAN_BINDING_REGEX} 2 - -TC11 Dhcp Ip Allocation And Ping Validation Within Second Network - [Documentation] Verify that port in namespace got an IP. Verify flow entries, verify IP connectivity between HWVTEP port and VM - Wait Until Keyword Succeeds - ... 180s - ... 10s - ... L2GatewayOperations.Namespace Dhclient Verify - ... ${HWVTEP_NS2} - ... ${NS2_TAP1} - ... ${port_ip_list[3]} - ${output}= Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Execute Command on VM Instance - ... ${NET_2} - ... ${port_ip_list[2]} - ... ping -c 3 ${port_ip_list[3]} - Log ${output} - Should Not Contain ${output} ${PACKET_LOSS} - ${src_mac_list}= Create List ${port_mac_list[2]} - ${dst_mac_list}= Create List ${port_mac_list[3]} - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Elan Flow Entries - ... ${OVS_IP} - ... ${src_mac_list} - ... ${dst_mac_list} - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Ping In Namespace Extra Timeout - ... ${HWVTEP_NS2} - ... ${port_mac_list[3]} - ... ${port_ip_list[2]} - -TC12 Ping Between Vm In Second Network To Namespace In First Network - [Documentation] Verify IP Connectivity between VM in 2nd network to NS in 1st network - ${output}= Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Execute Command on VM Instance - ... ${NET_2} - ... ${port_ip_list[2]} - ... ping -c 3 ${port_ip_list[1]} - Log ${output} - Should Contain ${output} ${PACKET_LOSS} - -TC13 Ping Between Namespace In Second Network To Vm In First Network - [Documentation] Verify IP Connectivity between port in NS in 2nd network to VM in 1st network - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Ping Fails In Namespace - ... ${HWVTEP_NS2} - ... ${port_mac_list[3]} - ... ${port_ip_list[0]} - -TC14 Create, Update And Attach 2nd Neutron Port to Hwvtep Namespace 1 - [Documentation] Create and attach 2nd port to HWVTEP in network 1 - OpenStackOperations.Create Neutron Port With Additional Params - ... ${NET_1} - ... ${HWVTEP_PORT_3} - ... ${SECURITY_GROUP_L2GW_NONE} - ${port_mac}= Get Port Mac ${HWVTEP_PORT_3} #port_mac[4] - ${port_ip}= Get Port Ip ${HWVTEP_PORT_3} #port_ip[4] - Append To List ${port_mac_list} ${port_mac} - Append To List ${port_ip_list} ${port_ip} - Namespace Add Port Hwvtep1 - L2GatewayOperations.Update Port For Hwvtep ${HWVTEP_PORT_3} - Wait Until Keyword Succeeds - ... 30s - ... 2s - ... L2GatewayOperations.Attach Port To Hwvtep Namespace - ... ${port_mac_list[4]} - ... ${HWVTEP_NS1} - ... ${NS_TAP1} - -TC15 Update Existing L2Gateway With 2nd Port And Verify - [Documentation] Add the new port ${NS_PORT3} to existing L2GW ${L2GW_NAME1} that has an existing connection. ${NS_PORT1} is already attached, adding ${NS_PORT3} - ${output}= Wait Until Keyword Succeeds - ... 30s - ... 2s - ... L2GatewayOperations.Update And Verify L2Gateway - ... ${HWVTEP_BRIDGE} - ... ${L2GW_NAME1} - ... ${NS_PORT1} - ... ${NS_PORT3} - -TC16 Verify L2Gateway Connection - [Documentation] Verify the L2GW connection has the 2nd port. Verify db in hardware vtep emulator tables. - Wait Until Keyword Succeeds - ... 30s - ... 2s - ... L2GatewayOperations.Verify L2Gateway Connection - ... ${L2GW_NAME1} - ... ${NET_1} - Wait Until Keyword Succeeds 30s 2s L2GatewayOperations.Verify Ovs Tunnel ${HWVTEP_IP} ${OVS_IP} - ${output}= ITM Get Tunnels - Log ${output} - Should Contain ${output} physicalswitch/${HWVTEP_BRIDGE} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${TUNNEL_TABLE} - ... enable="true" - ${phy_port_out}= Get Vtep List ${PHYSICAL_PORT_TABLE} - Validate Regexp In String ${phy_port_out} ${VLAN_BINDING_REGEX} 3 - ${list}= Create List ${OVS_IP} ${HWVTEP_IP} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${PHYSICAL_LOCATOR_TABLE} - ... @{list} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${UCAST_MACS_REMOTE_TABLE} - ... ${port_mac_list[0]} - Wait Until Keyword Succeeds - ... 30s - ... 1s - ... L2GatewayOperations.Verify Vtep List - ... ${hwvtep_conn_id} - ... ${UCAST_MACS_REMOTE_TABLE} - ... ${port_mac_list[2]} - -TC17 Dhcp Ip Allocation For Hwvtep Tap Port - [Documentation] Verify the 2nd HWVTEP port was able to get an IP address - Wait Until Keyword Succeeds - ... 180s - ... 10s - ... L2GatewayOperations.Namespace Dhclient Verify - ... ${HWVTEP_NS1} - ... ${NS_TAP1} - ... ${port_ip_list[4]} - -TC18 Verify Ping From Compute Node Vm To Hwvtep Port 2 - [Documentation] Verify IP connectivity between VM in net1 and 2nd HWVTEP port in net 1 - ${output}= Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Execute Command on VM Instance - ... ${NET_1} - ... ${port_ip_list[0]} - ... ping -c 3 ${port_ip_list[4]} - Log ${output} - Should Not Contain ${output} ${PACKET_LOSS} - ${src_mac_list}= Create List ${port_mac_list[0]} - ${dst_mac_list}= Create List ${port_mac_list[4]} - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Elan Flow Entries - ... ${OVS_IP} - ... ${src_mac_list} - ... ${dst_mac_list} - -TC19 Ping Verification From Namespace Tap To Ovs Vm - [Documentation] Verify IP connectivity between 2nd HWVTEP port and VM in compute node - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... L2GatewayOperations.Verify Ping In Namespace Extra Timeout - ... ${HWVTEP_NS1} - ... ${port_mac_list[4]} - ... ${port_ip_list[0]} - -TC99 Cleanup L2Gateway Connection Itm Tunnel Port Subnet And Network - L2GatewayOperations.Delete L2Gateway Connection ${L2GW_NAME1} - L2GatewayOperations.Delete L2Gateway Connection ${L2GW_NAME2} check_for_null=True - L2GatewayOperations.Delete L2Gateway ${L2GW_NAME1} - L2GatewayOperations.Delete L2Gateway ${L2GW_NAME2} check_for_null=True - OpenStackOperations.Delete Vm Instance ${OVS_VM1_NAME} - OpenStackOperations.Delete Vm Instance ${OVS_VM2_NAME} - OpenStackOperations.Delete Port ${OVS_PORT_1} - OpenStackOperations.Delete Port ${OVS_PORT_2} - OpenStackOperations.Delete Port ${HWVTEP_PORT_1} - OpenStackOperations.Delete Port ${HWVTEP_PORT_2} - Cleanup L2GW Optional Resources - OpenStackOperations.Delete SubNet ${SUBNET_1} - OpenStackOperations.Delete SubNet ${SUBNET_2} - OpenStackOperations.Delete Network ${NET_1} - OpenStackOperations.Delete Network ${NET_2} - - -*** Keywords *** -Basic Suite Setup - [Documentation] Basic Suite Setup required for the HWVTEP Test Suite - OpenStackOperations.OpenStack Suite Setup - OpenStackOperations.Get ControlNode Connection - Write Commands Until Prompt cd ${DEVSTACK_DEPLOY_PATH}; source openrc admin admin 30s - ${port_mac_list}= Create List - Set Suite Variable ${port_mac_list} - ${port_ip_list}= Create List - Set Suite Variable ${port_ip_list} - Start Suite - -Basic Suite Teardown - Stop Suite - OpenStackOperations.OpenStack Suite Teardown - -Start Suite - [Documentation] Suite Setup to configure HWVTEP Emulator for L2 Gateway Testcase Verification. - ${hwvtep_conn_id}= Create And Set Hwvtep Connection Id ${HWVTEP_IP} - Set Suite Variable ${hwvtep_conn_id} - Hwvtep Cleanup ${hwvtep_conn_id} ${HWVTEP_BRIDGE} - Namespace Cleanup - Hwvtep Initiate ${hwvtep_conn_id} ${HWVTEP_IP} ${HWVTEP_BRIDGE} - Namespace Intiate Hwvtep1 - Wait Until Keyword Succeeds 30s 1s Hwvtep Validation - -Stop Suite - [Documentation] Stop Suite to cleanup Hwvtep configuration - Hwvtep Cleanup ${hwvtep_conn_id} ${HWVTEP_BRIDGE} - Namespace Cleanup - -Hwvtep Cleanup - [Documentation] Cleanup any existing VTEP, VSWITCHD or OVSDB processes. - [Arguments] ${conn_id} ${hwvtep_bridge} - Switch Connection ${conn_id} - Write Commands Until Prompt ${DEL_OVS_BRIDGE} ${hwvtep_bridge} 30s - Write Commands Until Prompt ${KILL_VTEP_PROC} 30s - Write Commands Until Prompt ${KILL_VSWITCHD_PROC} 30s - Write Commands Until Prompt ${KILL_OVSDB_PROC} 30s - ${stdout}= Write Commands Until Prompt ${GREP_OVS} 30s - Log ${stdout} - Write Commands Until Prompt ${REM_OVSDB} 30s - Write Commands Until Prompt ${REM_VTEPDB} 30s - -Namespace Cleanup - [Documentation] Cleanup the existing namespaces and ports. - Switch Connection ${hwvtep_conn_id} - ${stdout}= Write Commands Until Prompt ${IP_LINK} 30s - Log ${stdout} - Write Commands Until Prompt ${IP_LINK_DEL} ${NS_PORT1} 30s - Write Commands Until Prompt ${IP_LINK_DEL} ${NS_PORT2} 30s - ${stdout}= Write Commands Until Prompt ${NETNS} 30s - Log ${stdout} - Write Commands Until Prompt ${NETNS_DEL} ${HWVTEP_NS1} 30s - Write Commands Until Prompt ${NETNS_DEL} ${HWVTEP_NS2} 30s - ${stdout}= Write Commands Until Prompt ${IP_LINK} 30s - Log ${stdout} - -Hwvtep Initiate - [Documentation] Configure the Hwvtep Emulation - [Arguments] ${conn_id} ${hwvtep_ip} ${hwvtep_bridge} - Switch Connection ${conn_id} - Write Commands Until Prompt ${CREATE_OVSDB} 30s - Write Commands Until Prompt ${CREATE VTEP} 30s - Write Commands Until Prompt ${START_OVSDB_SERVER} 30s - ${stdout}= Write Commands Until Prompt ${GREP_OVS} 30s - Log ${stdout} - Write Commands Until Prompt ${INIT_VSCTL} 30s - Write Commands Until Prompt ${DETACH_VSWITCHD} 30s - Write Commands Until Prompt ${CREATE_OVS_BRIDGE} ${hwvtep_bridge} 30s - ${stdout}= Write Commands Until Prompt ${OVS_SHOW} 30s - Log ${stdout} - Write Commands Until Prompt ${ADD_VTEP_PS} ${hwvtep_bridge} 30s - Write Commands Until Prompt ${SET_VTEP_PS} ${hwvtep_bridge} tunnel_ips=${hwvtep_ip} 30s - Write Commands Until Prompt ${START_OVSVTEP} ${hwvtep_bridge} 30s - ${stdout}= Write Commands Until Prompt ${GREP_OVS} 30s - Log ${stdout} - -Namespace Intiate Hwvtep1 - [Documentation] Create and configure the namespace, bridges and ports. - Switch Connection ${hwvtep_conn_id} - Create Configure Namespace ${HWVTEP_NS1} ${NS_PORT1} ${NS_TAP1} ${HWVTEP_BRIDGE} - Create Configure Namespace ${HWVTEP_NS2} ${NS_PORT2} ${NS2_TAP1} ${HWVTEP_BRIDGE} - -Namespace Add Port Hwvtep1 - [Documentation] Configure the namespace, bridges and ports. - Switch Connection ${hwvtep_conn_id} - Configure Namespace ${HWVTEP_NS1} ${NS_PORT3} ${NS_TAP3} ${HWVTEP_BRIDGE} - -Create Configure Namespace - [Arguments] ${ns_name} ${ns_port_name} ${tap_port_name} ${hwvtep_bridge} - Write Commands Until Prompt ${NETNS_ADD} ${ns_name} 30s - Configure Namespace ${ns_name} ${ns_port_name} ${tap_port_name} ${hwvtep_bridge} - -Configure Namespace - [Arguments] ${ns_name} ${ns_port_name} ${tap_port_name} ${hwvtep_bridge} - Write Commands Until Prompt ${IP_LINK_ADD} ${tap_port_name} type veth peer name ${ns_port_name} 30s - Write Commands Until Prompt ${CREATE_OVS_PORT} ${hwvtep_bridge} ${ns_port_name} 30s - Write Commands Until Prompt ${IP_LINK_SET} ${tap_port_name} netns ${ns_name} 30s - Write Commands Until Prompt ${NETNS_EXEC} ${ns_name} ${IPLINK_SET} ${tap_port_name} up 30s - Write Commands Until Prompt sudo ${IPLINK_SET} ${ns_port_name} up 30s - ${stdout}= Write Commands Until Prompt ${NETNS_EXEC} ${ns_name} ${IFCONF} 30s - Log ${stdout} - -Hwvtep Validation - [Documentation] Initial validation of the Hwvtep Configuration to confirm Physical_Switch table entries - Switch Connection ${hwvtep_conn_id} - ${stdout}= Write Commands Until Prompt ${VTEP LIST} ${PHYSICAL_SWITCH_TABLE} 30s - Should Contain ${stdout} ${HWVTEP_BRIDGE} - Should Contain ${stdout} ${HWVTEP_IP} - ${stdout}= Write Commands Until Prompt ${VTEP LIST} ${PHYSICAL_PORT_TABLE} 30s - Should Contain ${stdout} ${NS_PORT1} - Should Contain ${stdout} ${NS_PORT2} - -Create And Set Hwvtep Connection Id - [Documentation] To create connection and return connection id for hwvtep_ip received - [Arguments] ${hwvtep_ip} - ${conn_id}= SSHLibrary.Open Connection ${hwvtep_ip} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s - Log ${conn_id} - Flexible SSH Login ${DEFAULT_USER} ${DEFAULT_PASSWORD} - RETURN ${conn_id} diff --git a/csit/suites/openstack/clustering/ha_l2.robot b/csit/suites/openstack/clustering/ha_l2.robot deleted file mode 100644 index 6013327924..0000000000 --- a/csit/suites/openstack/clustering/ha_l2.robot +++ /dev/null @@ -1,283 +0,0 @@ -*** Settings *** -Documentation Test suite to verify packet flows between vm instances. - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Library Collections -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../libraries/ClusterOvsdb.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../variables/Variables.robot - -Suite Setup OpenStackOperations.OpenStack Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${SECURITY_GROUP} cl2_sg -@{NETWORKS} cl2_net_1 cl2_net_2 -@{SUBNETS} cl2_sub_1 cl2_sub_2 -@{NET_1_VMS} cl2_net_1_vm_1 cl2_net_1_vm_2 cl2_net_1_vm_3 -@{NET_2_VMS} cl2_net_2_vm_1 cl2_net_2_vm_2 cl2_net_2_vm_3 -@{SUBNET_CIDRS} 26.0.0.0/24 27.0.0.0/24 -@{CLUSTER_DOWN_LIST} ${1} ${2} - - -*** Test Cases *** -Create All Controller Sessions - [Documentation] Create sessions for all three controllers. - ClusterManagement.ClusterManagement Setup - -Create Network net_1 - [Documentation] Create Network with neutron request. - OpenStackOperations.Create Network ${NETWORKS}[0] - -Create Subnet For net_1 - [Documentation] Create Sub Net for the Network with neutron request. - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0] - -Create Network net_2 - [Documentation] Create Network with neutron request. - OpenStackOperations.Create Network ${NETWORKS}[1] - -Create Subnet For net_2 - [Documentation] Create Sub Net for the Network with neutron request. - OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS}[1] ${SUBNET_CIDRS}[1] - -Add Ssh Allow All Rule - [Documentation] Allow all TCP/UDP/ICMP packets for this suite - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - -Create Bridge Manually and Verify Before Fail - [Documentation] Create bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} - -Add Tap Device Manually and Verify Before Fail - [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} - -Delete the Bridge Manually and Verify Before Fail - [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances. - ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} - -Take Down ODL1 - [Documentation] Stop the karaf in First Controller - ${new_cluster_list} = ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Set Suite Variable ${new_cluster_list} - -Create Bridge Manually and Verify After Fail - [Documentation] Create bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list} - -Add Tap Device Manually and Verify After Fail - [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} ${new_cluster_list} - -Delete the Bridge Manually and Verify After Fail - [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances. - ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list} - -Bring Up ODL1 - [Documentation] Bring up ODL1 again - ClusterManagement.Start Single Member 1 msg=up: ODL2, ODL3, down: ODL1 - -Create Bridge Manually and Verify After Recover - [Documentation] Create bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} - -Add Tap Device Manually and Verify After Recover - [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances. - ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} - -Delete the Bridge Manually and Verify After Recover - [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances. - ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} - -Take Down ODL2 - [Documentation] Stop the karaf in Second Controller - ClusterManagement.Stop Single Member 2 msg=up: ODL1, ODL2, ODL3, down=none - -Create Vm Instances For net_1 - [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Create Vm Instances For net_2 - [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Check Vm Instances Have Ip Address - @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS} - BuiltIn.Set Suite Variable @{NET_1_VM_IPS} - BuiltIn.Set Suite Variable @{NET_2_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_VM_IPS} None - BuiltIn.Should Not Contain ${NET_2_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} - ... AND OpenStackOperations.Get Test Teardown Debugs - -Bring Up ODL2 - [Documentation] Bring up ODL2 again - ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2 - -Ping Vm Instance1 In net_1 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -Ping Vm Instance2 In net_1 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - -Ping Vm Instance3 In net_1 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[2] - -Ping Vm Instance1 In net_2 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[0] - -Ping Vm Instance2 In net_2 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[1] - -Ping Vm Instance3 In net_2 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[2] - -Take Down ODL3 - [Documentation] Stop the karaf in Third Controller - ClusterManagement.Stop Single Member 3 msg=up: ODL1, ODL2, ODL3, down=none - -Connectivity Tests From Vm Instance1 In net_1 - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${NET_1_VM_IPS} - -Connectivity Tests From Vm Instance2 In net_1 - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${NET_1_VM_IPS} - -Connectivity Tests From Vm Instance3 In net_1 - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[2] ${NET_1_VM_IPS} - -Bring Up ODL3 - [Documentation] Bring up ODL3 again - ClusterManagement.Start Single Member 3 msg=up: ODL1, ODL2, down: ODL3 - -Connectivity Tests From Vm Instance1 In net_2 In Healthy Cluster - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[0] ${NET_2_VM_IPS} - -Connectivity Tests From Vm Instance2 In net_2 In Healthy Cluster - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[1] ${NET_2_VM_IPS} - -Connectivity Tests From Vm Instance3 In net_2 In Healthy Cluster - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[2] ${NET_2_VM_IPS} - -Take Down ODL1 and ODL2 - [Documentation] Stop the karaf in First and Second Controller - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Stop Single Member - ... 1 - ... msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop Single Member 2 msg=up: ODL2, ODL3, down=ODL1 - -Connectivity Tests From Vm Instance1 In net_2 With Two ODLs Down - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[0] ${NET_2_VM_IPS} - -Connectivity Tests From Vm Instance2 In net_2 With Two ODLs Down - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[1] ${NET_2_VM_IPS} - -Connectivity Tests From Vm Instance3 In net_2 With Two ODLs Down - [Documentation] Logging to the vm instance using generated key pair. - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[2] ${NET_2_VM_IPS} - -Bring Up ODL1 and ODL2 - [Documentation] Bring up ODL1 and ODL2 again. Do not check for cluster sync until all nodes are - ... up. akka will not let nodes join until they are all back up if two were down. - ClusterManagement.Start Single Member 1 msg=up: ODL3, down: ODL1, ODL2 wait_for_sync=False - ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2 - -Delete Vm Instance - [Documentation] Delete Vm instances using instance names. Also remove the VM from the - ... list so that later cleanup will not try to delete it. - OpenStackOperations.Delete Vm Instance ${NET_1_VMS}[0] - Remove From List ${NET_1_VMS} 0 - -No Ping For Deleted Vm - [Documentation] Check non reachability of deleted vm instances by pinging to them. - ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -Delete Vm Instances In net_1 - [Documentation] Delete Vm instances using instance names in network_1. - FOR ${vm} IN @{NET_1_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Vm Instances In net_2 - [Documentation] Delete Vm instances using instance names in network_2. - FOR ${vm} IN @{NET_2_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Sub Networks In net_1 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet ${SUBNETS}[0] - -Delete Sub Networks In net_2 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet ${SUBNETS}[1] - -Delete Networks - [Documentation] Delete Networks with neutron request. - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Delete Network ${network} - END - -Delete Security Group - [Documentation] Delete security groups with neutron request - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - -Verify Flows Cleanup - [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations - DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes diff --git a/csit/suites/openstack/clustering/ha_l3.robot b/csit/suites/openstack/clustering/ha_l3.robot deleted file mode 100644 index 2df571e7e1..0000000000 --- a/csit/suites/openstack/clustering/ha_l3.robot +++ /dev/null @@ -1,484 +0,0 @@ -*** Settings *** -Documentation Test suite to check connectivity in L3 using routers. - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Library Collections -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../libraries/ClusterOvsdb.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../variables/Variables.robot - -Suite Setup OpenStackOperations.OpenStack Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${SECURITY_GROUP} cl3_sg -@{NETWORKS} cl3_net_1 cl3_net_2 -@{SUBNETS} cl3_sub_1 cl3_sub_2 -@{ROUTERS} cl3_router_1 cl3_router_2 cl3_router_3 -@{NET_1_VMS} cl3_net_1_vm_1 cl3_net_1_vm_2 cl3_net_1_vm_3 -@{NET_2_VMS} cl3_net_2_vm_1 cl3_net_2_vm_2 cl3_net_2_vm_3 -@{SUBNET_CIDRS} 36.0.0.0/24 37.0.0.0/24 -@{GATEWAY_IPS} 36.0.0.1 37.0.0.1 -@{ODL_1_AND_2_DOWN} ${1} ${2} -@{ODL_2_AND_3_DOWN} ${2} ${3} -@{index_list} 1 2 3 - - -*** Test Cases *** -Create All Controller Sessions - [Documentation] Create sessions for all three controllers. - ClusterManagement.ClusterManagement Setup - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Take Down Leader Of Default Shard - [Documentation] Stop the karaf on ODL cluster leader - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ${cluster_leader} ${followers} = ClusterManagement.Get Leader And Followers For Shard shard_type=config - BuiltIn.Set Suite Variable ${cluster_leader} - ${new_cluster_list} = ClusterManagement.Stop Single Member - ... ${cluster_leader} - ... msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Set Suite Variable ${new_cluster_list} - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Create Networks - [Documentation] Create Network with neutron request. - FOR ${NetworkElement} IN @{NETWORKS} - OpenStackOperations.Create Network ${NetworkElement} - END - -Create Subnets For net_1 - [Documentation] Create Sub Nets for the Networks with neutron request. - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0] - -Create Subnets For net_2 - [Documentation] Create Sub Nets for the Networks with neutron request. - OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS}[1] ${SUBNET_CIDRS}[1] - -Bring Up Leader Of Default Shard - [Documentation] Bring up on cluster leader - ClusterManagement.Start Single Member ${cluster_leader} msg=up: ${new_cluster_list}, down: ${cluster_leader} - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Add Ssh Allow All Rule - [Documentation] Allow all TCP/UDP/ICMP packets for this suite - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - -Take Down ODL1 - [Documentation] Stop the karaf in First Controller - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Create Vm Instances For net_1 - [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Bring Up ODL1 - [Documentation] Bring up ODL1 again - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 1 msg=up: ODL2, ODL3, down: ODL1 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Take Down ODL2 - [Documentation] Stop the karaf in Second Controller - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop Single Member 2 msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Create Vm Instances For net_2 - [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Check Vm Instances Have Ip Address - @{NET_1_L3_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - @{NET_2_L3_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS} - BuiltIn.Set Suite Variable @{NET_1_L3_VM_IPS} - BuiltIn.Set Suite Variable @{NET_2_L3_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_2_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} - ... AND OpenStackOperations.Get Test Teardown Debugs - -Bring Up ODL2 - [Documentation] Bring up ODL2 again - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Take Down ODL3 - [Documentation] Stop the karaf in Third Controller - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop Single Member 3 msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Create Router router_2 - [Documentation] Create Router and Add Interface to the subnets. - OpenStackOperations.Create Router ${ROUTERS}[1] - [Teardown] Report_Failure_Due_To_Bug 6117 - -Create Router router_3 - [Documentation] Create Router and Add Interface to the subnets. - OpenStackOperations.Create Router ${ROUTERS}[2] - -Add Interfaces To Router - [Documentation] Add Interfaces - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Add Router Interface ${ROUTERS}[2] ${interface} - END - -Verify Created Routers - [Documentation] Check created routers using northbound rest calls - ${data} = Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API} - BuiltIn.Log ${data} - Should Contain ${data} ${ROUTERS}[2] - -Bring Up ODL3 - [Documentation] Bring up ODL3 again - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 3 msg=up: ODL1, ODL2, down: ODL3 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - -Ping Vm Instance1 In net_2 From net_1 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_2 From net_1 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_2 From net_1 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[2] - -Ping Vm Instance1 In net_1 From net_2 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_1 From net_2 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_1 From net_2 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[2] - -Connectivity Tests From Vm Instance1 In net_1 In Healthy Cluster - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[0] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance2 In net_1 In Healthy Cluster - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[1] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance3 In net_1 In Healthy Cluster - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[2] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Take Down ODL1 and ODL2 - [Documentation] Stop the karaf in First and Second Controller - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none - ClusterManagement.Stop Single Member 2 msg=up: ODL2, ODL3, down=ODL1 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance1 In net_1 With Two ODLs Down - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[0] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance2 In net_1 With Two ODLs Down - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[1] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance3 In net_1 With Two ODLs Down - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[2] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Bring Up ODL1 and ODL2 - [Documentation] Bring up ODL1 and ODL2 again. Do not check for cluster sync until all nodes are - ... up. akka will not let nodes join until they are all back up if two were down. - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 1 msg=up: ODL3, down: ODL1, ODL2 wait_for_sync=False - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Take Down ODL2 and ODL3 - [Documentation] Stop the karaf in First and Second Controller - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop Single Member 2 msg=up: ODL1, ODL2, ODL3, down=none - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop Single Member 3 msg=up: ODL1, ODL3, down=ODL2 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance1 In net_2 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - BuiltIn.Wait Until Keyword Succeeds - ... 30s - ... 10s - ... OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET_2_L3_VM_IPS}[0] - ... ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance2 In net_2 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - BuiltIn.Wait Until Keyword Succeeds - ... 30s - ... 10s - ... OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET_2_L3_VM_IPS}[1] - ... ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance3 In net_2 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - BuiltIn.Wait Until Keyword Succeeds - ... 30s - ... 10s - ... OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET_2_L3_VM_IPS}[2] - ... ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Bring Up ODL2 and ODL3 - [Documentation] Bring up ODL2 and ODL3 again. Do not check for cluster sync until all nodes are - ... up. akka will not let nodes join until they are all back up if two were down. - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 2 msg=up: ODL1, down: ODL2, ODL3 wait_for_sync=False - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Single Member 3 msg=up: ODL1, ODL2, down: ODL3 - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Take Down All Instances - [Documentation] Stop karaf on all controllers - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Stop_Members_From_List_Or_All - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Bring Up All Instances - [Documentation] Bring up all controllers. Do not check for cluster sync until all nodes are - ... up. akka will not let nodes join until they are all back up if two were down. - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - ClusterManagement.Start Members From List Or All - BuiltIn.Run Keyword And Ignore Error - ... ClusterManagement.Get Raft State Of Shard Of All Member Nodes - ... shard_name=default - ... shard_type=config - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance2 In net_2 after recovering all nodes - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[1] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance3 In net_2 after recovering all nodes - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[2] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Delete Vm Instances In net_1 - [Documentation] Delete Vm instances using instance names in net_1. - FOR ${vm} IN @{NET_1_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Vm Instances In net_2 - [Documentation] Delete Vm instances using instance names in net_2. - FOR ${vm} IN @{NET_2_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Router Interfaces - [Documentation] Remove Interface to the subnets. - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Remove Interface ${ROUTERS}[2] ${interface} - END - -Delete Routers - [Documentation] Delete Router and Interface to the subnets. - OpenStackOperations.Delete Router ${ROUTERS}[1] - OpenStackOperations.Delete Router ${ROUTERS}[2] - -Verify Deleted Routers - [Documentation] Check deleted routers using northbound rest calls - ${data} = Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API} - BuiltIn.Log ${data} - BuiltIn.Should Not Contain ${data} ${ROUTERS}[2] - -Delete Sub Network In net_1 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet ${SUBNETS}[0] - -Delete Sub Network In net_2 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet ${SUBNETS}[1] - -Delete Networks - [Documentation] Delete Networks with neutron request. - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Delete Network ${network} - END - -Delete Security Group - [Documentation] Delete security groups with neutron request - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - -Verify Flows Cleanup - [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations - DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes diff --git a/csit/suites/openstack/clustering/ha_l3_block_port.robot b/csit/suites/openstack/clustering/ha_l3_block_port.robot deleted file mode 100644 index 3a792d389b..0000000000 --- a/csit/suites/openstack/clustering/ha_l3_block_port.robot +++ /dev/null @@ -1,303 +0,0 @@ -*** Settings *** -Documentation Test suite to check connectivity while disrupting connection between cluster nodes - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Library Collections -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../libraries/ClusterOvsdb.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../variables/Variables.robot - -Suite Setup OpenStackOperations.OpenStack Suite Setup -Suite Teardown Close All Connections -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${SECURITY_GROUP} cl3_bp_sg -@{NETWORKS} cl3_bp_net_1 cl3_bp_net_2 -@{SUBNETS} cl3_bp_sub_1 cl3_bp_sub_2 -@{ROUTERS} cl3_bp_router_1 cl3_bp_router_2 cl3_bp_router_3 -@{NET_1_VMS} cl3_bp_net_1_vm_1 cl3_bp_net_1_vm_2 cl3_bp_net_1_vm_3 -@{NET_2_VMS} cl3_bp_net_2_vm_1 cl3_bp_net_2_vm_2 cl3_bp_net_2_vm_3 -@{SUBNET_CIDRS} 38.0.0.0/24 39.0.0.0/24 -@{GATEWAY_IPS} 38.0.0.1 39.0.0.1 - - -*** Test Cases *** -Create All Controller Sessions - [Documentation] Create sessions for all three controllers. - ClusterManagement.ClusterManagement Setup - -Create Networks - [Documentation] Create Network with neutron request. - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Create Network ${network} - END - -Create Subnets For net_1 - [Documentation] Create Sub Nets for the Networks with neutron request. - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0] - -Create Subnets For net_2 - [Documentation] Create Sub Nets for the Networks with neutron request. - OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS}[1] ${SUBNET_CIDRS}[1] - -Add Ssh Allow All Rule - [Documentation] Allow all TCP/UDP/ICMP packets for this suite - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - -Block Port On ODL1 - [Documentation] Block connection on first controller - ClusterManagement.Isolate_Member_From_List_Or_All ${1} protocol=tcp port=${ODL_AKKA_PORT} - -Create Vm Instances For net_1 - [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Allow Port On ODL1 - [Documentation] Allow connection on first controller - ClusterManagement.Rejoin_Member_From_List_Or_All ${1} protocol=tcp port=${ODL_AKKA_PORT} - -Block Port On ODL2 - [Documentation] Block connection on second controller - ClusterManagement.Isolate_Member_From_List_Or_All ${2} protocol=tcp port=${ODL_AKKA_PORT} - -Create Vm Instances For net_2 - [Documentation] Create Vm instances using flavor and image names for a network. - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Check Vm Instances Have Ip Address - @{NET_1_L3_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - @{NET_2_L3_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS} - BuiltIn.Set Suite Variable @{NET_1_L3_VM_IPS} - BuiltIn.Set Suite Variable @{NET_2_L3_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_2_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} - ... AND OpenStackOperations.Get Test Teardown Debugs - -Allow Port On ODL2 - [Documentation] Allow connection on second controller - ClusterManagement.Rejoin_Member_From_List_Or_All ${2} protocol=tcp port=${ODL_AKKA_PORT} - -Block Port On ODL3 - [Documentation] Block connection on third controller - ClusterManagement.Isolate_Member_From_List_Or_All ${3} protocol=tcp port=${ODL_AKKA_PORT} - -Create Router router_2 - [Documentation] Create Router and Add Interface to the subnets. - OpenStackOperations.Create Router ${ROUTERS}[1] - [Teardown] Report_Failure_Due_To_Bug 6117 - -Create Router router_3 - [Documentation] Create Router and Add Interface to the subnets. - OpenStackOperations.Create Router ${ROUTERS}[2] - -Add Interfaces To Router - [Documentation] Add Interfaces - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Add Router Interface ${ROUTERS}[2] ${interface} - END - -Verify Created Routers - [Documentation] Check created routers using northbound rest calls - ${data} = Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API} - BuiltIn.Log ${data} - Should Contain ${data} ${ROUTERS}[2] - -Allow Port On ODL3 - [Documentation] Allow connection on third controller - ClusterManagement.Rejoin_Member_From_List_Or_All ${3} protocol=tcp port=${ODL_AKKA_PORT} - -Ping Vm Instance1 In net_2 From net_1 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_2 From net_1 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_2 From net_1 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[2] - -Ping Vm Instance1 In net_1 From net_2 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_1 From net_2 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_1 From net_2 - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[2] - -Block Port On ODL1 Again - [Documentation] Block connection on first controller the second time - ClusterManagement.Isolate_Member_From_List_Or_All ${1} protocol=tcp port=${ODL_AKKA_PORT} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Block Port On ODL2 Again - [Documentation] Block connection on second controller the second time - ClusterManagement.Isolate_Member_From_List_Or_All ${2} protocol=tcp port=${ODL_AKKA_PORT} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance1 In net_1 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[0] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance2 In net_1 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[1] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance3 In net_1 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[2] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Allow Port On ODL1 Again - [Documentation] Allow connection on first controller the second time - BuiltIn.Run_Keyword_And_Ignore_Error - ... ClusterManagement.Rejoin_Member_From_List_Or_All - ... ${1} - ... protocol=tcp - ... port=${ODL_AKKA_PORT} - -Allow Port On ODL2 Again - [Documentation] Allow connection on the second controller the second time - ClusterManagement.Rejoin_Member_From_List_Or_All ${2} protocol=tcp port=${ODL_AKKA_PORT} - -Block Port On ODL2 Finally - [Documentation] Block connection on second controller for the last time - ClusterManagement.Isolate_Member_From_List_Or_All ${2} protocol=tcp port=${ODL_AKKA_PORT} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Block Port On ODL3 Again - [Documentation] Block connection on the third controller for the second time - ClusterManagement.Isolate_Member_From_List_Or_All ${3} protocol=tcp port=${ODL_AKKA_PORT} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance1 In net_2 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[0] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance2 In net_2 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[1] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Connectivity Tests From Vm Instance3 In net_2 - [Documentation] ssh to the VM instance and test operations. - ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[2] ${dst_list} - [Teardown] OpenStackOperations.Get Test Teardown Debugs fail=False - -Allow Port On ODL2 Finally - [Documentation] Allow connection on second controller for the last time - BuiltIn.Run_Keyword_And_Ignore_Error - ... ClusterManagement.Rejoin_Member_From_List_Or_All - ... ${2} - ... protocol=tcp - ... port=${ODL_AKKA_PORT} - -Allow Port On ODL3 Again - [Documentation] Allow connection on the third controller for the second time - ClusterManagement.Rejoin_Member_From_List_Or_All ${3} protocol=tcp port=${ODL_AKKA_PORT} - -Delete Vm Instances In net_1 - [Documentation] Delete Vm instances using instance names in net_1. - FOR ${vm} IN @{NET_1_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Vm Instances In net_2 - [Documentation] Delete Vm instances using instance names in net_2. - FOR ${vm} IN @{NET_2_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Router Interfaces - [Documentation] Remove Interface to the subnets. - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Remove Interface ${ROUTERS}[2] ${interface} - END - -Delete Routers - [Documentation] Delete Router and Interface to the subnets. - OpenStackOperations.Delete Router ${ROUTERS}[1] - OpenStackOperations.Delete Router ${ROUTERS}[2] - -Verify Deleted Routers - [Documentation] Check deleted routers using northbound rest calls - ${data} = Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API} - BuiltIn.Log ${data} - BuiltIn.Should Not Contain ${data} ${ROUTERS}[2] - -Delete Sub Network In net_1 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet ${SUBNETS}[0] - -Delete Sub Network In net_2 - [Documentation] Delete Sub Nets for the Networks with neutron request. - OpenStackOperations.Delete SubNet ${SUBNETS}[1] - -Delete Networks - [Documentation] Delete Networks with neutron request. - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Delete Network ${network} - END - -Delete Security Group - [Documentation] Delete security groups with neutron request - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - -Verify Flows Cleanup - [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations - DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes diff --git a/csit/suites/openstack/connectivity/external_network.robot b/csit/suites/openstack/connectivity/external_network.robot deleted file mode 100644 index 6e531b5276..0000000000 --- a/csit/suites/openstack/connectivity/external_network.robot +++ /dev/null @@ -1,360 +0,0 @@ -*** Settings *** -Documentation Test suite to check North-South connectivity in L3 using a router and an external network - -Library Collections -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/DataModels.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot - -Suite Setup Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - -Force Tags skip_if_${odl_snat_mode} - - -*** Variables *** -${SECURITY_GROUP} l3_ext_sg -@{NETWORKS} l3_ext_net_1 l3_ext_net_2 -@{SUBNETS} l3_ext_sub_1 l3_ext_sub_2 -@{ROUTERS} l3_ext_router_1 l3_ext_router_2 -@{NET1_FIP_VMS} l3_ext_net_1_fip_vm_1 l3_ext_net_1_fip_vm_2 l3_ext_net_1_fip_vm_3 -@{NET1_SNAT_VMS} l3_ext_net_1_snat_vm_1 l3_ext_net_1_snat_vm_2 -@{NET2_SNAT_VMS} l3_ext_net_2_snat_vm_3 -@{SNAT_VMS} @{NET1_SNAT_VMS} @{NET2_SNAT_VMS} -@{SUBNET_CIDRS} 41.0.0.0/24 42.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 - - -*** Test Cases *** -Initial Ping To 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) - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_FIP_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - ... ping_tries=8 - -Initial Ping To External Network PNF from Vm Instance 2 - [Documentation] Check reachability of External Network PNF from VM instance (with ttl=1 to make sure no router hops) - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_FIP_VM_IPS}[1] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - ... ping_tries=8 - -Create And Associate Floating IPs for VMs - [Documentation] Create and associate a floating IP for the VM - ${VM_FLOATING_IPS} = OpenStackOperations.Create And Associate Floating IPs - ... ${EXTERNAL_NET_NAME} - ... @{NET1_FIP_VMS} - BuiltIn.Set Suite Variable ${VM_FLOATING_IPS} - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET1_FIP_VMS} - ... AND OpenStackOperations.Get Test Teardown Debugs - -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} - ... 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] - ... 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] - ... additional_args=-I ${EXTERNAL_INTERNET_ADDR} - -Ping Vm Instance2 Floating IP From Vm Instance1 With Floating IP (Hairpinning) - [Documentation] Check reachability of VM instance floating IP from another VM instance with FIP (with ttl=1 to make sure no router hops) - ${dst_ip} = BuiltIn.Create List ${VM_FLOATING_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_FIP_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - -Connectivity Tests To Vm Instance2 Floating IP From Vm Instance3 With Floating IP (FIP-FIP in the same compute node) - [Documentation] Check reachability of VM instance floating IP from another VM instance with FIP (FIP-FIP in the same compute node) - BuiltIn.Pass Execution pass this test until ovs 2.9 is ready - ${dst_ip} = BuiltIn.Create List ${VM_FLOATING_IPS}[1] - OpenStackOperations.Test Netcat Operations From Vm Instance ${NETWORKS}[0] ${NET1_FIP_VM_IPS}[2] ${dst_ip} - -Ping Vm Instance1 Floating IP From SNAT VM Instance1 - [Documentation] Check reachability of VM instance floating IP from another VM without Floating IP - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${VM_FLOATING_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET2_SNAT_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - -Ping Vm Instance1 Floating IP From SNAT VM Instance2 - [Documentation] Check reachability of VM instance floating IP from another VM without Floating IP - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${VM_FLOATING_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[1] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - -Ping Vm Instance2 Floating IP From SNAT VM Instance1 - [Documentation] Check reachability of VM instance floating IP from another VM without Floating IP - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${VM_FLOATING_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET2_SNAT_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - -Ping Vm Instance2 Floating IP From SNAT VM Instance2 - [Documentation] Check reachability of VM instance floating IP from another VM without Floating IP - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${VM_FLOATING_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[1] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - -Ping External Network PNF from Vm Instance 1 After Floating IP Assignment - [Documentation] Check reachability of External Network PNF from VM instance (with ttl=1 to make sure no router hops) - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_FIP_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_tries=8 - -SNAT - TCP connection to External Gateway From SNAT VM Instance1 - [Documentation] Login to the VM instance and test TCP connection to the controller via SNAT - [Tags] non_gate - OpenStackOperations.Test Netcat Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[0] - ... ${EXTERNAL_GATEWAY} - -SNAT - UDP connection to External Gateway From SNAT VM Instance1 - [Documentation] Login to the VM instance and test UDP connection to the controller via SNAT - [Tags] non_gate - OpenStackOperations.Test Netcat Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[0] - ... ${EXTERNAL_GATEWAY} - ... -u - -SNAT - TCP connection to External Gateway From SNAT VM Instance2 - [Documentation] Login to the VM instance and test TCP connection to the controller via SNAT - [Tags] non_gate - OpenStackOperations.Test Netcat Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[1] - ... ${EXTERNAL_GATEWAY} - -SNAT - UDP connection to External Gateway From SNAT VM Instance2 - [Documentation] Login to the VM instance and test UDP connection to the controller via SNAT - [Tags] non_gate - OpenStackOperations.Test Netcat Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[1] - ... ${EXTERNAL_GATEWAY} - ... -u - -SNAT - TCP connection to External Gateway From SNAT VM Instance3 - [Documentation] Login to the VM instance and test TCP connection to the controller via SNAT - [Tags] non_gate - OpenStackOperations.Test Netcat Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET2_SNAT_VM_IPS}[0] - ... ${EXTERNAL_GATEWAY} - -SNAT - UDP connection to External Gateway From SNAT VM Instance3 - [Documentation] Login to the VM instance and test UDP connection to the controller via SNAT - [Tags] non_gate - OpenStackOperations.Test Netcat Operations From Vm Instance - ... ${NETWORKS}[1] - ... ${NET2_SNAT_VM_IPS}[0] - ... ${EXTERNAL_GATEWAY} - ... -u - -Ping External Network PNF from SNAT VM Instance1 - [Documentation] Check reachability of External Network PNF from SNAT VM Instance1 - [Tags] non_gate - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[0] - ... ${dst_ip} - ... ping_should_succeed=${expect_ping_to_work} - -Ping External Network PNF from SNAT VM Instance2 - [Documentation] Check reachability of External Network PNF from SNAT VM Instance2 - [Tags] non_gate - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_SNAT_VM_IPS}[1] - ... ${dst_ip} - ... ping_should_succeed=${expect_ping_to_work} - -Remove Floating Ip from VM Instance 1 - [Documentation] Delete FIP from VM Instance 1 - [Tags] non_gate - OpenStackOperations.Remove Floating Ip From Vm ${NET1_FIP_VMS}[0] ${VM_FLOATING_IPS}[0] - -Remove Floating Ip from VM Instance 2 - [Documentation] Delete FIP from VM Instance 2 - [Tags] non_gate - OpenStackOperations.Remove Floating Ip From Vm ${NET1_FIP_VMS}[1] ${VM_FLOATING_IPS}[1] - -Ping External Network PNF from Vm Instance 1 After Floating IP Removal - [Documentation] Check reachability of External Network PNF from VM instance (with ttl=1 to make sure no router hops) - [Tags] non_gate - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_FIP_VM_IPS}[0] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - -Ping External Network PNF from Vm Instance 2 After Floating IP Removal - [Documentation] Check reachability of External Network PNF from VM instance (with ttl=1 to make sure no router hops) - [Tags] non_gate - ${expect_ping_to_work} = Set Variable If "skip_if_controller" in @{TEST_TAGS} False True - ${dst_ip} = BuiltIn.Create List ${EXTERNAL_PNF} - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET1_FIP_VM_IPS}[1] - ... ${dst_ip} - ... ttl=1 - ... ping_should_succeed=${expect_ping_to_work} - - -*** Keywords *** -Suite Setup - OpenStackOperations.OpenStack Suite Setup - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Create Network ${network} - END - FOR ${network} ${subnet} ${cidr} IN ZIP ${NETWORKS} ${SUBNETS} - ... ${SUBNET_CIDRS} - OpenStackOperations.Create SubNet ${network} ${subnet} ${cidr} - END - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET1_FIP_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET1_FIP_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET1_FIP_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_SNAT_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_SNAT_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_SNAT_VMS}[0] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - @{NET1_FIP_VM_IPS} ${NET1_FIP_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET1_FIP_VMS} - @{NET1_SNAT_VM_IPS} ${NET1_SNAT_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET1_SNAT_VMS} - @{NET2_SNAT_VM_IPS} ${NET2_SNAT_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET2_SNAT_VMS} - BuiltIn.Set Suite Variable @{NET1_FIP_VM_IPS} - BuiltIn.Set Suite Variable @{NET1_SNAT_VM_IPS} - BuiltIn.Set Suite Variable @{NET2_SNAT_VM_IPS} - BuiltIn.Should Not Contain ${NET1_FIP_VM_IPS} None - BuiltIn.Should Not Contain ${NET1_SNAT_VM_IPS} None - BuiltIn.Should Not Contain ${NET2_SNAT_VM_IPS} None - BuiltIn.Should Not Contain ${NET1_FIP_DHCP_IP} None - BuiltIn.Should Not Contain ${NET1_SNAT_DHCP_IP} None - BuiltIn.Should Not Contain ${NET2_SNAT_DHCP_IP} None - OpenStackOperations.Create Network - ... ${EXTERNAL_NET_NAME} - ... --provider-network-type flat --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} - OpenStackOperations.Update Network ${EXTERNAL_NET_NAME} --external - OpenStackOperations.Create Subnet - ... ${EXTERNAL_NET_NAME} - ... ${EXTERNAL_SUBNET_NAME} - ... ${EXTERNAL_SUBNET} - ... --gateway ${EXTERNAL_GATEWAY} --allocation-pool ${EXTERNAL_SUBNET_ALLOCATION_POOL} - FOR ${router} IN @{ROUTERS} - OpenStackOperations.Create Router ${router} - END - FOR ${router} ${interface} IN ZIP ${ROUTERS} ${SUBNETS} - OpenStackOperations.Add Router Interface ${router} ${interface} - END - FOR ${router} IN @{ROUTERS} - OpenStackOperations.Add Router Gateway ${router} ${EXTERNAL_NET_NAME} - END - ${data} = Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API} - BuiltIn.Log ${data} - FOR ${router} IN @{ROUTERS} - Should Contain ${data} ${router} - END - OpenStackOperations.Show Debugs @{NET1_FIP_VMS} @{NET1_SNAT_VMS} @{NET2_SNAT_VMS} - OpenStackOperations.Get Suite Debugs diff --git a/csit/suites/openstack/connectivity/l2.robot b/csit/suites/openstack/connectivity/l2.robot deleted file mode 100644 index 603e871a0d..0000000000 --- a/csit/suites/openstack/connectivity/l2.robot +++ /dev/null @@ -1,127 +0,0 @@ -*** Settings *** -Documentation Test suite to verify packet flows between vm instances. - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/DataModels.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/KarafKeywords.robot - -Suite Setup Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${SECURITY_GROUP} l2_sg -@{NETWORKS} l2_net_1 l2_net_2 -@{SUBNETS} l2_sub_1 l2_sub_2 -@{NET_1_VMS} l2_net_1_vm_1 l2_net_1_vm_2 l2_net_1_vm_3 -@{NET_2_VMS} l2_net_2_vm_1 l2_net_2_vm_2 l2_net_2_vm_3 -@{SUBNET_CIDRS} 21.0.0.0/24 22.0.0.0/24 -${NET_1_VLAN_ID} 1121 - - -*** Test Cases *** -Ping Vm Instances In net_1 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[2] - -Ping Vm Instances In net_2 - [Documentation] Check reachability of vm instances by pinging to them. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[0] - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[1] - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[2] - -Connectivity Tests From Vm Instances In net_1 - [Documentation] Login to the vm instance and test some operations - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${NET_1_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${NET_1_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[2] ${NET_1_VM_IPS} - -Connectivity Tests From Vm Instances In net_2 - [Documentation] Login to the vm instance and test operations - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[0] ${NET_2_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[1] ${NET_2_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[2] ${NET_2_VM_IPS} - -Delete A Vm Instance - [Documentation] Delete Vm instances using instance names. - [Tags] non_gate - OpenStackOperations.Delete Vm Instance ${NET_1_VMS}[0] - -No Ping For Deleted Vm - [Documentation] Check non reachability of deleted vm instances by pinging to them. - [Tags] non_gate - OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -Recreate The Deleted Vm Instance and check ping & connectivity. - [Documentation] Check reachability of recreated vm instances by pinging to them. - [Tags] non_gate - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${NET_1_VM_IPS} - - -*** Keywords *** -Suite Setup - OpenStackOperations.OpenStack Suite Setup - OpenStackOperations.Create Network - ... ${NETWORKS}[0] - ... --provider-network-type vlan --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} --provider-segment ${NET_1_VLAN_ID} - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0] - OpenStackOperations.Create Network ${NETWORKS}[1] - OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS}[1] ${SUBNET_CIDRS}[1] - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS} - BuiltIn.Set Suite Variable @{NET_1_VM_IPS} - BuiltIn.Set Suite Variable @{NET_2_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_VM_IPS} None - BuiltIn.Should Not Contain ${NET_2_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None - OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} - OpenStackOperations.Get Suite Debugs diff --git a/csit/suites/openstack/connectivity/l3.robot b/csit/suites/openstack/connectivity/l3.robot deleted file mode 100644 index 4c33b28be6..0000000000 --- a/csit/suites/openstack/connectivity/l3.robot +++ /dev/null @@ -1,267 +0,0 @@ -*** Settings *** -Documentation Test suite to check connectivity in L3 using routers. - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/DataModels.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot - -Suite Setup Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${SECURITY_GROUP} l3_sg -@{NETWORKS} l3_net_1 l3_net_2 l3_net_3 l3_net_4 l3_net_5 -@{SUBNETS_1} l3_sub_1 l3_sub_2 l3_sub_3 -@{SUBNETS_2} l3_sub_4 l3_sub_5 -@{ROUTER} l3_router1 l3_router2 -@{NET_1_VMS} l3_net_1_vm_1 l3_net_1_vm_2 l3_net_1_vm_3 -@{NET_2_VMS} l3_net_2_vm_1 l3_net_2_vm_2 l3_net_2_vm_3 -@{NET_3_VMS} l3_net_3_vm_1 l3_net_3_vm_2 l3_net_3_vm_3 -@{NET_4_VMS} l3_net_4_vm_1 -@{NET_5_VMS} l3_net_5_vm_1 -@{SUBNET_CIDRS} 31.0.0.0/24 32.0.0.0/24 33.0.0.0/24 34.0.0.0/24 35.0.0.0/24 -@{NET_VLAN_ID} 1131 1132 1133 - - -*** Test Cases *** -Ping Vm Instance1 In net_2 From net_1 (vxlan to vlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_2 From net_1 (vxlan to vlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_2 From net_1 (vxlan to vlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_2_L3_VM_IPS}[2] - -Ping Vm Instance1 In net_1 From net_2 (vlan to vxlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_1 From net_2 (vlan to vxlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_1 From net_2 (vlan to vxlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_1_L3_VM_IPS}[2] - -Ping Vm Instance1 In net_3 From net_2 (vxlan to vxlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_3_L3_VM_IPS}[0] - -Ping Vm Instance2 In net_3 From net_2 (vxlan to vxlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_3_L3_VM_IPS}[1] - -Ping Vm Instance3 In net_3 From net_2 (vxlan to vxlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_3_L3_VM_IPS}[2] - -Connectivity Tests From Vm Instance1 In net_1 - [Documentation] Login to the VM instance and test operations - ${dst_list} = BuiltIn.Create List @{NET_1_L3_VM_IPS} @{NET_2_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[0] ${dst_list} - -Connectivity Tests From Vm Instance2 In net_1 - [Documentation] Login to the vm instance and test operations - ${dst_list} = BuiltIn.Create List @{NET_1_L3_VM_IPS} @{NET_2_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[1] ${dst_list} - -Connectivity Tests From Vm Instance3 In net_1 - [Documentation] Login to the vm instance and test operations - ${dst_list} = BuiltIn.Create List @{NET_1_L3_VM_IPS} @{NET_2_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_L3_VM_IPS}[2] ${dst_list} - -Connectivity Tests From Vm Instance1 In net_2 - [Documentation] Login to the vm instance and test operations - ${dst_list} = BuiltIn.Create List @{NET_1_L3_VM_IPS} @{NET_2_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[0] ${dst_list} - -Connectivity Tests From Vm Instance2 In net_2 - [Documentation] Logging to the vm instance using generated key pair. - ${dst_list} = BuiltIn.Create List @{NET_1_L3_VM_IPS} @{NET_2_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[1] ${dst_list} - -Connectivity Tests From Vm Instance3 In net_2 - [Documentation] Logging to the vm instance using generated key pair. - ${dst_list} = BuiltIn.Create List @{NET_1_L3_VM_IPS} @{NET_2_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_L3_VM_IPS}[2] ${dst_list} - -Delete Vm Instances In net_1 - [Documentation] Delete Vm instances using instance names in net_1. - [Tags] non_gate - FOR ${vm} IN @{NET_1_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Vm Instances In net_2 - [Documentation] Delete Vm instances using instance names in net_2. - [Tags] non_gate - FOR ${vm} IN @{NET_2_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Delete Vm Instances In net_3 - [Documentation] Delete Vm instances using instance names in net_3. - [Tags] non_gate - FOR ${vm} IN @{NET_3_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Create Vm Instances For net_4 - [Documentation] Create VM instances using flavor and image names for a network. - [Tags] non_gate - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[3] - ... ${NET_4_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Create Vm Instances For net_5 - [Documentation] Create VM instances using flavor and image names for a network. - [Tags] non_gate - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[4] - ... ${NET_5_VMS}[0] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - -Create Router2 - [Documentation] Create Router - [Tags] non_gate - OpenStackOperations.Create Router ${ROUTER}[1] - -Add net_4 Interfaces To Router2 - [Documentation] Add Interfaces - [Tags] non_gate - OpenStackOperations.Add Router Interface ${ROUTER}[1] ${SUBNETS_2}[0] - -Check Vm Instances on net_4 and net_5 Have Ip Address - [Tags] non_gate - @{NET_4_L3_VM_IPS} ${NET_4_L3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_4_VMS} - @{NET_5_L3_VM_IPS} ${NET_5_L3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_5_VMS} - BuiltIn.Set Suite Variable @{NET_4_L3_VM_IPS} - BuiltIn.Set Suite Variable @{NET_5_L3_VM_IPS} - BuiltIn.Should Not Contain ${NET_4_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_5_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_4_L3_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_5_L3_DHCP_IP} None - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_4_VMS} @{NET_5_VMS} - ... AND OpenStackOperations.Get Test Teardown Debugs - -Add net_5 Interfaces To Router2 - [Documentation] Add Interfaces - [Tags] non_gate - OpenStackOperations.Add Router Interface ${ROUTER}[1] ${SUBNETS_2}[1] - -Ping Vm Instance5 In net_5 From net_4 (vlan to vlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - [Tags] non_gate - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[3] ${NET_5_L3_VM_IPS}[0] - -Ping Vm Instance5 In net_4 From net_5 (vlan to vlan) - [Documentation] Check reachability of vm instances by pinging to them after creating routers. - [Tags] non_gate - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[4] ${NET_4_L3_VM_IPS}[0] - -Connectivity Tests From Vm Instance4 In net_5 - [Documentation] Check reachability of vm instance on a different network with one vlan vm in source and destination. - [Tags] non_gate - ${dst_list} = BuiltIn.Create List @{NET_4_L3_VM_IPS} - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[4] ${NET_5_L3_VM_IPS}[0] ${dst_list} - - -*** Keywords *** -Suite Setup - OpenStackOperations.OpenStack Suite Setup - OpenStackOperations.Create Network - ... ${NETWORKS}[0] - ... --provider-network-type vlan --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} --provider-segment ${NET_VLAN_ID}[0] - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS_1}[0] ${SUBNET_CIDRS}[0] - OpenStackOperations.Create Network ${NETWORKS}[1] - OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS_1}[1] ${SUBNET_CIDRS}[1] - OpenStackOperations.Create Network ${NETWORKS}[2] - OpenStackOperations.Create SubNet ${NETWORKS}[2] ${SUBNETS_1}[2] ${SUBNET_CIDRS}[2] - OpenStackOperations.Create Network - ... ${NETWORKS}[3] - ... --provider-network-type vlan --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} --provider-segment ${NET_VLAN_ID}[1] - OpenStackOperations.Create SubNet ${NETWORKS}[3] ${SUBNETS_2}[0] ${SUBNET_CIDRS}[3] - OpenStackOperations.Create Network - ... ${NETWORKS}[4] - ... --provider-network-type vlan --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} --provider-segment ${NET_VLAN_ID}[2] - OpenStackOperations.Create SubNet ${NETWORKS}[4] ${SUBNETS_2}[1] ${SUBNET_CIDRS}[4] - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[2] - ... ${NET_3_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[2] - ... ${NET_3_VMS}[1] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[2] - ... ${NET_3_VMS}[2] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - @{NET_1_L3_VM_IPS} ${NET_1_L3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - @{NET_2_L3_VM_IPS} ${NET_2_L3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS} - @{NET_3_L3_VM_IPS} ${NET_3_L3_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_3_VMS} - BuiltIn.Set Suite Variable @{NET_1_L3_VM_IPS} - BuiltIn.Set Suite Variable @{NET_2_L3_VM_IPS} - BuiltIn.Set Suite Variable @{NET_3_L3_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_2_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_3_L3_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_L3_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_2_L3_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_3_L3_DHCP_IP} None - OpenStackOperations.Create Router ${ROUTER}[0] - FOR ${interface} IN @{SUBNETS_1} - OpenStackOperations.Add Router Interface ${ROUTER}[0] ${interface} - END - OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} @{NET_3_VMS} - OpenStackOperations.Get Suite Debugs diff --git a/csit/suites/openstack/connectivity/live_migration.robot b/csit/suites/openstack/connectivity/live_migration.robot deleted file mode 100644 index ed9b5feb8f..0000000000 --- a/csit/suites/openstack/connectivity/live_migration.robot +++ /dev/null @@ -1,81 +0,0 @@ -*** Settings *** -Documentation Test suite to verify live Migaration of VM instance also verify the connectivity -... of VM instance while Migrating the instance, - -Library OperatingSystem -Library RequestsLibrary -Library SSHLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../libraries/LiveMigration.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/RemoteBash.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot - -Suite Setup Suite Setup -Suite Teardown LiveMigration.Live Migration Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${SECURITY_GROUP} migration_sg -@{NETWORKS} migration_net_1 -@{SUBNETS} migration_sub_1 -@{NET_1_VMS} migration_net_1_vm_1 migration_net_1_vm_2 -@{SUBNETS_RANGE} 130.0.0.0/24 - - -*** Test Cases *** -Migrate Instance And Verify Connectivity While Migration And After - [Documentation] migrate the server to different host. - ... and check the connectivity during Migration - ... with a ping test from DHCP NS. - ${net_id} = OpenStackOperations.Get Net Id ${NETWORKS}[0] - ${devstack_conn_id} = OpenStackOperations.Get ControlNode Connection - SSHLibrary.Switch Connection ${devstack_conn_id} - ${output} = SSHLibrary.Write sudo ip netns exec qdhcp-${net_id} ping ${NET1_VM_IPS}[0] - ${vm_host_before_migration} = OpenStackOperations.Get Hypervisor Host Of Vm ${NET_1_VMS}[0] - OpenStackOperations.Server Live Migrate ${NET_1_VMS}[0] - ${vm_list} = BuiltIn.Create List ${NET_1_VMS}[0] - FOR ${vm} IN @{vm_list} - BuiltIn.Wait Until Keyword Succeeds 6x 20s OpenStackOperations.Check If Migration Is Complete ${vm} - END - ${vm_host_after_migration} = OpenStackOperations.Get Hypervisor Host Of Vm ${NET_1_VMS}[0] - IF "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp" - BuiltIn.Should Match ${vm_host_after_migration} ${vm_host_before_migration} - ELSE - BuiltIn.Should Not Match ${vm_host_after_migration} ${vm_host_before_migration} - END - SSHLibrary.Switch Connection ${devstack_conn_id} - RemoteBash.Write_Bare_Ctrl_C - ${output} = SSHLibrary.Read Until packet loss - BuiltIn.Should Contain ${output} 64 bytes - ${output} = DevstackUtils.Write Commands Until Prompt - ... sudo ip netns exec qdhcp-${net_id} ping -c 10 ${NET1_VM_IPS}[0] - BuiltIn.Should Contain ${output} 64 bytes - - -*** Keywords *** -Suite Setup - LiveMigration.Live Migration Suite Setup - OpenstackOperations.Create Network ${NETWORKS}[0] - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNETS_RANGE}[0] - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - BuiltIn.Set Suite Variable @{NET_1_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None - OpenStackOperations.Show Debugs @{NET_1_VMS} - OpenStackOperations.Get Suite Debugs diff --git a/csit/suites/openstack/connectivity/security_group.robot b/csit/suites/openstack/connectivity/security_group.robot deleted file mode 100644 index 319b93a899..0000000000 --- a/csit/suites/openstack/connectivity/security_group.robot +++ /dev/null @@ -1,285 +0,0 @@ -*** Settings *** -Documentation Test suite to verify security groups basic and advanced functionalities, including negative tests. -... These test cases are not so relevant for transparent mode, so each test case will be tagged with -... "skip_if_transparent" to allow any underlying keywords to return with a PASS without risking -... a false failure. The real value of this suite will be in stateful mode. - -Library OperatingSystem -Library RequestsLibrary -Library SSHLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/RemoteBash.robot - -Suite Setup Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - -Force Tags skip_if_${security_group_mode} - - -*** Variables *** -${SECURITY_GROUP} sg_sg -@{NETWORKS} sg_net_1 sg_net_2 -@{SUBNETS} sg_sub_1 sg_sub_2 -${ROUTER} sg_router -@{NET_1_VMS} sg_net_1_vm_1 sg_net_1_vm_2 -@{NET_2_VMS} sg_net_2_vm_1 -@{SUBNET_CIDRS} 51.0.0.0/24 52.0.0.0/24 - - -*** Test Cases *** -No Ping From DHCP To Vm Instance1 - [Documentation] Check non-reachability of vm instances by pinging to them. - OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - -No Ping From Vm Instance1 To Vm Instance2 - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET_1_VM_IPS}[0] - ... ${vm_ips} - ... ping_should_succeed=False - -No Ping From Vm Instance2 To Vm Instance1 - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance - ... ${NETWORKS}[0] - ... ${NET_1_VM_IPS}[1] - ... ${vm_ips} - ... ping_should_succeed=False - -Add Ping Allow Rules With Remote SG (only between VMs) - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP} - ... direction=ingress - ... protocol=icmp - ... remote_group_id=${SECURITY_GROUP} - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP} - ... direction=egress - ... protocol=icmp - ... remote_group_id=${SECURITY_GROUP} - OpenStackOperations.Neutron Security Group Show ${SECURITY_GROUP} - -Verify No Ping From DHCP To Vm Instance1 - [Documentation] Check non-reachability of vm instances by pinging to them. - OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -Verify No Ping From DHCP To Vm Instance2 - [Documentation] Check non-reachability of vm instances by pinging to them. - OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - -Ping From Vm Instance1 To Vm Instance2 - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Ping From Vm Instance2 To Vm Instance1 - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${vm_ips} - -Create Router - [Documentation] Create Router and Add Interface to the subnets. - OpenStackOperations.Create Router ${ROUTER} - -Add Interfaces To Router - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Add Router Interface ${ROUTER} ${interface} - END - -Ping From Vm Instance1 To Vm Instance3 - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_2_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Repeat Ping From Vm Instance1 To Vm Instance2 With a Router - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Repeat Ping From Vm Instance2 To Vm Instance1 With a Router - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${vm_ips} - -Add Additional Security Group To VMs - [Documentation] Add an additional security group to the VMs - this is done to test a different logic put in place for ports with multiple SGs - OpenStackOperations.Security Group Create Without Default Security Rules additional-sg - #TODO Remove this after the Newton jobs are removed, Openstack CLI with Newton lacks support to configure rule with remote_ip_prefix - OpenStackOperations.Neutron Security Group Rule Create - ... additional-sg - ... direction=ingress - ... protocol=icmp - ... remote_ip_prefix=${NET_1_DHCP_IP}/32 - OpenStackOperations.Neutron Security Group Show additional-sg - FOR ${vm} IN @{NET_1_VMS} - OpenStackOperations.Add Security Group To VM ${vm} additional-sg - END - -Ping From DHCP To Vm Instance1 - [Documentation] Check reachability of vm instances by pinging to them from DHCP. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -Ping From DHCP To Vm Instance2 - [Documentation] Check reachability of vm instances by pinging to them from DHCP. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - -Repeat Ping From Vm Instance1 To Vm Instance2 With additional SG - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Repeat Ping From Vm Instance2 To Vm Instance1 With additional SG - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${vm_ips} - -Test Connection when Rules Change Dynamically - [Documentation] Initiate ping from DHCP to VM instance and remove security rules - ... dynamically check the communication has stopped after removing the security group rules. - ${net_id} = OpenstackOperations.Get Net Id ${NETWORKS}[0] - Get ControlNode Connection - ${output} = SSHLibrary.Write sudo ip netns exec qdhcp-${net_id} ping ${NET_1_VM_IPS}[0] - Delete All Security Group Rules additional-sg - Read delay=10s - Write_Bare_Ctrl_C - ${output} = Read Until packet loss - Should Not Contain ${output} ${PING_REGEXP} - -No Ping From DHCP To Vm Instance1 With Additional Security Group Rules Removed - [Documentation] Check non-reachability of vm instances by pinging to them. - OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -No Ping From DHCP To Vm Instance2 With Additional Security Group Rules Removed - [Documentation] Check non-reachability of vm instances by pinging to them. - OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - -Add The Rules To Additional Security Group Again - OpenStackOperations.Neutron Security Group Rule Create - ... additional-sg - ... direction=ingress - ... protocol=icmp - ... remote_ip_prefix=${NET_1_DHCP_IP}/32 - -Ping From DHCP To Vm Instance1 After Rules Are Added Again - [Documentation] Check reachability of vm instances by pinging to them from DHCP. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[0] - -Ping From DHCP To Vm Instance2 After Rules Are Added Again - [Documentation] Check reachability of vm instances by pinging to them from DHCP. - OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[1] - -Remove the additional Security Group from First Vm - OpenStackOperations.Remove Security Group From VM ${NET_1_VMS}[0] additional-sg - -Repeat Ping From Vm Instance1 To Vm Instance2 With Additional SG Removed From Vm1 - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Repeat Ping From Vm Instance2 To Vm Instance1 With Additional SG Removed From Vm1 - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${vm_ips} - -Remove Router Interfaces - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Remove Interface ${ROUTER} ${interface} - END - -Delete Router - OpenStackOperations.Delete Router ${ROUTER} - -Repeat Ping From Vm Instance1 To Vm Instance2 With Router Removed - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Repeat Ping From Vm Instance2 To Vm Instance1 With Router Removed - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${vm_ips} - -Delete Vm Instances In net_2 - FOR ${vm} IN @{NET_2_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - -Repeat Ping From Vm Instance1 To Vm Instance2 With net_2 VM Deleted - [Documentation] Login to the vm instance and test some operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[1] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${vm_ips} - -Repeat Ping From Vm Instance2 To Vm Instance1 With net_2 VM Deleted - [Documentation] Login to the vm instance and test operations - ${vm_ips} = BuiltIn.Create List ${NET_1_VM_IPS}[0] - OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${vm_ips} - - -*** Keywords *** -Suite Setup - OpenStackOperations.OpenStack Suite Setup - OpenStackOperations.Create Network ${NETWORKS}[0] - OpenStackOperations.Create Network ${NETWORKS}[1] - BuiltIn.Wait Until Keyword Succeeds - ... 10s - ... 2s - ... Utils.Check For Elements At URI - ... ${NETWORK_URL} - ... ${NETWORKS} - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0] - OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS}[1] ${SUBNET_CIDRS}[1] - BuiltIn.Wait Until Keyword Succeeds - ... 10s - ... 2s - ... Utils.Check For Elements At URI - ... ${SUBNETWORK_URL} - ... ${SUBNETS} - OpenStackOperations.Security Group Create Without Default Security Rules ${SECURITY_GROUP} - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP} - ... direction=ingress - ... port_range_max=65535 - ... port_range_min=1 - ... protocol=tcp - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP} - ... direction=egress - ... port_range_max=65535 - ... port_range_min=1 - ... protocol=tcp - OpenStackOperations.Neutron Security Group Show ${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[0] - ... ${NET_1_VMS}[1] - ... ${OS_CMP2_HOSTNAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance On Compute Node - ... ${NETWORKS}[1] - ... ${NET_2_VMS}[0] - ... ${OS_CMP1_HOSTNAME} - ... sg=${SECURITY_GROUP} - @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS} - @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS} - BuiltIn.Set Suite Variable @{NET_1_VM_IPS} - BuiltIn.Set Suite Variable ${NET_1_DHCP_IP} - BuiltIn.Set Suite Variable @{NET_2_VM_IPS} - BuiltIn.Should Not Contain ${NET_1_VM_IPS} None - BuiltIn.Should Not Contain ${NET_2_VM_IPS} None - BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None - BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None - OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} - OpenStackOperations.Get Suite Debugs diff --git a/csit/suites/openstack/extensions/sfc.robot b/csit/suites/openstack/extensions/sfc.robot deleted file mode 100644 index 4955136f7f..0000000000 --- a/csit/suites/openstack/extensions/sfc.robot +++ /dev/null @@ -1,894 +0,0 @@ -*** Settings *** -Documentation Test suite to verify SFC configuration and packet flows. - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/LiveMigration.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/KarafKeywords.robot - -Suite Setup Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs -... AND OpenStackOperations.Get Test Teardown Debugs For SFC - - -*** Variables *** -${SECURITY_GROUP} sg-sfc -@{NETWORKS} network_1 -@{SUBNETS} l2_subnet_1 -@{NET_1_VMS} sf1 sourcevm destvm -@{NON_SF_VMS} sourcevm destvm -@{SUBNET_CIDRS} 30.0.0.0/24 -@{PORTS} p1in p1out source_vm_port dest_vm_port -${NC_COMMAND} nc -zv -w 5 -${RES_SUCCESS} open -${RES_FAILURE} Operation timed out -${WEBSERVER_80} (python -m SimpleHTTPServer 80 > /dev/null 2>&1 &) -${WEBSERVER_81} (python -m SimpleHTTPServer 81 > /dev/null 2>&1 &) -${WEBSERVER_82} (python -m SimpleHTTPServer 82 > /dev/null 2>&1 &) -${WEBSERVER_83} (python -m SimpleHTTPServer 83 > /dev/null 2>&1 &) -${WEBSERVER_84} (python -m SimpleHTTPServer 84 > /dev/null 2>&1 &) -${WEBSERVER_85} (python -m SimpleHTTPServer 85 > /dev/null 2>&1 &) -${WEBSERVER_100} (python -m SimpleHTTPServer 100 > /dev/null 2>&1 &) -${WEBSERVER_101} (python -m SimpleHTTPServer 101 > /dev/null 2>&1 &) -${WEBSERVER_102} (python -m SimpleHTTPServer 102 > /dev/null 2>&1 &) -${WEBSERVER_103} (python -m SimpleHTTPServer 103 > /dev/null 2>&1 &) -${WEBSERVER_CMDS} -... ${WEBSERVER_80} && ${WEBSERVER_81} && ${WEBSERVER_82} && ${WEBSERVER_83} && ${WEBSERVER_84} && ${WEBSERVER_85} && ${WEBSERVER_100} && ${WEBSERVER_101} && ${WEBSERVER_102} && ${WEBSERVER_103} -${CLOUD_IMAGE} "https://artifacts.opnfv.org/sfc/images/sfc_nsh_fraser.qcow2" -${CLOUD_IMAGE_NAME} sfc_nsh_fraser -${CLOUD_FLAVOR_NAME} sfc_nsh_fraser -${ETH_IN} eth0 -${ETH_OUT} eth1 -${CLOUD_IMAGE_USER} root -${CLOUD_IMAGE_PASS} opnfv -${CLOULD_IMAGE_CONSOLE} root - - -*** Test Cases *** -Create Flow Classifiers For Basic Test - [Documentation] Create SFC Flow Classifier for TCP traffic between source VM and destination VM - OpenStackOperations.Create SFC Flow Classifier - ... FC_80 - ... ${NET1_VM_IPS}[0] - ... ${NET1_VM_IPS}[1] - ... tcp - ... source_vm_port - ... args=--destination-port 80:80 - OpenStackOperations.Create SFC Flow Classifier - ... FC_81 - ... ${NET1_VM_IPS}[0] - ... ${NET1_VM_IPS}[1] - ... tcp - ... source_vm_port - ... args=--destination-port 81:81 - OpenStackOperations.Create SFC Flow Classifier - ... FC_83_85 - ... ${NET1_VM_IPS}[0] - ... ${NET1_VM_IPS}[1] - ... tcp - ... source_vm_port - ... args=--destination-port 83:85 - -Create Port Pair - [Documentation] Create SFC Port Pairs - OpenStackOperations.Create SFC Port Pair SFPP1 p1in p1out - -Create Port Pair Groups - [Documentation] Create SFC Port Pair Groups - OpenStackOperations.Create SFC Port Pair Group SFPPG1 SFPP1 - -Test Communication From Vm Instance1 In net_1 No SF - [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher. - ${DEST_VM_LIST} BuiltIn.Create List ${NET1_VM_IPS}[1] - ${nc_resp} OpenStackOperations.Execute Command on VM Instance - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} ${NET1_VM_IPS}[1] 80 - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - BuiltIn.Should Contain ${nc_resp} ${RES_SUCCESS} - ${nc_resp} OpenStackOperations.Execute Command on VM Instance - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} ${NET1_VM_IPS}[1] 81 - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - BuiltIn.Should Contain ${nc_resp} ${RES_SUCCESS} - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs - ... AND OpenStackOperations.Get Test Teardown Debugs For SFC - ... AND OpenStackOperations.Exit From Vm Console - -Create Port Chain For Src->Dest Port 80 - [Documentation] Create SFC Port Chain using port group and classifier created previously - OpenStackOperations.Create SFC Port Chain SFPC1 args=--port-pair-group SFPPG1 --flow-classifier FC_80 - -Test Communication From Vm Instance1 In net_1 Port 80 via SF - [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher. - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 81 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80 - BuiltIn.Comment Port 80 communication should fail as the SF blocks the same - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_FAILURE} - BuiltIn.Comment Test to confirm Port 81 is not blocked - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 81 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81 - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 81 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs - ... AND OpenStackOperations.Get Test Teardown Debugs For SFC - ... AND OpenStackOperations.Exit From Vm Console - -Update Port Chain To Use Flow Classifier For Port 81 - [Documentation] Update Port Chain to use FC_81 instead of FC_80 - OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_81 - OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_80 - -Test Communication From Vm Instance1 In net_1 Port 81 via SF - [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance. - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 81 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81 - BuiltIn.Comment Port 81 communication should fail as the SF blocks the same - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 81 - ... ${RES_FAILURE} - BuiltIn.Comment Test to confirm Port 80 does not continue to get routed through SF - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80 - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 81 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs - ... AND OpenStackOperations.Get Test Teardown Debugs For SFC - ... AND OpenStackOperations.Exit From Vm Console - -Update Port Chain To Use Flow Classifier For Port Range 83-85 - [Documentation] Update Port Chain to use FC_83_85 - OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_83_85 - -Test Communication From Vm Instance1 In net_1 Port 84 And 85 via SF - [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance. - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 84 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 85 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 83 - BuiltIn.Comment Port 83 communication should fail as the SF blocks the same - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 83 - ... ${RES_FAILURE} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 84 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 85 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 84 - BuiltIn.Comment Port 84 communication should fail as the SF blocks the same - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 84 - ... ${RES_FAILURE} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 85 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 85 - BuiltIn.Comment Port 85 communication should fail as the SF blocks the same - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 84 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 85 - ... ${RES_FAILURE} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80 - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 80 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 84 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} - ... 85 - ... ${RES_SUCCESS} - -Update Port Chain To Use Flow Classifier For Input Port Range 101-103 - [Documentation] Update Port Chain to use FC_101_103 - BuiltIn.Comment Removing and Deleting Existing Conflicting Flow Classifiers - OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_81 - OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_83_85 - OpenStackOperations.Delete SFC Flow Classifier FC_80 - OpenStackOperations.Delete SFC Flow Classifier FC_81 - OpenStackOperations.Delete SFC Flow Classifier FC_83_85 - OpenStackOperations.Create SFC Flow Classifier - ... FC_101_103 - ... ${NET1_VM_IPS}[0] - ... ${NET1_VM_IPS}[1] - ... tcp - ... source_vm_port - ... args=--source-port 101:103 - OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_101_103 - -Test Communication From Vm Instance1 In net_1 Port 100 And 102 via SF - [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance. - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 80 - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 100 - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 101 - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 102 - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 103 - ... 83 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 83 - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 80 - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 100 - ... 83 - ... ${RES_SUCCESS} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 101 - ... 83 - ... ${RES_FAILURE} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 102 - ... 83 - ... ${RES_FAILURE} - Wait Until Keyword Succeeds - ... 3x - ... 10s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 103 - ... 83 - ... ${RES_FAILURE} - -Delete And Recreate Port Chain And Flow Classifiers For Symmetric Test - OpenStackOperations.Create SFC Flow Classifier - ... FC_SYM - ... ${NET1_VM_IPS}[0] - ... ${NET1_VM_IPS}[1] - ... tcp - ... source_vm_port - ... args=--destination-port 82:82 --source-port 2000 --logical-destination-port dest_vm_port - OpenStackOperations.Delete SFC Port Chain SFPC1 - OpenStackOperations.Create SFC Port Chain - ... SFPSYM - ... args=--port-pair-group SFPPG1 --flow-classifier FC_SYM --chain-parameters symmetric=true - -Test Communication From Vm Instance1 For Symmetric Chain - [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance. - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off - Wait Until Keyword Succeeds - ... 8x - ... 20s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 2000 - ... 82 - ... ${RES_SUCCESS} - BuiltIn.Comment Test to confirm the SRC->DEST Port 82 is routed through SF - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 82 - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off - Wait Until Keyword Succeeds - ... 8x - ... 20s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 2000 - ... 82 - ... ${RES_FAILURE} - BuiltIn.Comment Test to confirm DEST->SRC Port 2000 path SFC traversal - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off --block 2000 - Wait Until Keyword Succeeds - ... 8x - ... 20s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 2000 - ... 82 - ... ${RES_FAILURE} - BuiltIn.Comment Test to confirm the Normalcy restored - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off - Start Vxlan Tool in SF - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off - Wait Until Keyword Succeeds - ... 8x - ... 20s - ... Check Network Reachability - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... ${NC_COMMAND} -p 2000 - ... 82 - ... ${RES_SUCCESS} - Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP} - [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs - ... AND OpenStackOperations.Get Test Teardown Debugs For SFC - ... AND OpenStackOperations.Exit From Vm Console - -Delete Configurations - [Documentation] Delete all elements that were created in the test case section. These are done - ... in a local keyword so this can be called as part of the Suite Teardown. When called as part - ... of the Suite Teardown, all steps will be attempted. This prevents robot framework from bailing - ... on the rest of a test case if one step intermittently has trouble and fails. The goal is to attempt - ... to leave the test environment as clean as possible upon completion of this suite. - FOR ${vm} IN @{NET_1_VMS} - OpenStackOperations.Delete Vm Instance ${vm} - END - OpenStackOperations.Delete SFC Port Chain SFPSYM - OpenStackOperations.Delete SFC Port Pair Group SFPPG1 - OpenStackOperations.Delete SFC Port Pair SFPP1 - OpenStackOperations.Delete SFC Flow Classifier FC_101_103 - OpenStackOperations.Delete SFC Flow Classifier FC_SYM - FOR ${port} IN @{PORTS} - OpenStackOperations.Delete Port ${port} - END - OpenStackOperations.Delete SubNet l2_subnet_1 - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Delete Network ${network} - END - OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP} - - -*** Keywords *** -Suite Setup - OpenStackOperations.OpenStack Suite Setup - Create Basic Networks - Create Ports For Testing - Create Instances For Testing - Check Vm Instances Have Ip Address And Ready For Test - Start Applications on VM Instances For Test - -Create Basic Networks - BuiltIn.Comment Create Network For Testing - OpenStackOperations.Create Network ${NETWORKS}[0] - BuiltIn.Comment Create Subnet For Testing - OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0] - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} - BuiltIn.Comment Create Neutron Ports with no port security for SFC Tests - OpenStackOperations.Get Suite Debugs - -Create Ports For Testing - FOR ${port} IN @{PORTS} - OpenStackOperations.Create Port ${NETWORKS}[0] ${port} sg=${SECURITY_GROUP} - END - OpenStackOperations.Update Port p1in additional_args=--no-security-group - OpenStackOperations.Update Port p1in additional_args=--disable-port-security - OpenStackOperations.Update Port p1out additional_args=--no-security-group - OpenStackOperations.Update Port p1out additional_args=--disable-port-security - OpenStackOperations.Get Suite Debugs - -Create Instances For Testing - ${SF_COMP_HOST} BuiltIn.Set Variable If 2 < ${NUM_OS_SYSTEM} ${OS_CMP2_HOSTNAME} ${OS_CMP1_HOSTNAME} - OpenStackOperations.Add New Image From Url ${CLOUD_IMAGE} ${CLOUD_IMAGE_NAME} - OpenStackOperations.Create Flavor ${CLOUD_FLAVOR_NAME} 512 1 - OpenStackOperations.Create Vm Instance With Ports On Compute Node - ... p1in - ... p1out - ... sf1 - ... ${SF_COMP_HOST} - ... image=${CLOUD_IMAGE_NAME} - ... flavor=${CLOUD_FLAVOR_NAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance With Port On Compute Node - ... source_vm_port - ... sourcevm - ... ${OS_CMP1_HOSTNAME} - ... image=${CLOUD_IMAGE_NAME} - ... flavor=${CLOUD_FLAVOR_NAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Create Vm Instance With Port On Compute Node - ... dest_vm_port - ... destvm - ... ${OS_CMP1_HOSTNAME} - ... image=${CLOUD_IMAGE_NAME} - ... flavor=${CLOUD_FLAVOR_NAME} - ... sg=${SECURITY_GROUP} - OpenStackOperations.Show Debugs @{NET_1_VMS} - OpenStackOperations.Get Suite Debugs - -Check Vm Instances Have Ip Address And Ready For Test - OpenStackOperations.Poll VM Is ACTIVE sf1 - OpenStackOperations.Poll VM Is ACTIVE sourcevm - OpenStackOperations.Poll VM Is ACTIVE destvm - ${sfc1_mac} OpenStackOperations.Get Port Mac p1in - ${SF1_IP} OpenStackOperations.Get Port Ip p1in - BuiltIn.Wait Until Keyword Succeeds - ... 500s - ... 60s - ... OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace - ... ${NETWORKS}[0] - ... ${sfc1_mac} - ... ${SF1_IP} - ${src_mac} OpenStackOperations.Get Port Mac source_vm_port - ${src_ip} OpenStackOperations.Get Port Ip source_vm_port - BuiltIn.Wait Until Keyword Succeeds - ... 500s - ... 60s - ... OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace - ... ${NETWORKS}[0] - ... ${src_mac} - ... ${src_ip} - ${dest_mac} OpenStackOperations.Get Port Mac dest_vm_port - ${dest_ip} OpenStackOperations.Get Port Ip dest_vm_port - BuiltIn.Wait Until Keyword Succeeds - ... 500s - ... 60s - ... OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace - ... ${NETWORKS}[0] - ... ${dest_mac} - ... ${dest_ip} - BuiltIn.Comment If the Tests reach this point, all the Instances are reachable. - ${NET1_VM_IPS} BuiltIn.Create List ${src_ip} ${dest_ip} - BuiltIn.Set Suite Variable @{NET1_VM_IPS} - BuiltIn.Set Suite Variable ${SF1_IP} - BuiltIn.Set Suite Variable ${OS_SYSTEM_PROMPT} \# - BuiltIn.Wait Until Keyword Succeeds - ... 300s - ... 60s - ... OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password - ... ${NETWORKS}[0] - ... ${SF1_IP} - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - BuiltIn.Wait Until Keyword Succeeds - ... 300s - ... 60s - ... OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[0] - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - BuiltIn.Wait Until Keyword Succeeds - ... 300s - ... 60s - ... OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[1] - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - OpenStackOperations.Show Debugs @{NET_1_VMS} - OpenStackOperations.Get Suite Debugs - -Start Applications on VM Instances For Test - BuiltIn.Comment Run Web server Scripts on destination vm listening to 80,81 and 82 ports - ${resp} OpenStackOperations.Execute Command on VM Instance - ... ${NETWORKS}[0] - ... ${NET1_VM_IPS}[1] - ... ${WEBSERVER_CMDS} && (echo done) - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - BuiltIn.Should Contain ${resp} done - -Start Vxlan Tool in SF - [Documentation] Starts the tool in the SF VM's - [Arguments] ${network} ${sf_vm_ip} ${args}=${EMPTY} - OpenStackOperations.Execute Command on VM Instance - ... ${network} - ... ${sf_vm_ip} - ... nohup python vxlan_tool.py ${args} & - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - -Stop Vxlan Tool in SF - [Documentation] Starts the tool in the SF VM's - [Arguments] ${network} ${sf_vm_ip} - OpenStackOperations.Execute Command on VM Instance - ... ${network} - ... ${sf_vm_ip} - ... pkill python - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - -Check Network Reachability - [Arguments] ${net_name} ${source_vm_ip} ${command} ${port} ${ret_code} ${cmd_timeout}=30s - ${nc_resp} OpenStackOperations.Execute Command on VM Instance - ... ${net_name} - ... ${source_vm_ip} - ... ${command} ${NET1_VM_IPS}[1] ${port} - ... cmd_timeout=${cmd_timeout} - ... user=${CLOUD_IMAGE_USER} - ... password=${CLOUD_IMAGE_PASS} - ... console=${CLOULD_IMAGE_CONSOLE} - BuiltIn.Should Contain ${nc_resp} ${ret_code} diff --git a/csit/suites/openstack/neutron/001__reachability.robot b/csit/suites/openstack/neutron/001__reachability.robot deleted file mode 100644 index 8cfcefe056..0000000000 --- a/csit/suites/openstack/neutron/001__reachability.robot +++ /dev/null @@ -1,26 +0,0 @@ -*** Settings *** -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Create Session ODL http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} -Suite Teardown Delete All Sessions - - -*** Test Cases *** -Get the complete list of networks - [Documentation] Get the complete list of networks - [Tags] reachability - ${resp} get request ODL ${NEUTRON_NETWORKS_API} - Should be Equal As Strings ${resp.status_code} 200 - -Get the complete list of subnets - [Documentation] Get the complete list of subnets - [Tags] reachability - ${resp} get request ODL ${NEUTRON_SUBNETS_API} - Should be Equal As Strings ${resp.status_code} 200 - -Get the complete list of ports - [Documentation] Get the complete list of ports - [Tags] reachability - ${resp} get request ODL ${NEUTRON_PORTS_API} - Should be Equal As Strings ${resp.status_code} 200 diff --git a/csit/suites/openstack/neutron/010__networks.robot b/csit/suites/openstack/neutron/010__networks.robot deleted file mode 100644 index d34b040b3d..0000000000 --- a/csit/suites/openstack/neutron/010__networks.robot +++ /dev/null @@ -1,54 +0,0 @@ -*** Settings *** -Documentation Checking Network created in OpenStack are pushed to OpenDaylight - -Library Collections -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH} -Suite Teardown Delete All Sessions - - -*** Variables *** -${OSREST} /v2.0/networks -${postNet} {"network":{"name":"odl_network","admin_state_up":true}} - - -*** Test Cases *** -Check OpenStack Networks - [Documentation] Checking OpenStack Neutron for known networks - [Tags] network neutron openstack - Log ${X-AUTH} - ${resp} get request OSSession ${OSREST} - Should be Equal As Strings ${resp.status_code} 200 - ${OSResult} To Json ${resp.text} - Log ${OSResult} - -Check OpenDaylight Networks - [Documentation] Checking OpenDaylight Neutron API for known networks - [Tags] network neutron opendaylight - Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} - ${resp} get request ODLSession ${NEUTRON_NETWORKS_API} - Should be Equal As Strings ${resp.status_code} 200 - ${ODLResult} To Json ${resp.text} - Log ${ODLResult} - -Create Network - [Documentation] Create new network in OpenStack - [Tags] create network openstack neutron - Log ${postNet} - ${resp} post request OSSession ${OSREST} data=${postNet} - Should be Equal As Strings ${resp.status_code} 201 - ${result} To JSON ${resp.text} - ${result} Get From Dictionary ${result} network - ${NETID} Get From Dictionary ${result} id - Log ${result} - Log ${NETID} - Set Global Variable ${NETID} - sleep 2 - -Check Network - [Documentation] Check network created in OpenDaylight - [Tags] check network opendaylight - ${resp} get request ODLSession ${NEUTRON_NETWORKS_API}/${NetID} - Should be Equal As Strings ${resp.status_code} 200 diff --git a/csit/suites/openstack/neutron/020__subnets.robot b/csit/suites/openstack/neutron/020__subnets.robot deleted file mode 100644 index 8573f88ad4..0000000000 --- a/csit/suites/openstack/neutron/020__subnets.robot +++ /dev/null @@ -1,55 +0,0 @@ -*** Settings *** -Documentation Checking Subnets created in OpenStack are pushed to OpenDaylight - -Library Collections -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH} -Suite Teardown Delete All Sessions - - -*** Variables *** -${OSREST} /v2.0/subnets -${data} -... {"subnet":{"network_id":"${NETID}","ip_version":4,"cidr":"172.16.64.0/24","allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}]}} - - -*** Test Cases *** -Check OpenStack Subnets - [Documentation] Checking OpenStack Neutron for known subnets - [Tags] subnets neutron openstack - Log ${X-AUTH} - ${resp} get request OSSession ${OSREST} - Should be Equal As Strings ${resp.status_code} 200 - ${OSResult} To Json ${resp.text} - Log ${OSResult} - -Check OpenDaylight subnets - [Documentation] Checking OpenDaylight Neutron API for known subnets - [Tags] subnets neutron opendaylight - Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} - ${resp} get request ODLSession ${NEUTRON_SUBNETS_API} - Should be Equal As Strings ${resp.status_code} 200 - ${ODLResult} To Json ${resp.text} - Log ${ODLResult} - -Create New subnet - [Documentation] Create new subnet in OpenStack - [Tags] create subnet openstack neutron - Log ${data} - ${resp} post request OSSession ${OSREST} data=${data} - Should be Equal As Strings ${resp.status_code} 201 - ${result} To JSON ${resp.text} - ${result} Get From Dictionary ${result} subnet - ${SUBNETID} Get From Dictionary ${result} id - Log ${result} - Log ${SUBNETID} - Set Global Variable ${SUBNETID} - sleep 2 - -Check New subnet - [Documentation] Check new subnet created in OpenDaylight - [Tags] check subnet opendaylight - ${resp} get request ODLSession ${NEUTRON_SUBNETS_API}/${SUBNETID} - Should be Equal As Strings ${resp.status_code} 200 diff --git a/csit/suites/openstack/neutron/030__ports.robot b/csit/suites/openstack/neutron/030__ports.robot deleted file mode 100644 index 8638ede155..0000000000 --- a/csit/suites/openstack/neutron/030__ports.robot +++ /dev/null @@ -1,54 +0,0 @@ -*** Settings *** -Documentation Checking Port created in OpenStack are pushed to OpenDaylight - -Library Collections -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH} -Suite Teardown Delete All Sessions - - -*** Variables *** -${OSREST} /v2.0/ports -${data} {"port":{"network_id":"${NETID}","admin_state_up": true}} - - -*** Test Cases *** -Check OpenStack ports - [Documentation] Checking OpenStack Neutron for known ports - [Tags] ports neutron openstack - Log ${X-AUTH} - ${resp} get request OSSession ${OSREST} - Should be Equal As Strings ${resp.status_code} 200 - ${OSResult} To Json ${resp.text} - Log ${OSResult} - -Check OpenDaylight ports - [Documentation] Checking OpenDaylight Neutron API for known ports - [Tags] ports neutron opendaylight - Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} - ${resp} get request ODLSession ${NEUTRON_PORTS_API} - Should be Equal As Strings ${resp.status_code} 200 - ${ODLResult} To Json ${resp.text} - Log ${ODLResult} - -Create New Port - [Documentation] Create new port in OpenStack - [Tags] create port openstack neutron - Log ${data} - ${resp} post request OSSession ${OSREST} data=${data} - Should be Equal As Strings ${resp.status_code} 201 - ${result} To JSON ${resp.text} - ${result} Get From Dictionary ${result} port - ${PORTID} Get From Dictionary ${result} id - Log ${result} - Log ${PORTID} - Set Global Variable ${PORTID} - sleep 2 - -Check New Port - [Documentation] Check new port created in OpenDaylight - [Tags] check port opendaylight - ${resp} get request ODLSession ${NEUTRON_PORTS_API}/${PORTID} - Should be Equal As Strings ${resp.status_code} 200 diff --git a/csit/suites/openstack/neutron/040__delete_ports.robot b/csit/suites/openstack/neutron/040__delete_ports.robot deleted file mode 100644 index 3f812f8a20..0000000000 --- a/csit/suites/openstack/neutron/040__delete_ports.robot +++ /dev/null @@ -1,46 +0,0 @@ -*** Settings *** -Documentation Checking Port deleted in OpenStack are deleted also in OpenDaylight - -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Start Suite -Suite Teardown Delete All Sessions - - -*** Variables *** -${OSREST} /v2.0/ports/${PORTID} -${data} {"port":{"network_id":"${NETID}","admin_state_up": true}} - - -*** Test Cases *** -Delete New Port - [Documentation] Delete previously created port in OpenStack - [Tags] delete port openstack neutron - Log ${data} - ${resp} delete request OSSession ${OSREST} - Should be Equal As Strings ${resp.status_code} 204 - Log ${resp.text} - sleep 2 - -Check Port Deleted - [Documentation] Check port deleted in OpenDaylight - [Tags] check port deleted opendaylight - ${resp} get request ODLSession ${NEUTRON_PORTS_API} - Should be Equal As Strings ${resp.status_code} 200 - ${ODLResult} To Json ${resp.text} - Log ${ODLResult} - ${resp} get request ODLSession ${NEUTRON_PORTS_API}/${PORTID} - Should be Equal As Strings ${resp.status_code} 404 - - -*** Keywords *** -Check Port Exists - [Arguments] ${portid} - ${resp} get request ODLSession ${NEUTRON_PORTS_API}/${portid} - Should be Equal As Strings ${resp.status_code} 200 - -Start Suite - Create Session OSSession ${NEUTRONURL} headers=${X-AUTH-NOCONTENT} - Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} - Check Port Exists ${PORTID} diff --git a/csit/suites/openstack/neutron/050__delete_subnets.robot b/csit/suites/openstack/neutron/050__delete_subnets.robot deleted file mode 100644 index dad6a85245..0000000000 --- a/csit/suites/openstack/neutron/050__delete_subnets.robot +++ /dev/null @@ -1,47 +0,0 @@ -*** Settings *** -Documentation Checking Subnets deleted in OpenStack are deleted also in OpenDaylight - -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Start Suite -Suite Teardown Delete All Sessions - - -*** Variables *** -${OSREST} /v2.0/subnets/${SUBNETID} -${data} -... {"subnet":{"network_id":"${NETID}","ip_version":4,"cidr":"172.16.64.0/24","allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}]}} - - -*** Test Cases *** -Delete New subnet - [Documentation] Delete previously created subnet in OpenStack - [Tags] delete subnet openstack neutron - Log ${data} - ${resp} delete request OSSession ${OSREST} - Should be Equal As Strings ${resp.status_code} 204 - Log ${resp.text} - sleep 2 - -Check New subnet deleted - [Documentation] Check subnet deleted in OpenDaylight - [Tags] check subnet deleted opendaylight - ${resp} get request ODLSession ${NEUTRON_SUBNETS_API} - Should be Equal As Strings ${resp.status_code} 200 - ${ODLResult} To Json ${resp.text} - Log ${ODLResult} - ${resp} get request ODLSession ${NEUTRON_SUBNETS_API}/${SUBNETID} - Should be Equal As Strings ${resp.status_code} 404 - - -*** Keywords *** -Check Subnet Exists - [Arguments] ${subnetid} - ${resp} get request ODLSession ${NEUTRON_SUBNETS_API}/${subnetid} - Should be Equal As Strings ${resp.status_code} 200 - -Start Suite - Create Session OSSession ${NEUTRONURL} headers=${X-AUTH-NOCONTENT} - Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} - Check Subnet Exists ${SUBNETID} diff --git a/csit/suites/openstack/neutron/060__delete_networks.robot b/csit/suites/openstack/neutron/060__delete_networks.robot deleted file mode 100644 index 0a59865f22..0000000000 --- a/csit/suites/openstack/neutron/060__delete_networks.robot +++ /dev/null @@ -1,46 +0,0 @@ -*** Settings *** -Documentation Checking Network deleted in OpenStack are deleted also in OpenDaylight - -Library RequestsLibrary -Resource ../../../variables/Variables.robot - -Suite Setup Start Suite -Suite Teardown Delete All Sessions - - -*** Variables *** -${OSREST} /v2.0/networks/${NETID} -${postNet} {"network":{"name":"odl_network","admin_state_up":true}} - - -*** Test Cases *** -Delete Network - [Documentation] Delete network in OpenStack - [Tags] delete network openstack neutron - Log ${postNet} - ${resp} delete request OSSession ${OSREST} - Should be Equal As Strings ${resp.status_code} 204 - Log ${resp.text} - sleep 2 - -Check Network deleted - [Documentation] Check network deleted in OpenDaylight - [Tags] check network opendaylight - ${resp} get request ODLSession ${NEUTRON_NETWORKS_API} - Should be Equal As Strings ${resp.status_code} 200 - ${ODLResult} To Json ${resp.text} - Log ${ODLResult} - ${resp} get request ODLSession ${NEUTRON_NETWORKS_API}/${NETID} - Should be Equal As Strings ${resp.status_code} 404 - - -*** Keywords *** -Check Network Exists - [Arguments] ${netid} - ${resp} get request ODLSession ${NEUTRON_NETWORKS_API}/${netid} - Should be Equal As Strings ${resp.status_code} 200 - -Start Suite - Create Session OSSession ${NEUTRONURL} headers=${X-AUTH-NOCONTENT} - Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} - Check Network Exists ${NETID} diff --git a/csit/suites/openstack/neutron/__init__.robot b/csit/suites/openstack/neutron/__init__.robot deleted file mode 100644 index a9aaee670f..0000000000 --- a/csit/suites/openstack/neutron/__init__.robot +++ /dev/null @@ -1,39 +0,0 @@ -*** Settings *** -Documentation Test suite for Neutron Plugin - -Library SSHLibrary -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Resource ../../../variables/Variables.robot - -Suite Setup Start Suite -Suite Teardown Stop Suite - - -*** Variables *** -${OSTENANTNAME} "admin" -${OSUSERNAME} "admin" -${OSPASSWORD} "admin" -${OSUSERDOMAINNAME} "Default" -${OSPROJECTDOMAINNAME} "Default" -${PASSWORD} -... {"user":{"name":${OSUSERNAME},"domain":{"name": ${OSUSERDOMAINNAME}},"password":${OSPASSWORD}}} -${SCOPE} {"project":{"name":${OSTENANTNAME},"domain":{"name": ${OSPROJECTDOMAINNAME}}}} -${UserInfo} {"auth":{"identity":{"methods":["password"],"password":${PASSWORD}},"scope":${SCOPE}}} -${KEYSTONEURL} http://${KEYSTONE}:5000 - - -*** Keywords *** -Start Suite - Create Session KeyStoneSession ${KEYSTONEURL} headers=${HEADERS} - ${resp} post KeyStoneSession /v3/auth/tokens ${UserInfo} - Should Be Equal As Strings ${resp.status_code} 201 - ${TOKEN} Get From Dictionary ${resp.headers} X-Subject-Token - ${X-AUTH} Create Dictionary X-Auth-Token=${TOKEN} Content-Type=application/json - ${X-AUTH-NOCONTENT} Create Dictionary X-Auth-Token=${TOKEN} - Set Global Variable ${X-AUTH} - Set Global Variable ${X-AUTH-NOCONTENT} - -Stop Suite - Delete All Sessions diff --git a/csit/suites/openstack/securitygroup/acl.robot b/csit/suites/openstack/securitygroup/acl.robot deleted file mode 100644 index 89ffb5546f..0000000000 --- a/csit/suites/openstack/securitygroup/acl.robot +++ /dev/null @@ -1,253 +0,0 @@ -*** Settings *** -Documentation Test suite to validate ARP functionality for ACL_Enhancement feature. - -Library OperatingSystem -Library RequestsLibrary -Library String -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/OvsManager.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot -Resource ../../../variables/Variables.robot - -Suite Setup Start Suite -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -@{REQ_NETWORKS} acl_net_1 acl_net_2 -@{REQ_SUBNETS} acl_subnet_1 acl_subnet_2 -@{REQ_SUBNET_CIDR} 30.30.30.0/24 40.40.40.0/24 -@{PORTS} acl_port_1 acl_port_2 acl_port_3 acl_port_4 -@{VM_NAMES} acl_myvm_1 acl_myvm_2 -@{SECURITY_GROUP} acl_sg_1 -${VIRTUAL_IP} 30.30.30.100/24 -${PACKET_COUNT} 5 -${RANDOM_IP} 11.11.11.11 -${NETMASK} 255.255.255.0 -${PACKET_COUNT_ZERO} 0 -${DHCP_CMD} sudo /sbin/cirros-dhcpc up eth1 -${SPOOF_IP} 30.30.30.100 -@{SPOOF_MAC_ADDRESSES} FA:17:3E:73:65:86 fa:16:3e:3d:3b:5e -${ARP_CONFIG} -... sudo ifconfig eth0 down \n sudo ifconfig eth0 hw ether ${SPOOF_MAC_ADDRESSES[0]} \n sudo ifconfig eth0 up -${ARP_SHA} arp_sha -${ARP} arp -${TABLE} goto_table:217 -${INTEGRATION_BRIDGE} br-int -@{DEFAULT_FLOW_TABLES} 18 19 20 22 23 24 43 -... 45 48 50 51 60 80 81 -... 90 210 211 212 213 214 215 -... 216 217 239 240 241 242 243 -... 244 245 246 247 - - -*** Test Cases *** -Verify ARP request Valid MAC and Valid IP for the VM Egress Table - [Documentation] Verifying ARP resquest resolved for Valid MAC and Valid IP at the VM Egress Table - OpenStackOperations.Execute Command on VM Instance ${REQ_NETWORKS}[0] ${VM_IP_DPN1}[0] ${DHCP_CMD} - OpenStackOperations.Execute Command on VM Instance ${REQ_NETWORKS}[0] ${VM_IP_DPN2}[0] ${DHCP_CMD} - ${get_pkt_count_before_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${arping_cli} = BuiltIn.Set Variable sudo arping -I eth0 -c ${PACKET_COUNT} \ ${RANDOM_IP} - OpenStackOperations.Execute Command on VM Instance ${REQ_NETWORKS[1]} ${VM_IP_DPN1}[1] ${arping_cli} - ${get_pkt_count_after_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${pkt_diff} = BuiltIn.Evaluate int(${get_pkt_count_after_arp})-int(${get_pkt_count_before_arp}) - BuiltIn.Should Be Equal As Numbers ${pkt_diff} ${PACKET_COUNT} - -Verify ARP request generated from Spoofed IP for the VM - [Documentation] Verifying ARP resquest generated for Spoofed IP with Valid MAC and Validate the packet drop at the VM Egress Table - ${arp_int_up_cli} = BuiltIn.Set Variable sudo ifconfig eth0:1 ${SPOOF_IP} netmask ${NETMASK} up - ${output} = OpenStackOperations.Execute Command on VM Instance - ... ${REQ_NETWORKS}[1] - ... ${VM_IP_DPN1}[1] - ... ${arp_int_up_cli} - ${get_pkt_count_before_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${get_arp_drop_pkt_before} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${ARP}.*${TABLE} - ${arping_cli} = BuiltIn.Set Variable sudo arping -s ${SPOOF_IP} -c ${PACKET_COUNT} \ ${RANDOM_IP} - ${output} = OpenStackOperations.Execute Command on VM Instance - ... ${REQ_NETWORKS}[1] - ... ${VM_IP_DPN1}[1] - ... ${arping_cli} - ${get_pkt_count_after_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${get_arp_drop_pkt_after} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${ARP}.*${TABLE} - ${pkt_diff_arp_drop} = BuiltIn.Evaluate int(${get_arp_drop_pkt_after})-int(${get_arp_drop_pkt_before}) - ${pkt_diff} = BuiltIn.Evaluate int(${get_pkt_count_after_arp})-int(${get_pkt_count_before_arp}) - BuiltIn.Should Be Equal As Numbers ${pkt_diff} ${PACKET_COUNT_ZERO} - BuiltIn.Should Be Equal As Numbers ${pkt_diff_arp_drop} ${PACKET_COUNT} - -Verify ARP request generated from Spoofed MAC for the VM - [Documentation] Verifying ARP resquest generated for Spoofed MAC with Valid IP and Validate the ARP packet drop at the VM Egress Table - ${count} = String.Get Line Count ${ARP_CONFIG} - FOR ${index} IN RANGE 0 ${count} - ${cmd} = String.Get Line ${ARP_CONFIG} ${index} - ${output} = OpenStackOperations.Execute Command on VM Instance - ... ${REQ_NETWORKS}[1] - ... ${VM_IP_DPN1}[1] - ... ${cmd} - END - ${get_pkt_count_before_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${get_arp_drop_pkt_before} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${ARP}.*${TABLE} - ${arping_cli} = BuiltIn.Set Variable sudo arping -I eth0 -c ${PACKET_COUNT} \ ${RANDOM_IP} - OpenStackOperations.Execute Command on VM Instance ${REQ_NETWORKS}[1] ${VM_IP_DPN1}[1] ${arping_cli} - ${get_pkt_count_after_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${get_arp_drop_pkt_after} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${ARP}.*${TABLE} - ${pkt_diff} = BuiltIn.Evaluate int(${get_pkt_count_after_arp})-int(${get_pkt_count_before_arp}) - ${pkt_diff_arp_drop} = BuiltIn.Evaluate int(${get_arp_drop_pkt_after})-int(${get_arp_drop_pkt_before}) - BuiltIn.Should Be Equal As Numbers ${pkt_diff} ${PACKET_COUNT_ZERO} - BuiltIn.Should Be Equal As Numbers ${pkt_diff_arp_drop} ${PACKET_COUNT} - -Verify ARP request generated from Spoofed IP and spoofed MAC for the VM - [Documentation] Verifying ARP resquest generated for Spoofed MAC with Spoofed IP and Validate the ARP packet drop at the VM Egress Table - ${get_pkt_count_before_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${get_arp_drop_pkt_before} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${ARP}.*${TABLE} - ${arping_cli} = BuiltIn.Set Variable sudo arping -s ${SPOOF_IP} -c ${PACKET_COUNT} \ ${RANDOM_IP} - OpenStackOperations.Execute Command on VM Instance ${REQ_NETWORKS}[1] ${VM_IP_DPN1}[1] ${arping_cli} - ${get_pkt_count_after_arp} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${VM1_METADATA}.*${ARP_SHA} - ${get_arp_drop_pkt_after} = OvsManager.Get Packet Count From Table - ... ${OS_CMP1_IP} - ... ${INTEGRATION_BRIDGE} - ... table=${DEFAULT_FLOW_TABLES}[15] - ... | grep ${ARP}.*${TABLE} - ${pkt_diff} = BuiltIn.Evaluate int(${get_pkt_count_after_arp})-int(${get_pkt_count_before_arp}) - ${pkt_diff_arp_drop} = BuiltIn.Evaluate int(${get_arp_drop_pkt_after})-int(${get_arp_drop_pkt_before}) - BuiltIn.Should Be Equal As Numbers ${pkt_diff} ${PACKET_COUNT_ZERO} - BuiltIn.Should Be Equal As Numbers ${pkt_diff_arp_drop} ${PACKET_COUNT} - - -*** Keywords *** -Start Suite - [Documentation] Suite setup for ACL_Enhancement feature - OpenStackOperations.OpenStack Suite Setup - Create Setup - -Create Setup - [Documentation] Create Two Networks, Two Subnets, Four Ports - Create Multiple Networks @{REQ_NETWORKS} - Create Multiple Subnets ${REQ_NETWORKS} ${REQ_SUBNETS} ${REQ_SUBNET_CIDR} - OpenStackOperations.Neutron Security Group Create ${SECURITY_GROUP}[0] - OpenStackOperations.Delete All Security Group Rules ${SECURITY_GROUP}[0] - OpenStackOperations.Create Port ${REQ_NETWORKS}[0] ${PORTS}[0] sg=${SECURITY_GROUP}[0] - OpenStackOperations.Create Port ${REQ_NETWORKS}[1] ${PORTS}[1] sg=${SECURITY_GROUP}[0] - OpenStackOperations.Create Port ${REQ_NETWORKS}[0] ${PORTS}[2] sg=${SECURITY_GROUP}[0] - OpenStackOperations.Create Port ${REQ_NETWORKS}[1] ${PORTS}[3] sg=${SECURITY_GROUP}[0] - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP}[0] - ... direction=ingress - ... protocol=icmp - ... remote_ip=0.0.0.0/0 - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP}[0] - ... direction=egress - ... protocol=icmp - ... remote_ip=0.0.0.0/0 - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP}[0] - ... direction=ingress - ... port_range_max=65535 - ... port_range_min=1 - ... protocol=tcp - ... remote-ip=0.0.0.0/0 - OpenStackOperations.Neutron Security Group Rule Create - ... ${SECURITY_GROUP}[0] - ... direction=egress - ... port_range_max=65535 - ... port_range_min=1 - ... protocol=tcp - ... remote-ip=0.0.0.0/0 - OpenStackOperations.Create Vm Instance With Ports On Compute Node - ... ${PORTS}[0] - ... ${PORTS}[1] - ... ${VM_NAMES}[0] - ... ${OS_CMP1_HOSTNAME} - ... flavor=m1.tiny - ... sg=${SECURITY_GROUP}[0] - OpenStackOperations.Create Vm Instance With Ports On Compute Node - ... ${PORTS}[2] - ... ${PORTS}[3] - ... ${VM_NAMES}[1] - ... ${OS_CMP2_HOSTNAME} - ... flavor=m1.tiny - ... sg=${SECURITY_GROUP}[0] - FOR ${vm} IN @{VM_NAMES} - OpenStackOperations.Poll VM Is ACTIVE ${vm} - END - ${VM_IP_DPN1} = BuiltIn.Wait Until Keyword Succeeds - ... 300 sec - ... 15 sec - ... OpenStackOperations.Get All VM IP Addresses - ... ${OS_CMP1_CONN_ID} - ... ${VM_NAMES}[0] - ${VM_IP_DPN2} = BuiltIn.Wait Until Keyword Succeeds - ... 300 sec - ... 15 sec - ... OpenStackOperations.Get All VM IP Addresses - ... ${OS_CMP2_CONN_ID} - ... ${VM_NAMES}[1] - BuiltIn.Set Suite Variable @{VM_IP_DPN1} - BuiltIn.Set Suite Variable @{VM_IP_DPN2} - FOR ${ip} IN @{VM_IP_DPN1} - BuiltIn.Should Not Contain ${ip} None - END - FOR ${ip} IN @{VM_IP_DPN2} - BuiltIn.Should Not Contain ${ip} None - END - ${VM1_PORT} = Get VMs OVS Port Number ${OS_CMP1_IP} ${PORTS}[0] - ${VM1_METADATA} = OVSDB.Get Port Metadata ${OS_CMP1_IP} ${VM1_PORT} - BuiltIn.Set Suite Variable ${VM1_METADATA} diff --git a/csit/suites/openstack/securitygroup/neutron_security_group.robot b/csit/suites/openstack/securitygroup/neutron_security_group.robot deleted file mode 100644 index 9fe26cfe0a..0000000000 --- a/csit/suites/openstack/securitygroup/neutron_security_group.robot +++ /dev/null @@ -1,146 +0,0 @@ -*** Settings *** -Documentation Test Suite for Neutron Security Group - -Library SSHLibrary -Library OperatingSystem -Library RequestsLibrary -Library json -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../variables/Variables.robot - -Suite Setup OpenStackOperations.OpenStack Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -${RESP_CODE_200} 200 -${DESCRIPTION} --description "new security group 1" -${VERIFY_DESCRIPTION} new security group 1 -${VERIFY_NAME} SSH_UPDATED -${NAME_UPDATE} --name SSH_UPDATED -${SECURITY_FALSE} --port-security-enabled false -${SECURITY_TRUE} --port-security-enabled true -${SEC_GROUP_API} /restconf/config/neutron:neutron/security-groups/ -${SEC_RULE_API} /restconf/config/neutron:neutron/security-rules/ -${ADD_ARG_SSH} --direction ingress --ethertype IPv4 --port_range_max 22 --port_range_min 22 --protocol tcp -@{NETWORKS} sgs_net_1 -@{SUBNETS} sgs_sub_1 -@{IP_SUBNETS} 61.2.1.0/24 -@{PORTS} sgs_port_1 sgs_port_2 -${SECURITY_GROUPS} --security-group -@{SGS} sgs_sg_1 sgs_sg_2 sgs_sg_3 sgs_sg_4 -${SG_UPDATED} SSH_UPDATED -${ADD_ARG_SSH5} --ingress --ethertype IPv4 --dst-port 25:20 --protocol tcp -@{ADD_PARAMS} ingression IPv4 20 25 tcp -${ADD_ARG_SSH6} --ingress --ethertype IPv4 --dst-port -1:25 --protocol tcp -${ADD_ARG_SSH7} --ingress --ethertype IPv4 --dst-port 20:-1 --protocol tcp -${PORT_RANGE_ERROR} argument --dst-port: Invalid range, 25 is not less than 20 -${INVALID_MIN_PORT} argument --dst-port: expected one argument -${INVALID_MAX_PORT} argument --dst-port: Invalid range, 20 is not less than -1 - - -*** Test Cases *** -TC01_Update Security Group description and Name - [Documentation] This test case validates the security group creation with optional parameter description, Update Security Group description and name - [Tags] regression - ${sg_id} = BuiltIn.Run Keyword Create Security Group and Validate ${SGS[0]} - Create Security Rule and Validate - ... ${SGS[0]} - ... direction=${ADD_PARAMS[0]} - ... ethertype=${ADD_PARAMS[1]} - ... port_range_max=${ADD_PARAMS[3]} - ... port_range_min=${ADD_PARAMS[2]} - ... protocol=${ADD_PARAMS[4]} - Neutron Setup Creation - ... ${NETWORKS[0]} - ... ${SUBNETS[0]} - ... ${IP_SUBNETS[0]} - ... ${PORTS[0]} - ... ${PORTS[1]} - ... ${sg_id} - Security group verification on Neutron port ${PORTS[0]} ${sg_id} - Security group verification on Neutron port ${PORTS[1]} ${sg_id} - Update Security Group Description and Verification ${sg_id} ${DESCRIPTION} ${VERIFY_DESCRIPTION} - Update Security Group Name and Verification ${sg_id} ${NAME_UPDATE} ${VERIFY_NAME} - -TC02_Create Security Rule with port_range_min > port_range_max - [Documentation] Create Security Rule with port_range_min greater than port_range_max - [Tags] regression - Create Security Group and Validate ${SGS[1]} - Neutron Rule Creation With Invalid Parameters ${SGS[1]} ${ADD_ARG_SSH5} ${PORT_RANGE_ERROR} - -TC03_Create Security Rule with port_range_min = -1 - [Documentation] Create Security Rule with port_range_min = -1 - [Tags] regression - Create Security Group and Validate ${SGS[2]} - Neutron Rule Creation With Invalid Parameters ${SGS[2]} ${ADD_ARG_SSH6} ${INVALID_MIN_PORT} - -TC04_Create Security Rule with port_range_max = -1 - [Documentation] Create Security Rule with port_range_max = -1 - [Tags] regression - Create Security Group and Validate ${SGS[3]} - Neutron Rule Creation With Invalid Parameters ${SGS[3]} ${ADD_ARG_SSH7} ${INVALID_MAX_PORT} - - -*** Keywords *** -Create Security Group and Validate - [Arguments] ${sg_ssh} - ${output} ${sg_id} = OpenStackOperations.Neutron Security Group Create ${sg_ssh} - ${sec_groups} = BuiltIn.Create List ${sg_ssh} - BuiltIn.Wait Until Keyword Succeeds - ... 10s - ... 2s - ... Utils.Check For Elements At URI - ... ${SEC_GROUP_API} - ... ${sec_groups} - RETURN ${sg_id} - -Create Security Rule and Validate - [Arguments] ${sg_ssh} &{Kwargs} - ${output} ${rule_id} = OpenStackOperations.Neutron Security Group Rule Create ${sg_ssh} - ${rule_ids} = BuiltIn.Create List ${rule_id} - BuiltIn.Wait Until Keyword Succeeds - ... 10s - ... 2s - ... Utils.Check For Elements At URI - ... ${SEC_RULE_API} - ... ${rule_ids} - -Neutron Setup Creation - [Arguments] ${network} ${subnet} ${ip_subnet} ${port1} ${port2} ${sg_id} - ${net_id} = OpenStackOperations.Create Network ${network} - ${subnet_id} = OpenStackOperations.Create SubNet ${network} ${subnet} ${ip_subnet} - ${port_id} = OpenStackOperations.Create Port ${network} ${port1} ${sg_id} - ${port_id} = OpenStackOperations.Create Port ${network} ${port2} ${sg_id} - -Security group verification on Neutron port - [Arguments] ${port} ${sg_id} - ${port_show} = OpenStackOperations.Neutron Port Show ${port} - BuiltIn.Should Contain ${port_show} ${sg_id} - -Update Security Group Description and Verification - [Arguments] ${sg_id} ${description} ${verify_description} - OpenStackOperations.Neutron Security Group Update ${sg_id} ${description} - ${output} = OpenStackOperations.Neutron Security Group Show ${sg_id} - BuiltIn.Should Contain ${output} ${verify_description} - -Update Security Group Name and Verification - [Arguments] ${sg_id} ${name_update} ${verify_name} - OpenStackOperations.Neutron Security Group Update ${sg_id} ${name_update} - ${output} = OpenStackOperations.Neutron Security Group Show ${sg_id} - Should Contain ${output} ${verify_name} - ${resp} = RequestsLibrary.Get Request session ${SEC_GROUP_API} - BuiltIn.Log ${resp.text} - BuiltIn.Should Be Equal As Strings ${resp.status_code} ${RESP_CODE_200} - BuiltIn.Should Contain ${resp.text} ${verify_name} - -Neutron Rule Creation With Invalid Parameters - [Arguments] ${sg_name} ${additional_args} ${expected_error} - ${rc} ${output} = Run And Return Rc And Output - ... openstack security group rule create ${additional_args} ${sg_name} - BuiltIn.Log ${output} - BuiltIn.Should Contain ${output} ${expected_error} diff --git a/csit/suites/openstack/securitygroup/security_group_l3bcast.robot b/csit/suites/openstack/securitygroup/security_group_l3bcast.robot deleted file mode 100644 index 55f5a48bf3..0000000000 --- a/csit/suites/openstack/securitygroup/security_group_l3bcast.robot +++ /dev/null @@ -1,303 +0,0 @@ -*** Settings *** -Documentation Test Suite for Network and Subnet Broadcast with security group - -Library String -Library RequestsLibrary -Library SSHLibrary -Library Collections -Library json -Library OperatingSystem -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../libraries/OvsManager.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/Utils.robot -Resource ../../../variables/Variables.robot - -Suite Setup Start Suite -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs - - -*** Variables *** -@{SECURITY_GROUP} sgbcast1 sgbcast2 -@{NETWORKS} sgbcast_net_1 sgbcast_net_2 -@{SUBNETS} sgbcast_sub_1 sgbcast_sub_2 -@{SUBNET_CIDRS} 55.0.0.0/24 56.0.0.0/24 -${ROUTER} sgbcast_router -@{NET_1_PORTS} sgbcast_net_1_port_1 sgbcast_net_1_port_2 sgbcast_net_1_port_3 -@{NET_2_PORTS} sgbcast_net_2_port_1 sgbcast_net_2_port_2 -@{NET_1_VMS} sgbcast_net_1_vm_1 sgbcast_net_1_vm_2 sgbcast_net_1_vm_3 -@{NET_2_VMS} sgbcast_net_2_vm_1 sgbcast_net_2_vm_2 -${DUMP_FLOW} sudo ovs-ofctl dump-flows br-int -OOpenflow13 -${DUMP_PORT_DESC} sudo ovs-ofctl dump-ports-desc br-int -OOpenflow13 -${PACKET_COUNT} 5 -${BCAST_IP} 255.255.255.255 -${SUBNET1_BCAST_IP} 55.0.0.255 -${SUBNET2_BCAST_IP} 56.0.0.255 -${ENABLE_BCAST} echo 0 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -${EGRESS_ACL_TABLE} 240 - - -*** Test Cases *** -Verify Network Broadcast traffic between the VMs hosted in Single Network - [Documentation] This TC is to verify Network Broadcast traffic between the VMs hosted in Same Network on same/different compute node - ${pkt_check} = BuiltIn.Set Variable If "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp" 10 5 - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... Verify L3Broadcast With Antispoofing Table - ... ${OS_CMP1_IP} - ... ${EGRESS_ACL_TABLE} - ... ${BCAST_IP} - ... ${VM_IPS}[0] - ... same - ... pingsuccess - ... pkt_check=${pkt_check} - -Verify Network Broadcast traffic between the VMs hosted in Multi Network - [Documentation] This TC is to verify Network Broadcast traffic between the VMs hosted in Different Network on same/different compute node. - ${pkt_check} = BuiltIn.Set Variable If "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp" 5 0 - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... Verify L3Broadcast With Antispoofing Table - ... ${OS_CMP1_IP} - ... ${EGRESS_ACL_TABLE} - ... ${BCAST_IP} - ... ${VM_IPS}[3] - ... different - ... pingsuccess - ... pkt_check=${pkt_check} - -Verify Subnet Broadcast traffic between the VMs hosted on same compute node in Single Network - [Documentation] Verify L3-Subnet Broadcast traffic between the VMs hosted on same compute node in Single Network - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... Verify L3Broadcast With Antispoofing Table - ... ${OS_CMP1_IP} - ... ${EGRESS_ACL_TABLE} - ... ${SUBNET1_BCAST_IP} - ... ${VM_IPS}[0] - ... same - ... pingsuccess - ... ${VM2_SUBMETA} - ... pkt_check=5 - ... additional_args=| grep ${VM2_SUBMETA} - -Verify Subnet Broadcast traffic between the VMs hosted on Different compute node in Single Network - [Documentation] Verify L3-Subnet Broadcast traffic between the VMs hosted on same compute node in Single Network - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... Verify L3Broadcast With Antispoofing Table - ... ${OS_CMP2_IP} - ... ${EGRESS_ACL_TABLE} - ... ${SUBNET1_BCAST_IP} - ... ${VM_IPS}[0] - ... same - ... pingsuccess - ... ${VM3_SUBMETA} - ... pkt_check=5 - ... additional_args=| grep ${VM3_SUBMETA} - -Verify Subnet Broadcast traffic between the VMs hosted on same compute node in Multi Network - [Documentation] Verify L3-Subnet Broadcast traffic between the VMs hosted on same compute node in Multi Network - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... Verify L3Broadcast With Antispoofing Table - ... ${OS_CMP1_IP} - ... ${EGRESS_ACL_TABLE} - ... ${SUBNET2_BCAST_IP} - ... ${VM_IPS}[0] - ... different - ... nosuccess - ... ${VM4_SUBMETA} - ... pkt_check=0 - ... additional_args=| grep ${VM4_SUBMETA} - -Verify Subnet Broadcast traffic between the VMs hosted on Different compute node in Multi Network - [Documentation] Verify L3-Subnet Broadcast traffic between the VMs hosted on Different compute node in Multi Network - Wait Until Keyword Succeeds - ... 30s - ... 5s - ... Verify L3Broadcast With Antispoofing Table - ... ${OS_CMP2_IP} - ... ${EGRESS_ACL_TABLE} - ... ${SUBNET2_BCAST_IP} - ... ${VM_IPS}[0] - ... different - ... nosuccess - ... ${VM5_SUBMETA} - ... pkt_check=0 - ... additional_args=| grep ${VM5_SUBMETA} - - -*** Keywords *** -Start Suite - [Documentation] Test Suite for Network and Subnet Broadcast with security group - OpenStackOperations.OpenStack Suite Setup - Create Setup - OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS} - OpenStackOperations.Get Suite Debugs - -Create Setup - FOR ${network} IN @{NETWORKS} - OpenStackOperations.Create Network ${network} - END - FOR ${i} IN RANGE len(${NETWORKS}) - OpenStackOperations.Create SubNet ${NETWORKS}[${i}] ${SUBNETS}[${i}] ${SUBNET_CIDRS}[${i}] - END - OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}[0] - OpenStackOperations.Create Router ${ROUTER} - FOR ${interface} IN @{SUBNETS} - OpenStackOperations.Add Router Interface ${ROUTER} ${interface} - END - FOR ${port_net1} IN @{NET_1_PORTS} - OpenStackOperations.Create Port ${NETWORKS}[0] ${port_net1} sg=${SECURITY_GROUP}[0] - END - FOR ${port_net2} IN @{NET_2_PORTS} - OpenStackOperations.Create Port ${NETWORKS}[1] ${port_net2} sg=${SECURITY_GROUP}[0] - END - ${ports} = BuiltIn.Create List - ... ${NET_1_PORTS}[0] - ... ${NET_1_PORTS}[1] - ... ${NET_1_PORTS}[2] - ... ${NET_2_PORTS}[0] - ... ${NET_2_PORTS}[1] - ${vms} = BuiltIn.Create List - ... ${NET_1_VMS}[0] - ... ${NET_1_VMS}[1] - ... ${NET_1_VMS}[2] - ... ${NET_2_VMS}[0] - ... ${NET_2_VMS}[1] - @{nodes} = BuiltIn.Create List - ... ${OS_CMP1_HOSTNAME} - ... ${OS_CMP1_HOSTNAME} - ... ${OS_CMP2_HOSTNAME} - ... ${OS_CMP1_HOSTNAME} - ... ${OS_CMP2_HOSTNAME} - FOR ${port} ${vm} ${node} IN ZIP ${ports} ${vms} - ... ${nodes} - OpenStackOperations.Create Vm Instance With Port On Compute Node - ... ${port} - ... ${vm} - ... ${node} - ... sg=${SECURITY_GROUP}[0] - END - @{vms} = Collections.Combine Lists ${NET_1_VMS} ${NET_2_VMS} - @{VM_IPS} = OpenStackOperations.Get VM IPs @{vms} - BuiltIn.Should Not Contain ${VM_IPS} None - BuiltIn.Set Suite Variable @{VM_IPS} - OpenStackOperations.Execute Command on VM Instance ${NETWORKS[0]} ${VM_IPS}[0] ${ENABLE_BCAST} - OpenStackOperations.Execute Command on VM Instance ${NETWORKS[1]} ${VM_IPS}[3] ${ENABLE_BCAST} - ${vm1_in_port} ${vm1_meta} = BuiltIn.Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Get VMs Metadata and In Port - ... ${NET_1_PORTS}[0] - ... ${OS_CMP1_IP} - ${vm2_in_port} ${vm2_meta} = BuiltIn.Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Get VMs Metadata and In Port - ... ${NET_1_PORTS}[1] - ... ${OS_CMP1_IP} - ${vm3_in_port} ${vm3_meta} = BuiltIn.Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Get VMs Metadata and In Port - ... ${NET_1_PORTS}[2] - ... ${OS_CMP2_IP} - ${vm4_in_port} ${vm4_meta} = BuiltIn.Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Get VMs Metadata and In Port - ... ${NET_2_PORTS}[0] - ... ${OS_CMP1_IP} - ${vm5_in_port} ${vm5_meta} = BuiltIn.Wait Until Keyword Succeeds - ... 60s - ... 10s - ... Get VMs Metadata and In Port - ... ${NET_2_PORTS}[1] - ... ${OS_CMP2_IP} - ${VM1_SUBMETA} = Get Submetadata ${vm1_meta} - ${VM2_SUBMETA} = Get Submetadata ${vm2_meta} - ${VM3_SUBMETA} = Get Submetadata ${vm3_meta} - ${VM4_SUBMETA} = Get Submetadata ${vm4_meta} - ${VM5_SUBMETA} = Get Submetadata ${vm5_meta} - BuiltIn.Set Suite Variable ${VM1_SUBMETA} - BuiltIn.Set Suite Variable ${VM2_SUBMETA} - BuiltIn.Set Suite Variable ${VM3_SUBMETA} - BuiltIn.Set Suite Variable ${VM4_SUBMETA} - BuiltIn.Set Suite Variable ${VM5_SUBMETA} - -Get VMs Metadata and In Port - [Documentation] This keyword is to get the VM metadata and the in_port Id of the VM - [Arguments] ${portname} ${OS_COMPUTE_IP} - ${subport} = OpenStackOperations.Get Sub Port Id ${portname} - ${get_vm_in_port} = Utils.Run Command On Remote System And Log - ... ${OS_COMPUTE_IP} - ... ${DUMP_PORT_DESC} | grep ${subport} | awk '{print$1}' - ${vms_in_port} = BuiltIn.Should Match Regexp ${get_vm_in_port} [0-9]+ - ${grep_metadata} = Utils.Run Command On Remote System And Log - ... ${OS_COMPUTE_IP} - ... ${DUMP_FLOW} | grep table=${VLAN_INTERFACE_INGRESS_TABLE} | grep in_port=${vms_in_port} | awk '{print$7}' - @{metadata} = String.Split string ${grep_metadata} , - ${get_write_metadata} = Collections.get from list ${metadata} 0 - @{complete_metadata} = String.Split string ${get_write_metadata} : - ${extract_metadata} = Collections.get from list ${complete_metadata} 1 - @{split_metadata} = String.Split string ${extract_metadata} / - ${vm_metadata} = Collections.Get From List ${split_metadata} 0 - RETURN ${vms_in_port} ${vm_metadata} - -Get Submetadata - [Documentation] Get the submetadata of the VM - [Arguments] ${vm_metadata} - ${cmd1} = Utils.Run Command On Remote System And Log - ... ${OS_CMP1_IP} - ... ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata: - ${output1} = String.Get Regexp Matches ${cmd1} reg6=(\\w+) 1 - ${cmd2} = Utils.Run Command On Remote System And Log - ... ${OS_CMP2_IP} - ... ${DUMP_FLOW} | grep ${EGRESS_LPORT_DISPATCHER_TABLE} | grep write_metadata: - ${output2} = String.Get Regexp Matches ${cmd2} reg6=(\\w+) 1 - ${metalist} = Collections.Combine Lists ${output1} ${output2} - FOR ${meta} IN @{metalist} - ${metadata_check_status} = Run Keyword And Return Status should contain ${vm_metadata} ${meta} - IF ${metadata_check_status} == True RETURN ${meta} - END - -Verify L3Broadcast With Antispoofing Table - [Documentation] Verify the l3 broadcast requests are hitting to antispoofing table in same subnet - [Arguments] ${OS_COMPUTE_IP} ${EGRESS_ACL_TABLE} ${BCAST_IP} ${vm_ip} ${subnet_var} ${ping_response}='pingsuccess' - ... ${vm_submeta}='' ${pkt_check}=0 ${additional_args}=${EMPTY} - ${get_pkt_count_before_bcast} = OvsManager.Get Packet Count In Table For IP - ... ${OS_COMPUTE_IP} - ... ${EGRESS_ACL_TABLE} - ... ${BCAST_IP} - ... additional_args=| grep ${vm_submeta} - ${output} = OpenStackOperations.Execute Command on VM Instance - ... ${NETWORKS}[0] - ... ${vm_ip} - ... ping -c ${PACKET_COUNT} ${BCAST_IP} - IF '${ping_response}'=='pingsuccess' - BuiltIn.Should Contain ${output} ${PING_REGEXP} - ELSE - BuiltIn.Should Contain ${output} ${NO_PING_REGEXP} - END - ${bcast_egress} = Utils.Run Command On Remote System And Log - ... ${OS_COMPUTE_IP} - ... ${DUMP_FLOW} | grep table=${EGRESS_ACL_TABLE} | grep ${BCAST_IP} ${additional_args} - ${get_pkt_count_after_bcast} = OvsManager.Get Packet Count In Table For IP - ... ${OS_COMPUTE_IP} - ... ${EGRESS_ACL_TABLE} - ... ${BCAST_IP} - ... additional_args=| grep ${vm_submeta} - ${pkt_diff} = Evaluate int(${get_pkt_count_after_bcast})-int(${get_pkt_count_before_bcast}) - BuiltIn.Should Be Equal As Numbers ${pkt_diff} ${pkt_check} diff --git a/csit/suites/openstack/tempest/tempest.robot b/csit/suites/openstack/tempest/tempest.robot deleted file mode 100644 index ac2c77d70d..0000000000 --- a/csit/suites/openstack/tempest/tempest.robot +++ /dev/null @@ -1,73 +0,0 @@ -*** Settings *** -Documentation Test suite for running tempest tests. It is assumed that the test environment -... is already deployed and ready. - -Library OperatingSystem -Library SSHLibrary -Resource ../../../libraries/DevstackUtils.robot -Resource ../../../libraries/OpenStackOperations.robot -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/SSHKeywords.robot -Resource ../../../libraries/Tempest.robot -Resource ../../../variables/Variables.robot - -Suite Setup Tempest.Suite Setup -Suite Teardown OpenStackOperations.OpenStack Suite Teardown -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown OpenStackOperations.Get Test Teardown Debugs -Test Template Tempest.Run Tempest Tests - - -*** Test Cases *** -tempest.api.network - ${TEST_NAME} debug=False timeout=1200s -tempest.scenario.test_aggregates_basic_ops.TestAggregatesBasicOps.test_aggregate_basic_ops - ${TEST_NAME} debug=True -tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_pause_unpause - ${TEST_NAME} debug=True -tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_reboot - ${TEST_NAME} debug=True -tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_rebuild - ${TEST_NAME} debug=True -tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_stop_start - ${TEST_NAME} debug=True -tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_suspend_resume - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_connectivity_between_vms_on_different_networks - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_hotplug_nic - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_mtu_sized_frames - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_port_security_macspoofing_port - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_preserve_preexisting_port - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_router_rescheduling - ${TEST_NAME} debug=True -tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_subnet_details - ${TEST_NAME} debug=True -tempest.scenario.test_network_v6.TestGettingAddress.test_dhcp6_stateless_from_os - ${TEST_NAME} debug=True -tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_dhcp6_stateless_from_os - ${TEST_NAME} debug=True -tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_slaac_from_os - ${TEST_NAME} debug=True -tempest.scenario.test_network_v6.TestGettingAddress.test_slaac_from_os - ${TEST_NAME} debug=True -tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_boot_into_disabled_port_security_network_without_secgroup - ${TEST_NAME} debug=True -tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_cross_tenant_traffic - ${TEST_NAME} debug=True -tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_in_tenant_traffic - ${TEST_NAME} debug=True -tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_multiple_security_groups - ${TEST_NAME} debug=True -tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_port_security_disable_security_group - ${TEST_NAME} debug=True -tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_port_update_new_security_group - ${TEST_NAME} debug=True -tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops - ${TEST_NAME} debug=True diff --git a/csit/testplans/vtn-1node-openstack.txt b/csit/testplans/vtn-1node-openstack.txt deleted file mode 100644 index 9e7029a889..0000000000 --- a/csit/testplans/vtn-1node-openstack.txt +++ /dev/null @@ -1 +0,0 @@ -integration/test/csit/suites/openstack/connectivity/l2.robot -- 2.36.6