From 89f1235626cd0dd10b2245f7876eec9ddd16de3c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 1 Jul 2025 00:47:39 +0900 Subject: [PATCH] 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 --- aodhclient/tests/functional/base.py | 10 +++++----- test-requirements.txt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aodhclient/tests/functional/base.py b/aodhclient/tests/functional/base.py index e1b20f3..512b22a 100644 --- a/aodhclient/tests/functional/base.py +++ b/aodhclient/tests/functional/base.py @@ -13,7 +13,7 @@ import os import time -import os_client_config +from openstack import config as occ from oslo_utils import uuidutils from tempest.lib.cli import base from tempest.lib import exceptions @@ -38,8 +38,8 @@ class AodhClient: if self.cloud is None: auth_args.append("--os-auth-type none") elif self.cloud != '': - conf = os_client_config.OpenStackConfig() - creds = conf.get_one_cloud(cloud=self.cloud).get_auth_args() + conf = occ.OpenStackConfig() + 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-username {creds['username']}") auth_args.append(f"--os-password {creds['password']}") @@ -80,8 +80,8 @@ class ClientTestBase(base.ClientTestBase): def get_token(self): cloud = os.environ.get('OS_ADMIN_CLOUD', 'devstack-admin') if cloud is not None and cloud != "": - conf = os_client_config.OpenStackConfig() - region_conf = conf.get_one_cloud(cloud=cloud) + conf = occ.OpenStackConfig() + region_conf = conf.get_one(cloud=cloud) return region_conf.get_auth().get_token(region_conf.get_session()) else: return "" diff --git a/test-requirements.txt b/test-requirements.txt index 213d060..662e7b7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ -os-client-config>=1.28.0 # Apache-2.0 coverage>=3.6 # Apache-2.0 +openstacksdk>=0.10.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 tempest>=10 # Apache-2.0 stestr>=2.0.0 # Apache-2.0