diff --git a/magnum/common/keystone.py b/magnum/common/keystone.py index cbc95f193c..6354ee7dda 100644 --- a/magnum/common/keystone.py +++ b/magnum/common/keystone.py @@ -211,7 +211,7 @@ def create_trust(self, trustee_user): project=trustor_project_id, trustee_user=trustee_user, impersonation=True, - delegation_depth=0, + allow_redelegation=False, role_names=roles) except Exception: LOG.exception('Failed to create trust') diff --git a/magnum/tests/unit/common/test_keystone.py b/magnum/tests/unit/common/test_keystone.py index 4b69f03009..6e1e5e5e7f 100644 --- a/magnum/tests/unit/common/test_keystone.py +++ b/magnum/tests/unit/common/test_keystone.py @@ -156,7 +156,7 @@ def test_create_trust_with_all_roles(self, mock_session, mock_ks): ks_client.create_trust(trustee_user='888888') mock_ks.return_value.trusts.create.assert_called_once_with( - delegation_depth=0, + allow_redelegation=False, trustor_user='123456', project='654321', trustee_user='888888', role_names=['role1', 'role2'], impersonation=True) @@ -173,7 +173,7 @@ def test_create_trust_with_limit_roles(self, mock_session, mock_ks): ks_client.create_trust(trustee_user='888888') mock_ks.return_value.trusts.create.assert_called_once_with( - delegation_depth=0, + allow_redelegation=False, trustor_user='123456', project='654321', trustee_user='888888', role_names=['role3'], impersonation=True)