2 Documentation Test suite to validate vpnservice functionality in an openstack integrated environment.
3 ... The assumption of this suite is that the environment is already configured with the proper
4 ... integration bridges and vxlan tunnels.
5 Suite Setup Basic Vpnservice Suite Setup
6 Suite Teardown Basic Vpnservice Suite Teardown
7 Test Setup Log Testcase Start To Controller Karaf
9 Library OperatingSystem
10 Library RequestsLibrary
11 Resource ../../../libraries/Utils.robot
12 Resource ../../../libraries/OpenStackOperations.robot
13 Resource ../../../libraries/DevstackUtils.robot
14 Variables ../../../variables/Variables.py
17 @{NETWORKS} NET10 NET20
18 @{SUBNETS} SUBNET1 SUBNET2
19 @{SUBNET_CIDR} 10.1.1.0/24 20.1.1.0/24
20 @{PORT_LIST} PORT11 PORT21 PORT12 PORT22
21 @{VM_INSTANCES} VM11 VM21 VM12 VM22
22 @{ROUTERS} ROUTER_1 ROUTER_2
25 Verify Tunnel Creation
26 [Documentation] Checks that vxlan tunnels have been created properly.
28 Log This test case is currently a noop, but work can be added here to validate if needed. However, as the suite Documentation notes, it's already assumed that the environment has been configured properly. If we do add work in this test case, we need to remove the "exclude" tag for it to run. In fact, if this
29 ... test case is critical to run, and if it fails we would be dead in the water for the rest of the suite, we should move it to Suite Setup so that nothing else will run and waste time in a broken environment.
31 Create Neutron Networks
32 [Documentation] Create two networks
33 Create Network ${NETWORKS[0]} --provider:network_type local
34 Create Network ${NETWORKS[1]} --provider:network_type local
37 Create Neutron Subnets
38 [Documentation] Create two subnets for previously created networks
39 Create SubNet ${NETWORKS[0]} ${SUBNETS[0]} ${SUBNET_CIDR[0]}
40 Create SubNet ${NETWORKS[1]} ${SUBNETS[1]} ${SUBNET_CIDR[1]}
44 [Documentation] Create four ports under previously created subnets
45 Create Port ${NETWORKS[0]} ${PORT_LIST[0]}
46 Create Port ${NETWORKS[0]} ${PORT_LIST[1]}
47 Create Port ${NETWORKS[1]} ${PORT_LIST[2]}
48 Create Port ${NETWORKS[1]} ${PORT_LIST[3]}
50 Check OpenDaylight Neutron Ports
51 [Documentation] Checking OpenDaylight Neutron API for known ports
52 ${resp} RequestsLibrary.Get Request session ${NEUTRON_PORTS_API}
54 Should be Equal As Strings ${resp.status_code} 200
57 [Documentation] Create two subnets for previously created networks
58 Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES[0]} ${OS_COMPUTE_1_IP}
59 Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES[1]} ${OS_COMPUTE_2_IP}
60 Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES[2]} ${OS_COMPUTE_1_IP}
61 Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES[3]} ${OS_COMPUTE_2_IP}
63 Check ELAN Datapath Traffic Within The Networks
64 [Documentation] Checks datapath within the same network with different vlans.
66 Log This test will be added in the next patch
69 [Documentation] Create Router
70 Create Router ${ROUTERS[0]}
72 Add Interfaces To Router
73 [Documentation] Add Interfaces
74 : FOR ${INTERFACE} IN @{SUBNETS}
75 \ Add Router Interface ${ROUTERS[0]} ${INTERFACE}
77 Check L3_Datapath Traffic Across Networks With Router
78 [Documentation] Datapath Test Across the networks using Router for L3.
80 Log This test will be added in the next patch
82 Delete Router Interfaces
83 [Documentation] Remove Interface to the subnets.
84 : FOR ${INTERFACE} IN @{SUBNETS}
85 \ Remove Interface ${ROUTERS[0]} ${INTERFACE}
88 [Documentation] Delete Router and Interface to the subnets.
89 Delete Router ${ROUTERS[0]}
92 [Documentation] Create L3VPN.
94 Log This test will be added in the next patch
96 Associate Networks To L3VPN
97 [Documentation] Associate Networks To L3VPN.
99 Log This test will be added in the next patch
101 Check Datapath Traffic Across Networks With L3VPN
102 [Documentation] Datapath Test Across the networks with VPN.
104 Log This test will be added in the next patch
107 [Documentation] Delete Vm instances in the given Instance List
108 : FOR ${VmInstance} IN @{VM_INSTANCES}
109 \ Delete Vm Instance ${VmInstance}
112 [Documentation] Delete Neutron Ports in the given Port List.
113 : FOR ${Port} IN @{PORT_LIST}
114 \ Delete SubNet ${Port}
117 [Documentation] Delete Sub Nets in the given Subnet List.
118 : FOR ${Subnet} IN @{SUBNETS}
119 \ Delete SubNet ${Subnet}
122 [Documentation] Delete Networks in the given Net List
123 : FOR ${Network} IN @{NETWORKS}
124 \ Delete Network ${Network}
127 Basic Vpnservice Suite Setup
128 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
130 Basic Vpnservice Suite Teardown