From 74bcb5c8828f50acca78175d789eb7fab023114b Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 15 Jun 2016 10:59:47 +0200 Subject: [PATCH] Redeploy nodes in post-deploy test only for MOS 8 With MOS 9 and later, this should be handled by Fuel automatically. Change-Id: Icf94641db4af83ad57d849b24a0c9634dab1ebd2 --- stacklight_tests/helpers/helpers.py | 4 ++++ stacklight_tests/toolchain/test_post_install.py | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/stacklight_tests/helpers/helpers.py b/stacklight_tests/helpers/helpers.py index 5c905ef..1a534df 100644 --- a/stacklight_tests/helpers/helpers.py +++ b/stacklight_tests/helpers/helpers.py @@ -559,3 +559,7 @@ class PluginHelper(object): start = time.time() raise TimeoutException("Timed out waiting to become {}".format( expected_status)) + + def get_fuel_release(self): + version = self.nailgun_client.get_api_version() + return version.get('release') diff --git a/stacklight_tests/toolchain/test_post_install.py b/stacklight_tests/toolchain/test_post_install.py index 14df3f5..8ae478a 100644 --- a/stacklight_tests/toolchain/test_post_install.py +++ b/stacklight_tests/toolchain/test_post_install.py @@ -71,6 +71,8 @@ class TestToolchainPostInstallation(api.ToolchainApi): 3. Configure the plugins 4. Add 3 nodes with the plugin roles 5. Deploy the cluster + 6. Redeploy the nodes that existed before the last deploy (MOS 8 + only) 6. Check that LMA Toolchain plugins are running 7. Run OSTF @@ -90,10 +92,13 @@ class TestToolchainPostInstallation(api.ToolchainApi): 'slave-04': settings.stacklight_roles, 'slave-05': settings.stacklight_roles }) - # The 'hiera' and post-deployment tasks have to be re-executed - # "manually" for the existing nodes - self.helpers.run_tasks(existing_nodes, tasks=['hiera'], - start="post_deployment_start", timeout=20 * 60) + if self.helpers.get_fuel_release() == '8.0': + # The 'hiera' and post-deployment tasks have to be re-executed + # "manually" for the existing nodes on MOS 8. With later versions + # of MOS, these tasks should be re-executed automatically. + self.helpers.run_tasks( + existing_nodes, tasks=['hiera'], start="post_deployment_start", + timeout=20 * 60) self.check_plugins_online()