summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-12-03 02:16:55 +0000
committerGerrit Code Review <review@openstack.org>2015-12-03 02:16:55 +0000
commit30eaf80506ce4dbd7a7d5259a2b933c34851f27e (patch)
tree5eba586d8b03cdb97886361cab588f76cea0898f
parent0ed23b2f3e2ea722f686ca69c42219d73c39288a (diff)
parent69a3d999c2a1119656243422a8185e32240311eb (diff)
Merge "Change manila_tempest_tests to use credentials_factory"2.0.0.0b1
-rwxr-xr-xcontrib/ci/common.sh2
-rw-r--r--manila_tempest_tests/clients_share.py11
-rw-r--r--manila_tempest_tests/tests/api/base.py8
-rw-r--r--manila_tempest_tests/tests/scenario/test_share_basic_ops.py6
4 files changed, 17 insertions, 10 deletions
diff --git a/contrib/ci/common.sh b/contrib/ci/common.sh
index 609f61f..a541bd4 100755
--- a/contrib/ci/common.sh
+++ b/contrib/ci/common.sh
@@ -1,6 +1,6 @@
1# Environment variables 1# Environment variables
2 2
3export MANILA_TEMPEST_COMMIT="c43c8f91" # 05 Nov, 2015 3export MANILA_TEMPEST_COMMIT="d160c29b" # 01 Dec, 2015
4 4
5# ---------------------------------------------- 5# ----------------------------------------------
6 6
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 @@
14# under the License. 14# under the License.
15 15
16from tempest import clients 16from tempest import clients
17from tempest.common import cred_provider 17from tempest.common import credentials_factory as common_creds
18 18
19from manila_tempest_tests.services.share.json import shares_client 19from manila_tempest_tests.services.share.json import shares_client
20from manila_tempest_tests.services.share.v2.json import shares_client \ 20from manila_tempest_tests.services.share.v2.json import shares_client \
@@ -22,7 +22,10 @@ from manila_tempest_tests.services.share.v2.json import shares_client \
22 22
23 23
24class Manager(clients.Manager): 24class Manager(clients.Manager):
25 def __init__(self, credentials=None, service=None): 25 def __init__(
26 self,
27 credentials=common_creds.get_configured_credentials('user'),
28 service=None):
26 super(Manager, self).__init__(credentials, service) 29 super(Manager, self).__init__(credentials, service)
27 self.shares_client = shares_client.SharesClient(self.auth_provider) 30 self.shares_client = shares_client.SharesClient(self.auth_provider)
28 self.shares_v2_client = shares_v2_client.SharesV2Client( 31 self.shares_v2_client = shares_v2_client.SharesV2Client(
@@ -32,11 +35,11 @@ class Manager(clients.Manager):
32class AltManager(Manager): 35class AltManager(Manager):
33 def __init__(self, service=None): 36 def __init__(self, service=None):
34 super(AltManager, self).__init__( 37 super(AltManager, self).__init__(
35 cred_provider.get_configured_credentials('alt_user'), service) 38 common_creds.get_configured_credentials('alt_user'), service)
36 39
37 40
38class AdminManager(Manager): 41class AdminManager(Manager):
39 def __init__(self, service=None): 42 def __init__(self, service=None):
40 super(AdminManager, self).__init__( 43 super(AdminManager, self).__init__(
41 cred_provider.get_configured_credentials('identity_admin'), 44 common_creds.get_configured_credentials('identity_admin'),
42 service) 45 service)
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index de7c542..be56719 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -21,6 +21,7 @@ import traceback
21from oslo_concurrency import lockutils 21from oslo_concurrency import lockutils
22from oslo_log import log 22from oslo_log import log
23import six 23import six
24from tempest.common import credentials_factory as common_creds
24from tempest.common import dynamic_creds 25from tempest.common import dynamic_creds
25from tempest import config 26from tempest import config
26from tempest import test 27from tempest import test
@@ -153,7 +154,9 @@ class BaseSharesTest(test.BaseTestCase):
153 ic = dynamic_creds.DynamicCredentialProvider( 154 ic = dynamic_creds.DynamicCredentialProvider(
154 identity_version=CONF.identity.auth_version, 155 identity_version=CONF.identity.auth_version,
155 name=name, 156 name=name,
156 admin_role=CONF.identity.admin_role) 157 admin_role=CONF.identity.admin_role,
158 admin_creds=common_creds.get_configured_credentials(
159 'identity_admin'))
157 if "admin" in type_of_creds: 160 if "admin" in type_of_creds:
158 creds = ic.get_admin_creds() 161 creds = ic.get_admin_creds()
159 elif "alt" in type_of_creds: 162 elif "alt" in type_of_creds:
@@ -290,7 +293,8 @@ class BaseSharesTest(test.BaseTestCase):
290 identity_version=CONF.identity.auth_version, 293 identity_version=CONF.identity.auth_version,
291 name=service_net_name, 294 name=service_net_name,
292 admin_role=CONF.identity.admin_role, 295 admin_role=CONF.identity.admin_role,
293 ) 296 admin_creds=common_creds.get_configured_credentials(
297 'identity_admin'))
294 net_data = ic._create_network_resources(sc.tenant_id) 298 net_data = ic._create_network_resources(sc.tenant_id)
295 network, subnet, router = net_data 299 network, subnet, router = net_data
296 net_id = network["id"] 300 net_id = network["id"]
diff --git a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
index c26cbab..7de8870 100644
--- a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
+++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
@@ -78,13 +78,13 @@ class ShareBasicOpsBase(manager.ShareScenarioTest):
78 78
79 def init_ssh(self, instance, do_ping=False): 79 def init_ssh(self, instance, do_ping=False):
80 # Obtain a floating IP 80 # Obtain a floating IP
81 floating_ip = (self.floating_ips_client.create_floating_ip() 81 floating_ip = (self.compute_floating_ips_client.create_floating_ip()
82 ['floating_ip']) 82 ['floating_ip'])
83 self.addCleanup(self.delete_wrapper, 83 self.addCleanup(self.delete_wrapper,
84 self.floating_ips_client.delete_floating_ip, 84 self.compute_floating_ips_client.delete_floating_ip,
85 floating_ip['id']) 85 floating_ip['id'])
86 # Attach a floating IP 86 # Attach a floating IP
87 self.floating_ips_client.associate_floating_ip_to_server( 87 self.compute_floating_ips_client.associate_floating_ip_to_server(
88 floating_ip['ip'], instance['id']) 88 floating_ip['ip'], instance['id'])
89 # Check ssh 89 # Check ssh
90 ssh_client = self.get_remote_client( 90 ssh_client = self.get_remote_client(