diff options
Diffstat (limited to 'testcases')
-rwxr-xr-x | testcases/OpenStack/rally/run_rally-cert.py | 2 | ||||
-rwxr-xr-x | testcases/OpenStack/tempest/run_tempest.py | 11 | ||||
-rwxr-xr-x | testcases/features/promise.py | 5 | ||||
-rw-r--r-- | testcases/vnf/vIMS/orchestrator.py | 6 | ||||
-rwxr-xr-x | testcases/vnf/vIMS/vIMS.py | 31 |
5 files changed, 30 insertions, 25 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py index 7d9a7cd9..2f696ec3 100755 --- a/testcases/OpenStack/rally/run_rally-cert.py +++ b/testcases/OpenStack/rally/run_rally-cert.py @@ -525,7 +525,7 @@ def main(): logger.debug("Pushing Rally summary into DB...") functest_utils.push_results_to_db("functest", case_name, - None, + logger, start_time, stop_time, status, diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py index 8ca3bdb3..f99678df 100755 --- a/testcases/OpenStack/tempest/run_tempest.py +++ b/testcases/OpenStack/tempest/run_tempest.py @@ -193,6 +193,17 @@ def configure_tempest(deployment_dir): config.set('identity', 'tenant_name', TENANT_NAME) config.set('identity', 'username', USER_NAME) config.set('identity', 'password', USER_PASSWORD) + + if os.getenv('OS_ENDPOINT_TYPE') is not None: + services_list = ['compute', 'volume', 'image', 'network', + 'data-processing', 'object-storage', 'orchestration'] + sections = config.sections() + for service in services_list: + if service not in sections: + config.add_section(service) + config.set(service, 'endpoint_type', + os.environ.get("OS_ENDPOINT_TYPE")) + with open(tempest_conf_file, 'wb') as config_file: config.write(config_file) diff --git a/testcases/features/promise.py b/testcases/features/promise.py index 564f9470..74c1ad78 100755 --- a/testcases/features/promise.py +++ b/testcases/features/promise.py @@ -18,7 +18,6 @@ import time import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as functest_utils import functest.utils.openstack_utils as openstack_utils -import glanceclient.client as glclient import keystoneclient.v2_0.client as ksclient from neutronclient.v2_0 import client as ntclient import novaclient.client as nvclient @@ -134,9 +133,7 @@ def main(): "project_id": TENANT_NAME, }) - glance_endpoint = keystone.service_catalog.url_for( - service_type='image', endpoint_type='publicURL') - glance = glclient.Client(1, glance_endpoint, token=keystone.auth_token) + glance = openstack_utils.get_glance_client() nova = nvclient.Client("2", **nv_creds) logger.info("Creating image '%s' from '%s'..." % (IMAGE_NAME, diff --git a/testcases/vnf/vIMS/orchestrator.py b/testcases/vnf/vIMS/orchestrator.py index 7917e77e..d88efe9b 100644 --- a/testcases/vnf/vIMS/orchestrator.py +++ b/testcases/vnf/vIMS/orchestrator.py @@ -46,6 +46,12 @@ class orchestrator: def set_ssh_user(self, ssh_user): self.config['ssh_user'] = ssh_user + def set_nova_url(self, nova_url): + self.config['nova_url'] = nova_url + + def set_neutron_url(self, neutron_url): + self.config['neutron_url'] = neutron_url + def set_nameservers(self, nameservers): if 0 < len(nameservers): self.config['dns_subnet_1'] = nameservers[0] diff --git a/testcases/vnf/vIMS/vIMS.py b/testcases/vnf/vIMS/vIMS.py index 20a61158..790bfa0c 100755 --- a/testcases/vnf/vIMS/vIMS.py +++ b/testcases/vnf/vIMS/vIMS.py @@ -22,7 +22,6 @@ import time import yaml import keystoneclient.v2_0.client as ksclient -import glanceclient.client as glclient import novaclient.client as nvclient from neutronclient.v2_0 import client as ntclient @@ -316,9 +315,7 @@ def main(): }) logger.info("Upload some OS images if it doesn't exist") - glance_endpoint = keystone.service_catalog.url_for( - service_type='image', endpoint_type='publicURL') - glance = glclient.Client(1, glance_endpoint, token=keystone.auth_token) + glance = os_utils.get_glance_client() for img in IMAGES.keys(): image_name = IMAGES[img]['image_name'] @@ -347,36 +344,25 @@ def main(): "init", "Failed to update security group quota for tenant " + TENANT_NAME) - logger.info("Update cinder quota for this tenant") - from cinderclient import client as cinderclient - - creds_cinder = os_utils.get_credentials("cinder") - cinder_client = cinderclient.Client('1', creds_cinder['username'], - creds_cinder['api_key'], - creds_cinder['project_id'], - creds_cinder['auth_url'], - service_type="volume") - if not os_utils.update_cinder_quota(cinder_client, tenant_id, 20, 10, 150): - step_failure( - "init", "Failed to update cinder quota for tenant " + TENANT_NAME) - # ###############Â CLOUDIFY INITIALISATION ################ + public_auth_url = keystone.service_catalog.url_for( + service_type='identity', endpoint_type='publicURL') cfy = orchestrator(VIMS_DATA_DIR, CFY_INPUTS, logger) cfy.set_credentials(username=ks_creds['username'], password=ks_creds[ 'password'], tenant_name=ks_creds['tenant_name'], - auth_url=ks_creds['auth_url']) + auth_url=public_auth_url) logger.info("Collect flavor id for cloudify manager server") nova = nvclient.Client("2", **nv_creds) - flavor_name = "m1.medium" + flavor_name = "m1.large" flavor_id = os_utils.get_flavor_id(nova, flavor_name) for requirement in CFY_MANAGER_REQUIERMENTS: if requirement == 'ram_min': flavor_id = os_utils.get_flavor_id_by_ram_range( - nova, CFY_MANAGER_REQUIERMENTS['ram_min'], 8196) + nova, CFY_MANAGER_REQUIERMENTS['ram_min'], 10000) if flavor_id == '': logger.error( @@ -414,6 +400,11 @@ def main(): if ns: cfy.set_nameservers(ns) + if 'compute' in nova.client.services_url: + cfy.set_nova_url(nova.client.services_url['compute']) + if neutron.httpclient.endpoint_url is not None: + cfy.set_neutron_url(neutron.httpclient.endpoint_url) + logger.info("Prepare virtualenv for cloudify-cli") cmd = "chmod +x " + VIMS_DIR + "create_venv.sh" functest_utils.execute_command(cmd, logger) |