summaryrefslogtreecommitdiff
path: root/openstackclient/identity
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2014-07-20 13:15:02 +1000
committerJamie Lennox <jamielennox@redhat.com>2014-07-21 10:04:47 +1000
commit5e7e94d59e3368b31c52649a0e5cc5018aac27b8 (patch)
treed1046131cac8d8d472c4d56fe98fcddc2e487f68 /openstackclient/identity
parent3cfb97e5ae930767f09c22402c3499c9bbb9eebd (diff)
downloadpython-openstackclient-5e7e94d59e3368b31c52649a0e5cc5018aac27b8.tar.gz
Fix IDP commands
identity_client.identity_providers doesn't exist as a manager. These are located at identity_client.federation.identity_providers. Fix the routes. Also fix passing id to .create() as a positional argument. This is not allowed from keystoneclient it should be passed as a keyword argument. Change-Id: I912c27fcee58b0723e27e9147def2cbd1c62c288
Diffstat (limited to 'openstackclient/identity')
-rw-r--r--openstackclient/identity/v3/identity_provider.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/openstackclient/identity/v3/identity_provider.py b/openstackclient/identity/v3/identity_provider.py
index b60678b5..b9648a1d 100644
--- a/openstackclient/identity/v3/identity_provider.py
+++ b/openstackclient/identity/v3/identity_provider.py
@@ -61,8 +61,8 @@ class CreateIdentityProvider(show.ShowOne):
def take_action(self, parsed_args):
self.log.debug('take_action(%s)', parsed_args)
identity_client = self.app.client_manager.identity
- idp = identity_client.identity_providers.create(
- parsed_args.identity_provider_id,
+ idp = identity_client.federation.identity_providers.create(
+ id=parsed_args.identity_provider_id,
description=parsed_args.description,
enabled=parsed_args.enabled)
info = {}
@@ -87,7 +87,7 @@ class DeleteIdentityProvider(command.Command):
def take_action(self, parsed_args):
self.log.debug('take_action(%s)', parsed_args)
identity_client = self.app.client_manager.identity
- identity_client.identity_providers.delete(
+ identity_client.federation.identity_providers.delete(
parsed_args.identity_provider)
return
@@ -100,7 +100,8 @@ class ListIdentityProvider(lister.Lister):
def take_action(self, parsed_args):
self.log.debug('take_action(%s)', parsed_args)
columns = ('ID', 'Enabled', 'Description')
- data = self.app.client_manager.identity.identity_providers.list()
+ identity_client = self.app.client_manager.identity
+ data = identity_client.federation.identity_providers.list()
return (columns,
(utils.get_item_properties(
s, columns,
@@ -136,7 +137,7 @@ class SetIdentityProvider(command.Command):
def take_action(self, parsed_args):
self.log.debug('take_action(%s)', parsed_args)
- identity_client = self.app.client_manager.identity
+ federation_client = self.app.client_manager.identity.federation
if parsed_args.enable is True:
enabled = True
@@ -147,7 +148,7 @@ class SetIdentityProvider(command.Command):
"no arguments present")
return (None, None)
- identity_provider = identity_client.identity_providers.update(
+ identity_provider = federation_client.identity_providers.update(
parsed_args.identity_provider, enabled=enabled)
info = {}
info.update(identity_provider._info)
@@ -172,7 +173,7 @@ class ShowIdentityProvider(show.ShowOne):
self.log.debug('take_action(%s)', parsed_args)
identity_client = self.app.client_manager.identity
identity_provider = utils.find_resource(
- identity_client.identity_providers,
+ identity_client.federation.identity_providers,
parsed_args.identity_provider)
info = {}