Added vpnservice related tests with openstack 79/42579/5
authorMahendar Yavagani <mahendar.yavagani@gmail.com>
Tue, 26 Jul 2016 22:49:10 +0000 (15:49 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 9 Aug 2016 23:40:13 +0000 (23:40 +0000)
Change-Id: Ie4799e701bb31121eaf300632c7f53078728cdc4
Signed-off-by: Mahendar Yavagani <mahendar.yavagani@gmail.com>
csit/libraries/OpenStackOperations.robot
csit/suites/openstack/vpnservice/basic_vpnservice.robot

index 16d59026f05849053b7f4a6165b53dc575c25159..f6a7ade405db69e91400a0d4b806638b4f089b7c 100644 (file)
@@ -78,6 +78,16 @@ Create Port
     Log    ${output}
     Should Contain    ${output}    Created a new port
 
+Delete Port
+    [Arguments]    ${port_name}
+    [Documentation]    Delete Port with neutron request.
+    ${devstack_conn_id}=       Get ControlNode Connection
+    Switch Connection    ${devstack_conn_id}
+    ${output}=    Write Commands Until Prompt    neutron -v port-delete ${port_name}    30s
+    Close Connection
+    Log    ${output}
+    Should Contain    ${output}    Deleted a new port
+
 Verify Gateway Ips
     [Documentation]    Verifies the Gateway Ips with dump flow.
     ${output}=    Write Commands Until Prompt    sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
index 03e43ea7d874bdf62701efad459218b8dd30230e..99492c1688475ad29855a71860f251e8f6434358 100644 (file)
@@ -13,15 +13,12 @@ Resource          ../../../libraries/DevstackUtils.robot
 Variables         ../../../variables/Variables.py
 
 *** Variables ***
-${net_1}    NET10
-${net_2}    NET20
-${subnet_1}    SUBNET1
-${subnet_2}    SUBNET2
-${subnet_1_cidr}    10.1.1.0/24
-${subnet_2_cidr}    20.1.1.0/24
+@{NETWORKS}    NET10    NET20
+@{SUBNETS}    SUBNET1    SUBNET2
+@{SUBNET_CIDR}    10.1.1.0/24    20.1.1.0/24
 @{PORT_LIST}    PORT11    PORT21    PORT12    PORT22
 @{VM_INSTANCES}    VM11    VM21    VM12    VM22
-
+@{ROUTERS}    ROUTER_1    ROUTER_2
 
 *** Test Cases ***
 Verify Tunnel Creation
@@ -35,22 +32,22 @@ Verify Tunnel Creation
 
 Create Neutron Networks
     [Documentation]    Create two networks
-    Create Network    ${net_1}    --provider:network_type local
-    Create Network    ${net_2}    --provider:network_type local
+    Create Network    ${NETWORKS[0]}    --provider:network_type local
+    Create Network    ${NETWORKS[1]}    --provider:network_type local
     List Networks
 
 Create Neutron Subnets
     [Documentation]    Create two subnets for previously created networks
-    Create SubNet    ${net_1}    ${subnet_1}    ${subnet_1_cidr}
-    Create SubNet    ${net_2}    ${subnet_2}    ${subnet_2_cidr}
+    Create SubNet    ${NETWORKS[0]}    ${SUBNETS[0]}    ${SUBNET_CIDR[0]}
+    Create SubNet    ${NETWORKS[1]}    ${SUBNETS[1]}    ${SUBNET_CIDR[1]}
     List Subnets
 
 Create Neutron Ports
     [Documentation]    Create four ports under previously created subnets
-    Create Port    ${net_1}    ${PORT_LIST[0]}
-    Create Port    ${net_1}    ${PORT_LIST[1]}
-    Create Port    ${net_2}    ${PORT_LIST[2]}
-    Create Port    ${net_2}    ${PORT_LIST[3]}
+    Create Port    ${NETWORKS[0]}    ${PORT_LIST[0]}
+    Create Port    ${NETWORKS[0]}    ${PORT_LIST[1]}
+    Create Port    ${NETWORKS[1]}    ${PORT_LIST[2]}
+    Create Port    ${NETWORKS[1]}    ${PORT_LIST[3]}
 
 Check OpenDaylight Neutron Ports
     [Documentation]    Checking OpenDaylight Neutron API for known ports
@@ -65,6 +62,69 @@ Create Nova VMs
     Create Vm Instance With Port On Compute Node    ${PORT_LIST[2]}    ${VM_INSTANCES[2]}    ${OS_COMPUTE_1_IP}
     Create Vm Instance With Port On Compute Node    ${PORT_LIST[3]}    ${VM_INSTANCES[3]}    ${OS_COMPUTE_2_IP}
 
+Check ELAN Datapath Traffic Within The Networks
+    [Documentation]    Checks datapath within the same network with different vlans.
+    [Tags]    exclude
+    Log    This test will be added in the next patch
+
+Create Routers
+    [Documentation]    Create Router
+    Create Router    ${ROUTERS[0]}
+
+Add Interfaces To Router
+    [Documentation]    Add Interfaces
+    : FOR    ${INTERFACE}    IN    @{SUBNETS}
+    \    Add Router Interface    ${ROUTERS[0]}    ${INTERFACE}
+
+Check L3_Datapath Traffic Across Networks With Router
+    [Documentation]    Datapath Test Across the networks using Router for L3.
+    [Tags]    exclude
+    Log    This test will be added in the next patch
+
+Delete Router Interfaces
+    [Documentation]    Remove Interface to the subnets.
+    : FOR    ${INTERFACE}    IN    @{SUBNETS}
+    \    Remove Interface    ${ROUTERS[0]}    ${INTERFACE}
+
+Delete Routers
+    [Documentation]    Delete Router and Interface to the subnets.
+    Delete Router    ${ROUTERS[0]}
+
+Create L3VPN
+    [Documentation]    Create L3VPN.
+    [Tags]    exclude
+    Log    This test will be added in the next patch
+
+Associate Networks To L3VPN
+    [Documentation]    Associate Networks To L3VPN.
+    [Tags]    exclude
+    Log    This test will be added in the next patch
+
+Check Datapath Traffic Across Networks With L3VPN
+    [Documentation]    Datapath Test Across the networks with VPN.
+    [Tags]    exclude
+    Log    This test will be added in the next patch
+
+Delete Vm Instances
+    [Documentation]    Delete Vm instances in the given Instance List
+    : FOR    ${VmInstance}    IN    @{VM_INSTANCES}
+    \    Delete Vm Instance    ${VmInstance}
+
+Delete Neutron Ports
+    [Documentation]    Delete Neutron Ports in the given Port List.
+    : FOR    ${Port}    IN    @{PORT_LIST}
+    \    Delete SubNet    ${Port}
+
+Delete Sub Networks
+    [Documentation]    Delete Sub Nets in the given Subnet List.
+    : FOR    ${Subnet}    IN    @{SUBNETS}
+    \    Delete SubNet    ${Subnet}
+
+Delete Networks
+    [Documentation]    Delete Networks in the given Net List
+    : FOR    ${Network}    IN    @{NETWORKS}
+    \    Delete Network    ${Network}
+
 *** Keywords ***
 Basic Vpnservice Suite Setup
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}