Fix for VTN and Legacy Netvirt CSIT Failure 93/53893/12
authorKarthik.S <siva-karthik@hcl.com>
Mon, 27 Mar 2017 16:25:11 +0000 (21:55 +0530)
committerLuis Gomez <ecelgp@gmail.com>
Wed, 29 Mar 2017 17:18:29 +0000 (17:18 +0000)
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 <siva-karthik@hcl.com>
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/suites/openstack/connectivity/01_l2_tests.robot
csit/suites/openstack/connectivity/02_l3_tests.robot

index ebb68d95f00441e2b1022b7892ddf7848f36ccbb..9cb70936f4926ba7aa79f3840189ec9cc4f6e16c 100644 (file)
@@ -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.
index 37f24a9dddd63ca8984d2422a8cc8f4cb9a6d637..894a4505e1d5a93de25ad1f2023fa918744986a0 100644 (file)
@@ -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.