diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-01-15 16:04:39 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-01-15 15:13:07 +0000 |
commit | 2e6a5fa9ca2133a20e51aa3fff250171888e1d36 (patch) | |
tree | 67672b33837df8a82a1ddedac032c2e015e21359 /testcases/VIM/OpenStack | |
parent | 3065ed6a59f40cd0cf5c7f1e8b91e059166c10b9 (diff) |
Change novaclient usage
Avoid having this warning:
UserWarning: 'novaclient.v2.client.Client' is not designed to be initialized directly.
Change-Id: I1a9154d97be14007bcb988a5ccd630eadf2e8a5f
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
(cherry picked from commit eb12e95f822c70566cb417e5b5d85a65df14b79c)
Diffstat (limited to 'testcases/VIM/OpenStack')
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/clean_openstack.py | 4 | ||||
-rwxr-xr-x | testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 4 | ||||
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_rally.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py index 866e3a822..96bd172b9 100644 --- a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py +++ b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py @@ -22,7 +22,7 @@ import sys import time import yaml -import novaclient.v2.client as novaclient +from novaclient import client as novaclient from neutronclient.v2_0 import client as neutronclient from keystoneclient.v2_0 import client as keystoneclient from cinderclient import client as cinderclient @@ -355,7 +355,7 @@ def remove_tenants(keystone_client): def main(): creds_nova = functest_utils.get_credentials("nova") - nova_client = novaclient.Client(**creds_nova) + nova_client = novaclient.Client('2',**creds_nova) creds_neutron = functest_utils.get_credentials("neutron") neutron_client = neutronclient.Client(**creds_neutron) diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index a52e7f08a..b5fcd7218 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -22,7 +22,7 @@ import logging import yaml import requests import sys -import novaclient.v2.client as novaclient +from novaclient import client as novaclient from glanceclient import client as glanceclient from keystoneclient.v2_0 import client as keystoneclient from neutronclient.v2_0 import client as neutronclient @@ -261,7 +261,7 @@ def main(): exit(-1) creds_nova = functest_utils.get_credentials("nova") - nova_client = novaclient.Client(**creds_nova) + nova_client = novaclient.Client('2',**creds_nova) creds_neutron = functest_utils.get_credentials("neutron") neutron_client = neutronclient.Client(**creds_neutron) creds_keystone = functest_utils.get_credentials("keystone") diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally.py b/testcases/VIM/OpenStack/CI/libraries/run_rally.py index ba74a720d..d5796c1b4 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally.py @@ -22,7 +22,7 @@ import logging import yaml import requests import sys -import novaclient.v2.client as novaclient +from novaclient import client as novaclient from keystoneclient.v2_0 import client as keystoneclient from glanceclient import client as glanceclient @@ -229,7 +229,7 @@ def main(): exit(-1) creds_nova = functest_utils.get_credentials("nova") - nova_client = novaclient.Client(**creds_nova) + nova_client = novaclient.Client('2',**creds_nova) creds_keystone = functest_utils.get_credentials("keystone") keystone_client = keystoneclient.Client(**creds_keystone) glance_endpoint = keystone_client.service_catalog.url_for(service_type='image', |