From 2fe60b8adeac5cceb6ab9c12c5159acb2216f111 Mon Sep 17 00:00:00 2001 From: "Karthik.S" Date: Mon, 27 Mar 2017 21:55:11 +0530 Subject: [PATCH] Fix for VTN and Legacy Netvirt CSIT Failure This patch prevents creating vlan provider segment when executing the tests for Legacy Netvirt and VTN. It is supported by the other features that enable Openstack integration. Change-Id: I40a5d2d750dce7ae2f3e89ab42388809fe2969ca Signed-off-by: Karthik.S Signed-off-by: Jamo Luhrsen --- csit/suites/openstack/connectivity/01_l2_tests.robot | 10 +++++++++- csit/suites/openstack/connectivity/02_l3_tests.robot | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/csit/suites/openstack/connectivity/01_l2_tests.robot b/csit/suites/openstack/connectivity/01_l2_tests.robot index ebb68d95f0..9cb70936f4 100644 --- a/csit/suites/openstack/connectivity/01_l2_tests.robot +++ b/csit/suites/openstack/connectivity/01_l2_tests.robot @@ -12,6 +12,7 @@ Resource ../../../libraries/DevstackUtils.robot Resource ../../../libraries/OpenStackOperations.robot Resource ../../../libraries/SetupUtils.robot Resource ../../../libraries/Utils.robot +Resource ../../../libraries/KarafKeywords.robot *** Variables *** @{NETWORKS_NAME} l2_network_1 l2_network_2 @@ -20,11 +21,18 @@ Resource ../../../libraries/Utils.robot @{NET_2_VM_INSTANCES} MyFirstInstance_2 MySecondInstance_2 MyThirdInstance_2 @{SUBNETS_RANGE} 30.0.0.0/24 40.0.0.0/24 ${network1_vlan_id} 1235 +@{legacy_feature_list} odl-vtn-manager-neutron odl-ovsdb-openstack *** Test Cases *** Create VLAN Network (l2_network_1) [Documentation] Create Network with neutron request. - Create Network @{NETWORKS_NAME}[0] --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id} + # in the case that the controller under test is using legacy netvirt features, vlan segmentation is not supported, + # and we cannot create a vlan network. If those features are installed we will instead stick with vxlan. + : FOR ${feature_name} IN @{legacy_feature_list} + \ ${feature_check_status}= Run Keyword And Return Status Verify Feature Is Installed ${feature_name} + \ Exit For Loop If '${feature_check_status}' == 'True' + Run Keyword If '${feature_check_status}' == 'True' Create Network @{NETWORKS_NAME}[0] + ... ELSE Create Network @{NETWORKS_NAME}[0] --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id} Create VXLAN Network (l2_network_2) [Documentation] Create Network with neutron request. diff --git a/csit/suites/openstack/connectivity/02_l3_tests.robot b/csit/suites/openstack/connectivity/02_l3_tests.robot index 37f24a9ddd..894a4505e1 100644 --- a/csit/suites/openstack/connectivity/02_l3_tests.robot +++ b/csit/suites/openstack/connectivity/02_l3_tests.robot @@ -21,11 +21,18 @@ Resource ../../../libraries/Utils.robot @{NET_3_VM_INSTANCES} l3_instance_net_3_1 l3_instance_net_3_2 l3_instance_net_3_3 @{SUBNETS_RANGE} 50.0.0.0/24 60.0.0.0/24 70.0.0.0/24 ${network1_vlan_id} 1236 +@{legacy_feature_list} odl-vtn-manager-neutron odl-ovsdb-openstack *** Test Cases *** Create VLAN Network (network_1) [Documentation] Create Network with neutron request. - Create Network @{NETWORKS_NAME}[0] --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id} + # in the case that the controller under test is using legacy netvirt features, vlan segmentation is not supported, + # and we cannot create a vlan network. If those features are installed we will instead stick with vxlan. + : FOR ${feature_name} IN @{legacy_feature_list} + \ ${feature_check_status}= Run Keyword And Return Status Verify Feature Is Installed ${feature_name} + \ Exit For Loop If '${feature_check_status}' == 'True' + Run Keyword If '${feature_check_status}' == 'True' Create Network @{NETWORKS_NAME}[0] + ... ELSE Create Network @{NETWORKS_NAME}[0] --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id} Create VXLAN Network (network_2) [Documentation] Create Network with neutron request. -- 2.36.6