Replace keystoneclient with keystoneauth

keystoneclient classes has been long deprecated in favor
of keystoneauth. This change replaces both session and auth
from keystoneclient to keystoneauth.

Change-Id: I803414eb75401699ff5c30813409095718101e26
This commit is contained in:
Gage Hugo 2017-09-14 11:53:16 -05:00
parent e38c516673
commit 4498d9193d
1 changed files with 10 additions and 9 deletions

View File

@ -13,8 +13,8 @@
# under the License.
import congressclient.v1.client as cclient
import keystoneclient
from keystoneclient.v2_0 import client as ksclient
from keystoneauth1 import auth as ksauth
from keystoneauth1 import session as ksasession
from tempest import config
import murano.tests.functional.common.utils as common_utils
@ -28,19 +28,20 @@ class TempestDeployTestMixin(common_utils.DeployTestMixin):
@staticmethod
@common_utils.memoize
def keystone_client():
return ksclient.Client(username=CONF.auth.admin_username,
password=CONF.auth.admin_password,
tenant_name=CONF.auth.admin_project_name,
auth_url=CONF.identity.uri)
return ksauth.identity.v2.Password(
auth_url=CONF.identity.uri,
username=CONF.auth.admin_username,
password=CONF.auth.admin_password,
project_name=CONF.auth.admin_project_name)
@staticmethod
@common_utils.memoize
def congress_client():
auth = keystoneclient.auth.identity.v2.Password(
auth = ksauth.identity.v3.Password(
auth_url=CONF.identity.uri,
username=CONF.auth.admin_username,
password=CONF.auth.admin_password,
tenant_name=CONF.auth.admin_project_name)
session = keystoneclient.session.Session(auth=auth)
project_name=CONF.auth.admin_project_name)
session = ksasession.Session(auth=auth)
return cclient.Client(session=session,
service_type='policy')