Merge "Change 'Member' role reference to 'member'"
This commit is contained in:
commit
a0ee8b4ccf
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
``Member`` role has been deprecated and replaced by ``member``. Therefore
|
||||
the default value of config option ``[object-storage].operator_role`` is
|
||||
changed to ``member``. (Fixes bug #1330132)
|
@ -1021,7 +1021,7 @@ ObjectStoreGroup = [
|
||||
help="Number of seconds to wait while looping to check the "
|
||||
"status of a container to container synchronization"),
|
||||
cfg.StrOpt('operator_role',
|
||||
default='Member',
|
||||
default='member',
|
||||
help="Role to add to users created for swift tests to "
|
||||
"enable creating containers"),
|
||||
cfg.StrOpt('reseller_admin_role',
|
||||
|
@ -207,10 +207,10 @@ class DynamicCredentialProvider(cred_provider.CredentialProvider):
|
||||
# our newly created user has a role on the newly created project.
|
||||
if self.identity_version == 'v3' and not role_assigned:
|
||||
try:
|
||||
self.creds_client.create_user_role('Member')
|
||||
self.creds_client.create_user_role('member')
|
||||
except lib_exc.Conflict:
|
||||
LOG.warning('Member role already exists, ignoring conflict.')
|
||||
self.creds_client.assign_user_role(user, project, 'Member')
|
||||
LOG.warning('member role already exists, ignoring conflict.')
|
||||
self.creds_client.assign_user_role(user, project, 'member')
|
||||
|
||||
creds = self.creds_client.get_credentials(user, project, user_password)
|
||||
return cred_provider.TestResources(creds)
|
||||
|
@ -111,7 +111,7 @@ class TestDynamicCredentialProvider(base.TestCase):
|
||||
(200,
|
||||
{'roles': [{'id': id, 'name': name},
|
||||
{'id': '1', 'name': 'FakeRole'},
|
||||
{'id': '2', 'name': 'Member'}]}))))
|
||||
{'id': '2', 'name': 'member'}]}))))
|
||||
return roles_fix
|
||||
|
||||
def _mock_list_2_roles(self):
|
||||
@ -140,7 +140,7 @@ class TestDynamicCredentialProvider(base.TestCase):
|
||||
return_value=(rest_client.ResponseBody
|
||||
(200, {'roles': [
|
||||
{'id': '1', 'name': 'FakeRole'},
|
||||
{'id': '2', 'name': 'Member'}]}))))
|
||||
{'id': '2', 'name': 'member'}]}))))
|
||||
return roles_fix
|
||||
|
||||
def _mock_list_ec2_credentials(self, user_id, tenant_id):
|
||||
@ -665,6 +665,6 @@ class TestDynamicCredentialProviderV3(TestDynamicCredentialProvider):
|
||||
with mock.patch('tempest.lib.common.dynamic_creds.LOG') as log_mock:
|
||||
creds._create_creds()
|
||||
log_mock.warning.assert_called_once_with(
|
||||
"Member role already exists, ignoring conflict.")
|
||||
"member role already exists, ignoring conflict.")
|
||||
creds.creds_client.assign_user_role.assert_called_once_with(
|
||||
mock.ANY, mock.ANY, 'Member')
|
||||
mock.ANY, mock.ANY, 'member')
|
||||
|
Loading…
Reference in New Issue
Block a user