Search by user defined ID for identity providers

IDs for service providers can be user defined (like, Bob). This
causes issues with the usual get by ID method.

Keystone server side has implemented changes to search by ID when
listing, which should resolve the issue with minimal changes to
the client side.

Change-Id: Ic58df22b3445d3293a8e1c76c5da79badebf6528
Closes-Bug: 1479837
This commit is contained in:
Steve Martinelli 2016-03-11 04:13:21 -05:00 committed by Steve Martinelli
parent 17bc850440
commit 21530d026e
2 changed files with 3 additions and 1 deletions

View File

@ -214,7 +214,8 @@ class ShowIdentityProvider(command.ShowOne):
identity_client = self.app.client_manager.identity
idp = utils.find_resource(
identity_client.federation.identity_providers,
parsed_args.identity_provider)
parsed_args.identity_provider,
id=parsed_args.identity_provider)
idp._info.pop('links', None)
remote_ids = utils.format_list(idp._info.pop('remote_ids', []))

View File

@ -616,6 +616,7 @@ class TestIdentityProviderShow(TestIdentityProvider):
self.identity_providers_mock.get.assert_called_with(
identity_fakes.idp_id,
id='test_idp'
)
collist = ('description', 'enabled', 'id', 'remote_ids')