2 Documentation Test suite to deploy devstack with networking-odl
3 Suite Setup Devstack Suite Setup
5 Library OperatingSystem
6 Library RequestsLibrary
7 Resource ../../../libraries/Utils.robot
8 Resource ../../../libraries/OpenStackOperations.robot
9 Resource ../../../libraries/DevstackUtils.robot
12 @{NETWORKS_NAME} net1_network net2_network
13 @{SUBNETS_NAME} subnet1 subnet2
14 @{NET_1_VM_INSTANCES} MyFirstInstance_1 MySecondInstance_1
15 @{NET_2_VM_INSTANCES} MyFirstInstance_2 MySecondInstance_2
16 @{VM_IPS} 10.0.0.3 20.0.0.3
17 @{GATEWAY_IPS} 10.0.0.1 20.0.0.1
18 @{DHCP_IPS} 10.0.0.2 20.0.0.2
19 @{SUBNETS_RANGE} 10.0.0.0/24 20.0.0.0/24
22 Run Devstack Gate Wrapper
23 Write Commands Until Prompt unset GIT_BASE
24 Write Commands Until Prompt env
25 ${output}= Write Commands Until Prompt ./devstack-gate/devstack-vm-gate-wrap.sh timeout=3600s #60min
27 Should Not Contain ${output} ERROR: the main setup script run by this job failed
28 # workaround for https://bugs.launchpad.net/networking-odl/+bug/1512418
29 Write Commands Until Prompt cd /opt/stack/new/tempest-lib
30 Write Commands Until Prompt sudo python setup.py install
31 [Teardown] Show Devstack Debugs
33 Validate Neutron and Networking-ODL Versions
34 ${output}= Write Commands Until Prompt cd /opt/stack/new/neutron; git branch;
35 Should Contain ${output} * ${OPENSTACK_BRANCH}
36 ${output}= Write Commands Until Prompt cd /opt/stack/new/networking-odl; git branch;
37 Should Contain ${output} * ${NETWORKING-ODL_BRANCH}
40 Run Tempest Tests ${TEST_NAME}
43 [Documentation] Create Network with neutron request.
44 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
45 \ Create Network ${NetworkElement}
47 Create Subnets For net1_network
48 [Documentation] Create Sub Nets for the Networks with neutron request.
49 Create SubNet net1_network subnet1 @{SUBNETS_RANGE}[0]
51 Create Subnets For net2_network
52 [Documentation] Create Sub Nets for the Networks with neutron request.
53 Create SubNet net2_network subnet2 @{SUBNETS_RANGE}[1]
56 ${output}= Write Commands Until Prompt neutron -v port-list
59 List Available Networks
60 ${output}= Write Commands Until Prompt neutron -v net-list
64 ${output}= Write Commands Until Prompt keystone tenant-list
68 ${output}= Write Commands Until Prompt nova list
72 ${output}= Write Commands Until Prompt nova image-list
76 ${output}= Write Commands Until Prompt nova flavor-list
79 Create Vm Instances For net1_network
80 [Documentation] Create Vm instances using flavor and image names.
81 Create Vm Instances net1_network ${NET_1_VM_INSTANCES}
82 [Teardown] Show Debugs ${NET_1_VM_INSTANCES}
84 Create Vm Instances For net2_network
85 [Documentation] Create Vm instances using flavor and image names.
86 Create Vm Instances net2_network ${NET_2_VM_INSTANCES}
87 [Teardown] Show Debugs ${NET_2_VM_INSTANCES}
89 Verify Created Vm Instance In Dump Flow
90 [Documentation] Verify the existence of the created vm instance ips in the dump flow.
91 ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
93 : FOR ${VmIpElement} IN @{VM_IPS}
94 \ Should Contain ${output} ${VmIpElement}
97 [Documentation] Create Router and Add Interface to the subnets.
98 Create Router router_1
100 Verify Gateway Ip After Interface Added
101 [Documentation] Verify the existence of the gateway ips with the dump flow in Beryllium.
102 Run Keyword If "${ODL_VERSION}" == "lithium-latest" Run Keyword And Ignore Error Verify Gateway Ips
103 ... ELSE IF "${ODL_VERSION}" != "lithium-latest" Verify Gateway Ips
105 Verify Dhcp Flow Entries
106 [Documentation] Verify Created SubNets for the Networks with the dump flow in Beryllium.
107 Run Keyword If "${ODL_VERSION}" == "lithium-latest" Run Keyword And Ignore Error Verify Dhcp Ips
108 ... ELSE IF "${ODL_VERSION}" != "lithium-latest" Verify Dhcp Ips
110 Delete Vm Instances In net1_network
111 [Documentation] Delete Vm instances using instance names in net1_network.
112 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
113 \ Delete Vm Instance ${VmElement}
115 Delete Vm Instances In net2_network
116 [Documentation] Delete Vm instances using instance names in net2_network.
117 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
118 \ Delete Vm Instance ${VmElement}
120 Verify Deleted Vm Instance Removed In Dump Flow
121 [Documentation] Verify the non-existence of the vm instance ips in the dump flow.
122 : FOR ${VmIpElement} IN @{VM_IPS}
123 \ ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
125 \ Should Not Contain ${output} ${VmIpElement}
127 Delete Router Interfaces
128 [Documentation] Remove Interface to the subnets.
129 : FOR ${interface} IN @{SUBNETS_NAME}
130 \ Remove Interface router_1 ${interface}
133 [Documentation] Delete Router and Interface to the subnets.
134 Delete Router router_1
136 Verify Deleted Routers
137 [Documentation] Verify Deleted Routers for the Networks with dump flow.
138 Verify No Gateway Ips
140 Delete Sub Networks In net1_network
141 [Documentation] Delete Sub Nets for the Networks with neutron request.
142 Delete SubNet subnet1
144 Delete Sub Networks In net2_network
145 [Documentation] Delete Sub Nets for the Networks with neutron request.
146 Delete SubNet subnet2
149 [Documentation] Delete Networks with neutron request.
150 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
151 \ Delete Network ${NetworkElement}
153 Verify Deleted Subnets
154 [Documentation] Verify Deleted SubNets for the Networks with dump flow.