summaryrefslogtreecommitdiffstats
path: root/functest/ci/prepare_env.py
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2017-01-06 07:22:18 -0500
committerhelenyao <yaohelan@huawei.com>2017-01-16 22:17:20 -0500
commit028752d960f36cfbfae9d303c9ec81ae1731f40e (patch)
treefe2e7e103b9f474af586aa1d9b411b04e9680294 /functest/ci/prepare_env.py
parent3b4930952a84a57a8f2a3a73ae551b7805608a06 (diff)
Rally keystone test scenarios for v3
JIRA: FUNCTEST-652 1. Updated the Rally repository to master the keystone test scenarios of TAG= 0.7.0 cannot run on Newton also, 0.7.0 is the last tag that exists 2. Update the Tempest installation with updated rally command Rally team said "there was no possibility to do it in backward compatible way(rally verify re-design)" 3. The `rally show` was deprecated[1] in the master and corresponding logic is updated 4. Update rally commands [1] https://github.com/openstack/rally/commit/f2fc3015beb4cfd8053db728765714500db6eeb2 Change-Id: Ief9e36a16dd92e4449c0f76579e7191a93aa3e21 Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/ci/prepare_env.py')
-rwxr-xr-xfunctest/ci/prepare_env.py35
1 files changed, 20 insertions, 15 deletions
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index 3df3a0e0e..45e19a466 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -227,32 +227,36 @@ def install_rally():
rally_conf = os_utils.get_credentials_for_rally()
with open('rally_conf.json', 'w') as fp:
json.dump(rally_conf, fp)
- cmd = "rally deployment create --file=rally_conf.json --name="
- cmd += CONST.rally_deployment_name
+ cmd = ("rally deployment create "
+ "--file=rally_conf.json --name={}"
+ .format(CONST.rally_deployment_name))
ft_utils.execute_command(cmd,
- error_msg="Problem creating Rally deployment")
-
- logger.info("Installing tempest from existing repo...")
- cmd = ("rally verify install --source " +
- CONST.dir_repo_tempest +
- " --system-wide")
- ft_utils.execute_command(cmd,
- error_msg="Problem installing Tempest.")
+ error_msg=("Problem while creating "
+ "Rally deployment"))
cmd = "rally deployment check"
ft_utils.execute_command(cmd,
error_msg=("OpenStack not responding or "
"faulty Rally deployment."))
- cmd = "rally show images"
+ cmd = "rally deployment list"
ft_utils.execute_command(cmd,
error_msg=("Problem while listing "
- "OpenStack images."))
+ "Rally deployment."))
- cmd = "rally show flavors"
+ cmd = "rally plugin list | head -5"
ft_utils.execute_command(cmd,
error_msg=("Problem while showing "
- "OpenStack flavors."))
+ "Rally plugins."))
+
+
+def install_tempest():
+ logger.info("Installing tempest from existing repo...")
+ cmd = ("rally verify create-verifier --source {0} "
+ "--name {1} --type tempest"
+ .format(CONST.dir_repo_tempest, CONST.tempest_deployment_name))
+ ft_utils.execute_command(cmd,
+ error_msg="Problem while installing Tempest.")
def check_environment():
@@ -267,7 +271,7 @@ def check_environment():
logger.error(msg_not_active)
sys.exit(1)
- logger.info("Functest environment installed.")
+ logger.info("Functest environment is installed.")
def main():
@@ -283,6 +287,7 @@ def main():
patch_config_file()
verify_deployment()
install_rally()
+ install_tempest()
with open(CONST.env_active, "w") as env_file:
env_file.write("1")