Change manila_tempest_tests to use credentials_factory
With the merge of 'Factor up config dependent credential classes' in tempest,
(Change-Id: I351f86f0570070105bbf24f2d904e917feea6e57)
helper methods related to credentials have been moved to
common.credentials_factory module.
manila_tempest_tests need to change accordingly.
Change-Id: I9e5c72279638e07f509a4bfe0174b5ad5ee70b45
Closes-Bug: #1519612
diff --git a/manila_tempest_tests/clients_share.py b/manila_tempest_tests/clients_share.py
index 65ee64e..023aa60 100644
--- a/manila_tempest_tests/clients_share.py
+++ b/manila_tempest_tests/clients_share.py
@@ -14,7 +14,7 @@
# under the License.
from tempest import clients
-from tempest.common import cred_provider
+from tempest.common import credentials_factory as common_creds
from manila_tempest_tests.services.share.json import shares_client
from manila_tempest_tests.services.share.v2.json import shares_client \
@@ -22,7 +22,10 @@
class Manager(clients.Manager):
- def __init__(self, credentials=None, service=None):
+ def __init__(
+ self,
+ credentials=common_creds.get_configured_credentials('user'),
+ service=None):
super(Manager, self).__init__(credentials, service)
self.shares_client = shares_client.SharesClient(self.auth_provider)
self.shares_v2_client = shares_v2_client.SharesV2Client(
@@ -32,11 +35,11 @@
class AltManager(Manager):
def __init__(self, service=None):
super(AltManager, self).__init__(
- cred_provider.get_configured_credentials('alt_user'), service)
+ common_creds.get_configured_credentials('alt_user'), service)
class AdminManager(Manager):
def __init__(self, service=None):
super(AdminManager, self).__init__(
- cred_provider.get_configured_credentials('identity_admin'),
+ common_creds.get_configured_credentials('identity_admin'),
service)