Add csit runs with vlan provider 44/49844/61
authorRevital Aronis <revital.aronis@hpe.com>
Wed, 28 Dec 2016 15:25:06 +0000 (17:25 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 20 Mar 2017 22:24:18 +0000 (22:24 +0000)
Change-Id: I25fa56f2043c1142cde211c8030584216dd5284a
Signed-off-by: Revital Aronis <revital.aronis@hpe.com>
csit/suites/openstack/connectivity/01_l2_tests.robot
csit/suites/openstack/connectivity/02_l3_tests.robot
csit/suites/openstack/connectivity/03_external_network_tests.robot
csit/suites/openstack/tempest/tempest.robot

index e7a07cf38fd05277b995248f2839dacc60c23a6b..a2104666df492aeee7c82ae562dbd8b1e148a0c1 100644 (file)
@@ -19,20 +19,24 @@ Resource          ../../../libraries/Utils.robot
 @{NET_1_VM_INSTANCES}    MyFirstInstance_1    MySecondInstance_1    MyThirdInstance_1
 @{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
 
 *** Test Cases ***
-Create Networks
+Create VLAN Network @{NETWORKS_NAME}[0]
     [Documentation]    Create Network with neutron request.
-    : FOR    ${NetworkElement}    IN    @{NETWORKS_NAME}
-    \    Create Network    ${NetworkElement}
+    Create Network    @{NETWORKS_NAME}[0]    --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id}
+
+Create VXLAN Network @{NETWORKS_NAME}[1]
+    [Documentation]    Create Network with neutron request.
+    Create Network    @{NETWORKS_NAME}[1]
 
 Create Subnets For l2_network_1
     [Documentation]    Create Sub Nets for the Networks with neutron request.
-    Create SubNet    l2_network_1    l2_subnet_1    @{SUBNETS_RANGE}[0]
+    Create SubNet    @{NETWORKS_NAME}[0]    @{SUBNETS_NAME}[0]    @{SUBNETS_RANGE}[0]
 
 Create Subnets For l2_network_2
     [Documentation]    Create Sub Nets for the Networks with neutron request.
-    Create SubNet    l2_network_2    l2_subnet_2    @{SUBNETS_RANGE}[1]
+    Create SubNet    @{NETWORKS_NAME}[1]    @{SUBNETS_NAME}[1]    @{SUBNETS_RANGE}[1]
 
 Add Ssh Allow Rule
     [Documentation]    Allow all TCP/UDP/ICMP packets for this suite
index c347fc3e25c508d32c9236cfc6ae63540f371090..c84d5c5dd46f26c631f5807afc03ec6eb66b75b3 100644 (file)
@@ -14,25 +14,38 @@ Resource          ../../../libraries/SetupUtils.robot
 Resource          ../../../libraries/Utils.robot
 
 *** Variables ***
-@{NETWORKS_NAME}    network_1    network_2
-@{SUBNETS_NAME}    subnet_1    subnet_2
+@{NETWORKS_NAME}    network_1    network_2    network_3
+@{SUBNETS_NAME}    subnet_1    subnet_2    subnet_3
 @{NET_1_VM_INSTANCES}    l3_instance_net_1_1    l3_instance_net_1_2    l3_instance_net_1_3
 @{NET_2_VM_INSTANCES}    l3_instance_net_2_1    l3_instance_net_2_2    l3_instance_net_2_3
-@{SUBNETS_RANGE}    50.0.0.0/24    60.0.0.0/24
+@{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
 
 *** Test Cases ***
-Create Networks
+Create VLAN Network (network_1)
     [Documentation]    Create Network with neutron request.
-    : FOR    ${NetworkElement}    IN    @{NETWORKS_NAME}
-    \    Create Network    ${NetworkElement}
+    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.
+    Create Network    @{NETWORKS_NAME}[1]
+
+Create VXLAN Network (network_3)
+    [Documentation]    Create Network with neutron request.
+    Create Network    @{NETWORKS_NAME}[2]
 
 Create Subnets For network_1
     [Documentation]    Create Sub Nets for the Networks with neutron request.
-    Create SubNet    network_1    subnet_1    @{SUBNETS_RANGE}[0]
+    Create SubNet    @{NETWORKS_NAME}[0]    @{SUBNETS_NAME}[0]    @{SUBNETS_RANGE}[0]
 
 Create Subnets For network_2
     [Documentation]    Create Sub Nets for the Networks with neutron request.
-    Create SubNet    network_2    subnet_2    @{SUBNETS_RANGE}[1]
+    Create SubNet    @{NETWORKS_NAME}[1]    @{SUBNETS_NAME}[1]    @{SUBNETS_RANGE}[1]
+
+Create Subnets For network_3
+    [Documentation]    Create Sub Nets for the Networks with neutron request.
+    Create SubNet    @{NETWORKS_NAME}[2]    @{SUBNETS_NAME}[2]    @{SUBNETS_RANGE}[2]
 
 Create Vm Instances For network_1
     [Documentation]    Create Four Vm instances using flavor and image names for a network.
@@ -42,32 +55,41 @@ Create Vm Instances For network_2
     [Documentation]    Create Four Vm instances using flavor and image names for a network.
     Create Vm Instances    network_2    ${NET_2_VM_INSTANCES}    sg=csit
 
+Create Vm Instances For network_3
+    [Documentation]    Create Four Vm instances using flavor and image names for a network.
+    Create Vm Instances    network_3    ${NET_3_VM_INSTANCES}    sg=csit
+
 Check Vm Instances Have Ip Address
     [Documentation]    Test case to verify that all created VMs are ready and have received their ip addresses.
     ...    We are polling first and longest on the last VM created assuming that if it's received it's address
     ...    already the other instances should have theirs already or at least shortly thereafter.
     # first, ensure all VMs are in ACTIVE state.    if not, we can just fail the test case and not waste time polling
     # for dhcp addresses
-    : FOR    ${vm}    IN    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
+    : FOR    ${vm}    IN    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}    @{NET_3_VM_INSTANCES}
     \    Wait Until Keyword Succeeds    15s    5s    Verify VM Is ACTIVE    ${vm}
     : FOR    ${index}    IN RANGE    1    5
-    \    ${NET1_L3_VM_IPS}    @{NET1_DHCP_IP}    Verify VMs Received DHCP Lease    @{NET_1_VM_INSTANCES}
-    \    ${NET2_L3_VM_IPS}    @{NET2_DHCP_IP}    Verify VMs Received DHCP Lease    @{NET_2_VM_INSTANCES}
-    \    ${VM_IPS}=    Collections.Combine Lists    ${NET1_L3_VM_IPS}    ${NET2_L3_VM_IPS}    ${NET1_DHCP_IP}    ${NET2_DHCP_IP}
+    \    ${NET1_L3_VM_IPS}    ${NET1_DHCP_IP}    Verify VMs Received DHCP Lease    @{NET_1_VM_INSTANCES}
+    \    ${NET2_L3_VM_IPS}    ${NET2_DHCP_IP}    Verify VMs Received DHCP Lease    @{NET_2_VM_INSTANCES}
+    \    ${NET3_L3_VM_IPS}    ${NET3_DHCP_IP}    Verify VMs Received DHCP Lease    @{NET_3_VM_INSTANCES}
+    \    ${VM_IPS}=    Collections.Combine Lists    ${NET1_L3_VM_IPS}    ${NET2_L3_VM_IPS}    ${NET3_L3_VM_IPS}    ${NET1_DHCP_IP}
+    \    ...    ${NET2_DHCP_IP}    ${NET3_DHCP_IP}
     \    ${status}    ${message}    Run Keyword And Ignore Error    List Should Not Contain Value    ${VM_IPS}    None
     \    Exit For Loop If    '${status}' == 'PASS'
     \    BuiltIn.Sleep    5s
-    : FOR    ${vm}    IN    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
+    : FOR    ${vm}    IN    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}    @{NET_3_VM_INSTANCES}
     \    Write Commands Until Prompt    nova console-log ${vm}    30s
     Set Suite Variable    ${NET1_L3_VM_IPS}
     Set Suite Variable    ${NET1_DHCP_IP}
     Set Suite Variable    ${NET2_L3_VM_IPS}
     Set Suite Variable    ${NET2_DHCP_IP}
