Skip to content

Commit 6527f32

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix trust create"
2 parents bf5bca2 + 2b5062d commit 6527f32

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

magnum/common/keystone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def create_trust(self, trustee_user):
211211
project=trustor_project_id,
212212
trustee_user=trustee_user,
213213
impersonation=True,
214-
delegation_depth=0,
214+
allow_redelegation=False,
215215
role_names=roles)
216216
except Exception:
217217
LOG.exception('Failed to create trust')

magnum/tests/unit/common/test_keystone.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def test_create_trust_with_all_roles(self, mock_session, mock_ks):
156156
ks_client.create_trust(trustee_user='888888')
157157

158158
mock_ks.return_value.trusts.create.assert_called_once_with(
159-
delegation_depth=0,
159+
allow_redelegation=False,
160160
trustor_user='123456', project='654321',
161161
trustee_user='888888', role_names=['role1', 'role2'],
162162
impersonation=True)
@@ -173,7 +173,7 @@ def test_create_trust_with_limit_roles(self, mock_session, mock_ks):
173173
ks_client.create_trust(trustee_user='888888')
174174

175175
mock_ks.return_value.trusts.create.assert_called_once_with(
176-
delegation_depth=0,
176+
allow_redelegation=False,
177177
trustor_user='123456', project='654321',
178178
trustee_user='888888', role_names=['role3'],
179179
impersonation=True)

0 commit comments

Comments
 (0)