Replace os-client-config
It was deprecated[1] after the code was merged into openstacksdk[2]. [1] https://review.opendev.org/c/openstack/os-client-config/+/549307 [2] https://review.opendev.org/c/openstack/openstacksdk/+/518128 Change-Id: Id445292a0bdd10751a345b23c50e63f9fd6a2983 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import os_client_config
|
from openstack import config as occ
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
from tempest.lib.cli import base
|
from tempest.lib.cli import base
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
@@ -38,8 +38,8 @@ class AodhClient:
|
|||||||
if self.cloud is None:
|
if self.cloud is None:
|
||||||
auth_args.append("--os-auth-type none")
|
auth_args.append("--os-auth-type none")
|
||||||
elif self.cloud != '':
|
elif self.cloud != '':
|
||||||
conf = os_client_config.OpenStackConfig()
|
conf = occ.OpenStackConfig()
|
||||||
creds = conf.get_one_cloud(cloud=self.cloud).get_auth_args()
|
creds = conf.get_one(cloud=self.cloud).get_auth_args()
|
||||||
auth_args.append(f"--os-auth-url {creds['auth_url']}")
|
auth_args.append(f"--os-auth-url {creds['auth_url']}")
|
||||||
auth_args.append(f"--os-username {creds['username']}")
|
auth_args.append(f"--os-username {creds['username']}")
|
||||||
auth_args.append(f"--os-password {creds['password']}")
|
auth_args.append(f"--os-password {creds['password']}")
|
||||||
@@ -80,8 +80,8 @@ class ClientTestBase(base.ClientTestBase):
|
|||||||
def get_token(self):
|
def get_token(self):
|
||||||
cloud = os.environ.get('OS_ADMIN_CLOUD', 'devstack-admin')
|
cloud = os.environ.get('OS_ADMIN_CLOUD', 'devstack-admin')
|
||||||
if cloud is not None and cloud != "":
|
if cloud is not None and cloud != "":
|
||||||
conf = os_client_config.OpenStackConfig()
|
conf = occ.OpenStackConfig()
|
||||||
region_conf = conf.get_one_cloud(cloud=cloud)
|
region_conf = conf.get_one(cloud=cloud)
|
||||||
return region_conf.get_auth().get_token(region_conf.get_session())
|
return region_conf.get_auth().get_token(region_conf.get_session())
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
os-client-config>=1.28.0 # Apache-2.0
|
|
||||||
coverage>=3.6 # Apache-2.0
|
coverage>=3.6 # Apache-2.0
|
||||||
|
openstacksdk>=0.10.0 # Apache-2.0
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
tempest>=10 # Apache-2.0
|
tempest>=10 # Apache-2.0
|
||||||
stestr>=2.0.0 # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user