+    Set Suite Variable    ${NET3_L3_VM_IPS}
+    Set Suite Variable    ${NET3_DHCP_IP}
     Should Not Contain    ${NET1_L3_VM_IPS}    None
     Should Not Contain    ${NET2_L3_VM_IPS}    None
     Should Not Contain    ${NET1_DHCP_IP}    None
     Should Not Contain    ${NET2_DHCP_IP}    None
-    [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
+    Should Not Contain    ${NET3_DHCP_IP}    None
+    [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}    @{NET_3_VM_INSTANCES}
     ...    AND    Get Test Teardown Debugs
 
 Create Routers
@@ -79,30 +101,42 @@ Add Interfaces To Router
     : FOR    ${interface}    IN    @{SUBNETS_NAME}
     \    Add Router Interface    router_1    ${interface}
 
-Ping Vm Instance1 In network_2 From network_1
+Ping Vm Instance1 In network_2 From network_1(vxlan to vlan)
     [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
     Ping Vm From DHCP Namespace    network_1    @{NET2_L3_VM_IPS}[0]
 
-Ping Vm Instance2 In network_2 From network_1
+Ping Vm Instance2 In network_2 From network_1(vxlan to vlan)
     [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
     Ping Vm From DHCP Namespace    network_1    @{NET2_L3_VM_IPS}[1]
 
-Ping Vm Instance3 In network_2 From network_1
+Ping Vm Instance3 In network_2 From network_1(vxlan to vlan)
     [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
     Ping Vm From DHCP Namespace    network_1    @{NET2_L3_VM_IPS}[2]
 
-Ping Vm Instance1 In network_1 From network_2
+Ping Vm Instance1 In network_1 From network_2(vlan to vxlan)
     [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
     Ping Vm From DHCP Namespace    network_2    @{NET1_L3_VM_IPS}[0]
 
-Ping Vm Instance2 In network_1 From network_2
+Ping Vm Instance2 In network_1 From network_2(vlan to vxlan)
     [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
     Ping Vm From DHCP Namespace    network_2    @{NET1_L3_VM_IPS}[1]
 
-Ping Vm Instance3 In network_1 From network_2
+Ping Vm Instance3 In network_1 From network_2(vlan to vxlan)
     [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
     Ping Vm From DHCP Namespace    network_2    @{NET1_L3_VM_IPS}[2]
 
+Ping Vm Instance1 In network_3 From network_2(vxlan to vxlan)
+    [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
+    Ping Vm From DHCP Namespace    network_2    @{NET3_L3_VM_IPS}[0]
+
+Ping Vm Instance2 In network_3 From network_2(vxlan to vxlan)
+    [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
+    Ping Vm From DHCP Namespace    network_2    @{NET3_L3_VM_IPS}[1]
+
+Ping Vm Instance3 In network_3 From network_2(vxlan to vxlan)
+    [Documentation]    Check reachability of vm instances by pinging to them after creating routers.
+    Ping Vm From DHCP Namespace    network_2    @{NET3_L3_VM_IPS}[2]
+
 Connectivity Tests From Vm Instance1 In network_1
     [Documentation]    Login to the VM instance and test operations
     ${dst_list}=    Create List    @{NET1_L3_VM_IPS}    @{NET2_L3_VM_IPS}
@@ -148,7 +182,12 @@ Delete Vm Instances In network_2
     [Documentation]    Delete Vm instances using instance names in network_2.
     : FOR    ${VmElement}    IN    @{NET_2_VM_INSTANCES}
     \    Delete Vm Instance    ${VmElement}
-    [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
+
+Delete Vm Instances In network_3
+    [Documentation]    Delete Vm instances using instance names in network_3.
+    : FOR    ${VmElement}    IN    @{NET_3_VM_INSTANCES}
+    \    Delete Vm Instance    ${VmElement}
+    [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}    @{NET_3_VM_INSTANCES}
     ...    AND    Get Test Teardown Debugs
 
 Delete Router Interfaces
@@ -168,6 +207,10 @@ Delete Sub Networks In network_2
     [Documentation]    Delete Sub Nets for the Networks with neutron request.
     Delete SubNet    subnet_2
 
+Delete Sub Networks In network_3
+    [Documentation]    Delete Sub Nets for the Networks with neutron request.
+    Delete SubNet    subnet_3
+
 Delete Networks
     [Documentation]    Delete Networks with neutron request.
     : FOR    ${NetworkElement}    IN    @{NETWORKS_NAME}
index a5e2ede32130fbd383b86569328d34b9af400417..3ffa523d35e31d4bafb29f675d380d7b16884cbd 100644 (file)
@@ -21,9 +21,9 @@ Resource          ../../../libraries/Utils.robot
 @{SUBNETS_RANGE}    90.0.0.0/24
 ${external_gateway}    10.10.10.250
 ${external_subnet}    10.10.10.0/24
-${external_physical_network}    physnet1
 ${external_net_name}    external-net
 ${external_subnet_name}    external-subnet
+${network1_vlan_id}    167
 
 *** Test Cases ***
 Create All Controller Sessions
@@ -73,7 +73,7 @@ Check Vm Instances Have Ip Address
     ...    AND    Get Test Teardown Debugs
 
 Create External Network And Subnet
-    Create Network    ${external_net_name} --router:external --provider:network_type=flat --provider:physical_network=${external_physical_network}
+    Create Network    ${external_net_name} --router:external --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id}
     Create Subnet    ${external_net_name}    ${external_subnet_name}    ${external_subnet}    --gateway ${external_gateway}
 
 Create Router
index e9cd883757578ef7f794a8a980d63e895e8b5865..4fdd575cfec6a4653feb519bc1349cbdc3d14177 100644 (file)
@@ -16,11 +16,11 @@ Variables         ../../../variables/Variables.py
 *** Variables ***
 ${exclusion_regex}    'metering|test_l3_agent_scheduler.L3AgentSchedulerTestJSON|test_extensions.ExtensionsTestJSON.test_list_show_extensions|test_routers_dvr.RoutersTestDVR.test_centralized_router_update_to_dvr'
 ${tempest_config_file}    /opt/stack/tempest/etc/tempest.conf
-${external_physical_network}    physnet1
 ${external_net_name}    external-net
 ${external_subnet_name}    external-subnet
 ${external_gateway}    10.10.10.250
 ${external_subnet}    10.10.10.0/24
+${network_vlan_id}    167
 
 *** Test Cases ***
 tempest.api.network
@@ -84,7 +84,7 @@ Log In To Tempest Executor And Setup Test Environment
     ${source_pwd}    Set Variable    yes
     Set Suite Variable    ${source_pwd}
     # Tempest tests need an existing external network in order to create routers.
-    Create Network    ${external_net_name} --router:external --provider:network_type=flat --provider:physical_network=${external_physical_network}
+    Create Network    ${external_net_name} --router:external --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network_vlan_id}
     Create Subnet    ${external_net_name}    ${external_subnet_name}    ${external_subnet}    --gateway ${external_gateway}
     List Networks
     ${control_node_conn_id}=    SSHLibrary.Open Connection    ${OS_CONTROL_NODE_IP}    prompt=${DEFAULT_LINUX_PROMPT_STRICT}