Browse Source

Adding of automated tests for multiple uplinks.

Change-Id: I5f7a19939c31ad947e5a6775fd72a4ba094fce7f
changes/79/372379/2
Vasily Gorin 2 years ago
parent
commit
337e8b8b6f
1 changed files with 158 additions and 0 deletions
  1. 158
    0
      plugin_test/tests/test_plugin_vmware_dvs_system.py

+ 158
- 0
plugin_test/tests/test_plugin_vmware_dvs_system.py View File

@@ -2215,3 +2215,161 @@ class TestDVSSystem(TestBasic):
2215 2215
             default_net.id, {"network": {"name": 'spring'}})
2216 2216
 
2217 2217
         assert_true(os_conn.get_network('spring')['id'] == default_net.id)
2218
+
2219
+    @test(depends_on=[SetupEnvironment.prepare_slaves_5],
2220
+          groups=["dvs_multiple_uplinks_teaming_fallback"])
2221
+    @log_snapshot_after_test
2222
+    def dvs_multiple_uplinks_teaming_fallback(self):
2223
+        """Launch cluster with multiple teaming and fallback uplinks.
2224
+
2225
+        Scenario:
2226
+            1. Upload DVS plugin to the master node.
2227
+            2. Install plugin.
2228
+            3. Create cluster with vcenter.
2229
+            4. Create a new environment with following parameters:
2230
+                * Compute: KVM/QEMU with vCenter
2231
+                * Networking: Neutron with VLAN segmentation
2232
+                * Storage: default
2233
+                * Additional services: default
2234
+            5. Add nodes with following roles:
2235
+                * Controller
2236
+                * Compute
2237
+                * Compute
2238
+                * ComputeVMware
2239
+            6. Configure interfaces on nodes.
2240
+            7. Configure network settings.
2241
+            8. Enable VMware vCenter/ESXi datastore for images (Glance).
2242
+            9. Configure VMware vCenter Settings. Add 2 vSphere clusters and configure
2243
+               Nova Compute instances on controllers and compute-vmware.
2244
+            10. Enable and configure DVS plugin with multiple uplinks.
2245
+                In foramt "Cluster:VDS:TU1;TU2:FU3".
2246
+            11. Verify networks.
2247
+            12. Deploy cluster.
2248
+            13. Run OSTF.
2249
+
2250
+        Duration: 1.8 hours
2251
+        Snapshot: dvs_multiple_uplinks_teaming_fallback
2252
+
2253
+        """
2254
+        self.env.revert_snapshot("ready_with_5_slaves")
2255
+
2256
+        self.show_step(1)
2257
+        self.show_step(2)
2258
+        plugin.install_dvs_plugin(self.ssh_manager.admin_ip)
2259
+
2260
+        self.show_step(3)
2261
+        cluster_id = self.fuel_web.create_cluster(
2262
+            name=self.__class__.__name__,
2263
+            mode=DEPLOYMENT_MODE,
2264
+            settings={
2265
+                "net_provider": 'neutron',
2266
+                "net_segment_type": NEUTRON_SEGMENT_TYPE
2267
+            }
2268
+        )
2269
+        self.show_step(4)
2270
+        self.show_step(5)
2271
+        self.show_step(6)
2272
+        self.show_step(7)
2273
+        self.fuel_web.update_nodes(cluster_id,
2274
+                                   {'slave-01': ['controller'],
2275
+                                    'slave-02': ['compute-vmware'],
2276
+                                    'slave-03': ['compute'],
2277
+                                    'slave-04': ['compute']})
2278
+
2279
+        self.show_step(8)
2280
+        self.show_step(9)
2281
+        self.fuel_web.vcenter_configure(
2282
+            cluster_id,
2283
+            target_node_2=self.node_name('slave-02'),
2284
+            multiclusters=True)
2285
+
2286
+        self.show_step(10)
2287
+        plugin.enable_plugin(cluster_id, self.fuel_web, tu=2, fu=1)
2288
+
2289
+        self.show_step(11)
2290
+        self.fuel_web.verify_network(cluster_id)
2291
+
2292
+        self.show_step(12)
2293
+        self.fuel_web.deploy_cluster_wait(cluster_id)
2294
+
2295
+        self.show_step(13)
2296
+        self.fuel_web.run_ostf(cluster_id=cluster_id, test_sets=['smoke'])
2297
+
2298
+    @test(depends_on=[SetupEnvironment.prepare_slaves_5],
2299
+          groups=["dvs_multiple_uplinks_teaming"])
2300
+    @log_snapshot_after_test
2301
+    def dvs_multiple_uplinks_teaming(self):
2302
+        """Launch cluster with multiple teaming uplinks.
2303
+
2304
+        Scenario:
2305
+            1. Upload DVS plugin to the master node.
2306
+            2. Install plugin.
2307
+            3. Create cluster with vcenter.
2308
+            4. Create a new environment with following parameters:
2309
+                * Compute: KVM/QEMU with vCenter
2310
+                * Networking: Neutron with VLAN segmentation
2311
+                * Storage: default
2312
+                * Additional services: default
2313
+            5. Add nodes with following roles:
2314
+                * Controller
2315
+                * Compute
2316
+                * Compute
2317
+                * ComputeVMware
2318
+            6. Configure interfaces on nodes.
2319
+            7. Configure network settings.
2320
+            8. Enable VMware vCenter/ESXi datastore for images (Glance).
2321
+            9. Configure VMware vCenter Settings. Add 2 vSphere clusters and configure
2322
+               Nova Compute instances on controllers and compute-vmware.
2323
+            10. Enable and configure DVS plugin with multiple uplinks.
2324
+                In format "Cluster:VDS:TU1;TU2;TU3".
2325
+            11. Verify networks.
2326
+            12. Deploy cluster.
2327
+            13. Run OSTF.
2328
+
2329
+        Duration: 1.8 hours
2330
+        Snapshot: dvs_multiple_uplinks_teaming
2331
+
2332
+        """
2333
+        self.env.revert_snapshot("ready_with_5_slaves")
2334
+
2335
+        self.show_step(1)
2336
+        self.show_step(2)
2337
+        plugin.install_dvs_plugin(self.ssh_manager.admin_ip)
2338
+
2339
+        self.show_step(3)
2340
+        cluster_id = self.fuel_web.create_cluster(
2341
+            name=self.__class__.__name__,
2342
+            mode=DEPLOYMENT_MODE,
2343
+            settings={
2344
+                "net_provider": 'neutron',
2345
+                "net_segment_type": NEUTRON_SEGMENT_TYPE
2346
+            }
2347
+        )
2348
+        self.show_step(4)
2349
+        self.show_step(5)
2350
+        self.show_step(6)
2351
+        self.show_step(7)
2352
+        self.fuel_web.update_nodes(cluster_id,
2353
+                                   {'slave-01': ['controller'],
2354
+                                    'slave-02': ['compute-vmware'],
2355
+                                    'slave-03': ['compute'],
2356
+                                    'slave-04': ['compute']})
2357
+
2358
+        self.show_step(8)
2359
+        self.show_step(9)
2360
+        self.fuel_web.vcenter_configure(
2361
+            cluster_id,
2362
+            target_node_2=self.node_name('slave-02'),
2363
+            multiclusters=True)
2364
+
2365
+        self.show_step(10)
2366
+        plugin.enable_plugin(cluster_id, self.fuel_web, tu=3, fu=0)
2367
+
2368
+        self.show_step(11)
2369
+        self.fuel_web.verify_network(cluster_id)
2370
+
2371
+        self.show_step(12)
2372
+        self.fuel_web.deploy_cluster_wait(cluster_id)
2373
+
2374
+        self.show_step(13)
2375
+        self.fuel_web.run_ostf(cluster_id=cluster_id, test_sets=['smoke'])

Loading…
Cancel
Save