summaryrefslogtreecommitdiff
path: root/openstackclient/identity
diff options
context:
space:
mode:
authorSami MAKKI <mail@samimakki.fr>2018-03-28 16:50:48 +0200
committerJulie Pichon <jpichon@redhat.com>2018-09-26 14:22:16 +0100
commit212e133e5b3e987b7824bb090e355d5b4cb589a4 (patch)
treef62bcb3bb5623f40d8712252227f73898e8402e3 /openstackclient/identity
parent8bd810d8f80c5cf76917b0549244ad15f5866144 (diff)
downloadpython-openstackclient-212e133e5b3e987b7824bb090e355d5b4cb589a4.tar.gz
Fix the `role implies list` command.
The code was calling an unexisting function which never existed. The module refers now to the correct `InferenceRuleManager`. It also allows the compatibility with the future python-keystoneclient in which the compatibility method will be removed from the RoleManager. Conflicts: openstackclient/tests/unit/identity/v3/fakes.py Backport note: Also changed the functional test test_implied_role_list to expect 1 items instead of 3, in line with Queens expectations. The additional 2 implied roles were only added during Rocky in Keystone with Ie18a269e3d1075d955fe494acaf634a393c6bd7b. Story: 2003877 Task: 26736 Change-Id: I08f785dc9e840da2e16915683eecfe49189c44b3 (cherry picked from commit 08dbd154e5da266e44f44386f711a3177e9061bd)
Diffstat (limited to 'openstackclient/identity')
-rw-r--r--openstackclient/identity/v3/implied_role.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstackclient/identity/v3/implied_role.py b/openstackclient/identity/v3/implied_role.py
index c7623389..4e3df88a 100644
--- a/openstackclient/identity/v3/implied_role.py
+++ b/openstackclient/identity/v3/implied_role.py
@@ -71,7 +71,7 @@ class CreateImpliedRole(command.ShowOne):
identity_client = self.app.client_manager.identity
(prior_role_id, implied_role_id) = _get_role_ids(
identity_client, parsed_args)
- response = identity_client.roles.create_implied(
+ response = identity_client.inference_rules.create(
prior_role_id, implied_role_id)
response._info.pop('links', None)
return zip(*sorted([(k, v['id'])
@@ -101,7 +101,7 @@ class DeleteImpliedRole(command.Command):
identity_client = self.app.client_manager.identity
(prior_role_id, implied_role_id) = _get_role_ids(
identity_client, parsed_args)
- identity_client.roles.delete_implied(
+ identity_client.inference_rules.delete(
prior_role_id, implied_role_id)
@@ -125,5 +125,5 @@ class ListImpliedRole(command.Lister):
implies['name'])
identity_client = self.app.client_manager.identity
- response = identity_client.roles.list_inference_roles()
+ response = identity_client.inference_rules.list_inference_roles()
return (self._COLUMNS, _list_implied(response))