Safely pop project parent id

Since we don't support multitenancy yet, we should just pop the
parent id of a project. When keystoneclient supports mulittenancy
we should bring everything in at once (CRUD), and these changes
should be removed.

Change-Id: I82c7c825502124a24ccdbadf09ecb2748887ca5d
This commit is contained in:
Steve Martinelli 2014-12-04 15:34:02 -05:00
parent cc54f989ec
commit 13672123fc
2 changed files with 9 additions and 3 deletions
openstackclient/identity

@ -98,9 +98,9 @@ class CreateProject(show.ShowOne):
else: else:
raise e raise e
info = {} # TODO(stevemar): Remove the line below when we support multitenancy
info.update(project._info) project._info.pop('parent_id', None)
return zip(*sorted(six.iteritems(info))) return zip(*sorted(six.iteritems(project._info)))
class DeleteProject(command.Command): class DeleteProject(command.Command):
@ -279,4 +279,6 @@ class ShowProject(show.ShowOne):
else: else:
raise e raise e
# TODO(stevemar): Remove the line below when we support multitenancy
info.pop('parent_id', None)
return zip(*sorted(six.iteritems(info))) return zip(*sorted(six.iteritems(info)))

@ -111,6 +111,8 @@ class CreateProject(show.ShowOne):
raise e raise e
project._info.pop('links') project._info.pop('links')
# TODO(stevemar): Remove the line below when we support multitenancy
project._info.pop('parent_id', None)
return zip(*sorted(six.iteritems(project._info))) return zip(*sorted(six.iteritems(project._info)))
@ -325,4 +327,6 @@ class ShowProject(show.ShowOne):
parsed_args.project) parsed_args.project)
project._info.pop('links') project._info.pop('links')
# TODO(stevemar): Remove the line below when we support multitenancy
project._info.pop('parent_id', None)
return zip(*sorted(six.iteritems(project._info))) return zip(*sorted(six.iteritems(project._info)))