From 212e133e5b3e987b7824bb090e355d5b4cb589a4 Mon Sep 17 00:00:00 2001 From: Sami MAKKI Date: Wed, 28 Mar 2018 16:50:48 +0200 Subject: 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) --- openstackclient/identity/v3/implied_role.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openstackclient/identity') 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)) -- cgit v1.2.1