summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-11-17 13:10:08 +0000
committerGerrit Code Review <review@openstack.org>2016-11-17 13:10:08 +0000
commit5dc4aa95623f58bbe8237ac373db4d26b3c45560 (patch)
treea157b73744c0e834a2b3d945dd25b6226f2a6afa
parentbabceaa0f6ae4d5e3a8f85b3821aca46f4289ed2 (diff)
parentefc95b7cb8cde3e638e890e6b7ecc04f7efc3727 (diff)
Merge "Fix the test nsxt_add_delete_compute_vmware_node"
-rw-r--r--doc/test/source/test_suite_scale.rst2
-rw-r--r--plugin_test/tests/test_plugin_scale.py30
2 files changed, 24 insertions, 8 deletions
diff --git a/doc/test/source/test_suite_scale.rst b/doc/test/source/test_suite_scale.rst
index 6585f37..881d265 100644
--- a/doc/test/source/test_suite_scale.rst
+++ b/doc/test/source/test_suite_scale.rst
@@ -162,7 +162,7 @@ Steps
162 11. Add node with compute-vmware role. 162 11. Add node with compute-vmware role.
163 12. Reconfigure vcenter compute clusters. 163 12. Reconfigure vcenter compute clusters.
164 13. Redeploy cluster. 164 13. Redeploy cluster.
165 14. Check vm instance has been removed. 165 14. Check that instance is in place.
166 15. Run OSTF. 166 15. Run OSTF.
167 16. Remove node with compute-vmware role from base installation. 167 16. Remove node with compute-vmware role from base installation.
168 17. Reconfigure vcenter compute clusters. 168 17. Reconfigure vcenter compute clusters.
diff --git a/plugin_test/tests/test_plugin_scale.py b/plugin_test/tests/test_plugin_scale.py
index fbb096f..e72ea5f 100644
--- a/plugin_test/tests/test_plugin_scale.py
+++ b/plugin_test/tests/test_plugin_scale.py
@@ -13,6 +13,8 @@ License for the specific language governing permissions and limitations
13under the License. 13under the License.
14""" 14"""
15 15
16import itertools
17
16from proboscis import test 18from proboscis import test
17from proboscis.asserts import assert_true 19from proboscis.asserts import assert_true
18 20
@@ -266,7 +268,7 @@ class TestNSXtScale(TestNSXtBase):
266 10. Add node with compute-vmware role. 268 10. Add node with compute-vmware role.
267 11. Reconfigure vcenter compute clusters. 269 11. Reconfigure vcenter compute clusters.
268 12. Redeploy cluster. 270 12. Redeploy cluster.
269 13. Check that instance has been removed. 271 13. Check that instance is in place.
270 14. Run OSTF. 272 14. Run OSTF.
271 15. Remove node with compute-vmware role. 273 15. Remove node with compute-vmware role.
272 16. Reconfigure vcenter compute clusters. 274 16. Reconfigure vcenter compute clusters.
@@ -319,7 +321,7 @@ class TestNSXtScale(TestNSXtBase):
319 SERVTEST_PASSWORD, 321 SERVTEST_PASSWORD,
320 SERVTEST_TENANT) 322 SERVTEST_TENANT)
321 323
322 vcenter_vm = os_help.create_instance(os_conn, az='vcenter') 324 os_help.create_instance(os_conn, az='vcenter')
323 325
324 self.show_step(10) # Add node with compute-vmware role 326 self.show_step(10) # Add node with compute-vmware role
325 self.fuel_web.update_nodes(cluster_id, 327 self.fuel_web.update_nodes(cluster_id,
@@ -336,8 +338,8 @@ class TestNSXtScale(TestNSXtBase):
336 self.show_step(12) # Redeploy cluster 338 self.show_step(12) # Redeploy cluster
337 self.fuel_web.deploy_cluster_wait(cluster_id) 339 self.fuel_web.deploy_cluster_wait(cluster_id)
338 340
339 self.show_step(13) # Check that instance has been removed 341 self.show_step(13) # Check that instance is in place
340 assert_true(os_conn.is_srv_deleted(vcenter_vm)) 342 os_help.check_instances_state(os_conn)
341 343
342 self.show_step(14) # Run OSTF 344 self.show_step(14) # Run OSTF
343 self.fuel_web.run_ostf(cluster_id) 345 self.fuel_web.run_ostf(cluster_id)
@@ -348,9 +350,23 @@ class TestNSXtScale(TestNSXtBase):
348 False, True) 350 False, True)
349 351
350 self.show_step(16) # Reconfigure vcenter compute clusters 352 self.show_step(16) # Reconfigure vcenter compute clusters
351 target_node2 = self.fuel_web.get_nailgun_node_by_name('slave-04') 353 vmware_attr = \
352 self.fuel_web.vcenter_configure(cluster_id, 354 self.fuel_web.client.get_cluster_vmware_attributes(cluster_id)
353 target_node_1=target_node2['hostname']) 355 vcenter_data = vmware_attr['editable']['value']['availability_zones'][
356 0]["nova_computes"]
357
358 comp_vmware_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
359 cluster_id, ['compute-vmware'])
360 comp_vmware_nodes = [node for node in comp_vmware_nodes if
361 node['pending_deletion'] is True]
362
363 for node, nova_comp in itertools.product(comp_vmware_nodes,
364 vcenter_data):
365 if node['hostname'] == nova_comp['target_node']['current']['id']:
366 vcenter_data.remove(nova_comp)
367 self.fuel_web.client.update_cluster_vmware_attributes(cluster_id,
368 vmware_attr)
369
354 370
355 self.show_step(17) # Redeploy cluster 371 self.show_step(17) # Redeploy cluster
356 self.fuel_web.deploy_cluster_wait(cluster_id) 372 self.fuel_web.deploy_cluster_wait(cluster_id)