aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/VIM/OpenStack/CI/libraries/run_rally.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-04-07 14:36:43 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2016-04-11 10:02:45 +0000
commit4b1a0c48c915c0af207587489ec3e556a326be23 (patch)
treef4b5e339619b9230cf64d7778b494040c792f77e /testcases/VIM/OpenStack/CI/libraries/run_rally.py
parenta71001dc2874725b494be6a0c18a586c5d0bfbe2 (diff)
Split functest_utils.py into 2 scripts
JIRA: FUNCTEST-186 All the openstack related functions are in openstack_utils.py and the remaining functions in functest_utils.py All the scripts are adapted to this structure. Change-Id: I7f3805779741f0b085985d0d053feb429250b1ea Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/VIM/OpenStack/CI/libraries/run_rally.py')
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally.py b/testcases/VIM/OpenStack/CI/libraries/run_rally.py
index 1ea6ca6db..a33963986 100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally.py
@@ -79,6 +79,7 @@ if not os.path.exists(REPO_PATH):
exit(-1)
sys.path.append(REPO_PATH + "testcases/")
import functest_utils
+import openstack_utils
with open("/home/opnfv/functest/conf/config_functest.yaml") as f:
functest_yaml = yaml.safe_load(f)
@@ -236,21 +237,21 @@ def main():
logger.error('argument not valid')
exit(-1)
- creds_nova = functest_utils.get_credentials("nova")
+ creds_nova = openstack_utils.get_credentials("nova")
nova_client = novaclient.Client('2', **creds_nova)
- creds_keystone = functest_utils.get_credentials("keystone")
+ creds_keystone = openstack_utils.get_credentials("keystone")
keystone_client = keystoneclient.Client(**creds_keystone)
glance_endpoint = keystone_client.service_catalog.url_for(service_type='image',
endpoint_type='publicURL')
glance_client = glanceclient.Client(1, glance_endpoint,
token=keystone_client.auth_token)
- image_id = functest_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
+ image_id = openstack_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
if image_id == '':
logger.debug("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
GLANCE_IMAGE_PATH))
- image_id = functest_utils.create_glance_image(glance_client,
+ image_id = openstack_utils.create_glance_image(glance_client,
GLANCE_IMAGE_NAME,
GLANCE_IMAGE_PATH)
if not image_id:
@@ -281,7 +282,7 @@ def main():
logger.debug("Deleting image '%s' with ID '%s'..." \
% (GLANCE_IMAGE_NAME, image_id))
- if not functest_utils.delete_glance_image(nova_client, image_id):
+ if not openstack_utils.delete_glance_image(nova_client, image_id):
logger.error("Error deleting the glance image")
if __name__ == '__main__':