Evaluate --inherited in role list
the --inherited option was not being passed into keystoneclient Closes-Bug: #1502822 Change-Id: I48170dc67b23cc9b0665b1e0f38118eea952f131
This commit is contained in:
		 Rudolf Vriend
					Rudolf Vriend
				
			
				
					committed by
					
						 Steve Martinelli
						Steve Martinelli
					
				
			
			
				
	
			
			
			 Steve Martinelli
						Steve Martinelli
					
				
			
						parent
						
							e926998700
						
					
				
				
					commit
					7075c90053
				
			| @@ -260,6 +260,7 @@ class ListRole(lister.Lister): | ||||
|             data = identity_client.roles.list( | ||||
|                 user=user, | ||||
|                 domain=domain, | ||||
|                 os_inherit_extension_inherited=parsed_args.inherited | ||||
|             ) | ||||
|             for user_role in data: | ||||
|                 user_role.user = user.name | ||||
| @@ -269,6 +270,7 @@ class ListRole(lister.Lister): | ||||
|             data = identity_client.roles.list( | ||||
|                 user=user, | ||||
|                 project=project, | ||||
|                 os_inherit_extension_inherited=parsed_args.inherited | ||||
|             ) | ||||
|             for user_role in data: | ||||
|                 user_role.user = user.name | ||||
| @@ -278,12 +280,14 @@ class ListRole(lister.Lister): | ||||
|             data = identity_client.roles.list( | ||||
|                 user=user, | ||||
|                 domain='default', | ||||
|                 os_inherit_extension_inherited=parsed_args.inherited | ||||
|             ) | ||||
|         elif parsed_args.group and parsed_args.domain: | ||||
|             columns = ('ID', 'Name', 'Domain', 'Group') | ||||
|             data = identity_client.roles.list( | ||||
|                 group=group, | ||||
|                 domain=domain, | ||||
|                 os_inherit_extension_inherited=parsed_args.inherited | ||||
|             ) | ||||
|             for group_role in data: | ||||
|                 group_role.group = group.name | ||||
| @@ -293,6 +297,7 @@ class ListRole(lister.Lister): | ||||
|             data = identity_client.roles.list( | ||||
|                 group=group, | ||||
|                 project=project, | ||||
|                 os_inherit_extension_inherited=parsed_args.inherited | ||||
|             ) | ||||
|             for group_role in data: | ||||
|                 group_role.group = group.name | ||||
|   | ||||
| @@ -383,6 +383,7 @@ class TestRoleList(TestRole): | ||||
|         kwargs = { | ||||
|             'domain': 'default', | ||||
|             'user': self.users_mock.get(), | ||||
|             'os_inherit_extension_inherited': False | ||||
|         } | ||||
|         # RoleManager.list(user=, group=, domain=, project=, **kwargs) | ||||
|         self.roles_mock.list.assert_called_with( | ||||
| @@ -415,6 +416,7 @@ class TestRoleList(TestRole): | ||||
|         kwargs = { | ||||
|             'domain': self.domains_mock.get(), | ||||
|             'user': self.users_mock.get(), | ||||
|             'os_inherit_extension_inherited': False | ||||
|         } | ||||
|         # RoleManager.list(user=, group=, domain=, project=, **kwargs) | ||||
|         self.roles_mock.list.assert_called_with( | ||||
| @@ -449,6 +451,7 @@ class TestRoleList(TestRole): | ||||
|         kwargs = { | ||||
|             'domain': self.domains_mock.get(), | ||||
|             'group': self.groups_mock.get(), | ||||
|             'os_inherit_extension_inherited': False | ||||
|         } | ||||
|         # RoleManager.list(user=, group=, domain=, project=, **kwargs) | ||||
|         self.roles_mock.list.assert_called_with( | ||||
| @@ -483,6 +486,7 @@ class TestRoleList(TestRole): | ||||
|         kwargs = { | ||||
|             'project': self.projects_mock.get(), | ||||
|             'user': self.users_mock.get(), | ||||
|             'os_inherit_extension_inherited': False | ||||
|         } | ||||
|         # RoleManager.list(user=, group=, domain=, project=, **kwargs) | ||||
|         self.roles_mock.list.assert_called_with( | ||||
| @@ -517,6 +521,7 @@ class TestRoleList(TestRole): | ||||
|         kwargs = { | ||||
|             'project': self.projects_mock.get(), | ||||
|             'group': self.groups_mock.get(), | ||||
|             'os_inherit_extension_inherited': False | ||||
|         } | ||||
|         # RoleManager.list(user=, group=, domain=, project=, **kwargs) | ||||
|         self.roles_mock.list.assert_called_with( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user