Skip to content

Commit 1367212

Browse files
author
Steve Martinelli
committed
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
1 parent cc54f98 commit 1367212

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎openstackclient/identity/v2_0/project.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def take_action(self, parsed_args):
9898
else:
9999
raise e
100100

101-
info = {}
102-
info.update(project._info)
103-
return zip(*sorted(six.iteritems(info)))
101+
# TODO(stevemar): Remove the line below when we support multitenancy
102+
project._info.pop('parent_id', None)
103+
return zip(*sorted(six.iteritems(project._info)))
104104

105105

106106
class DeleteProject(command.Command):
@@ -279,4 +279,6 @@ def take_action(self, parsed_args):
279279
else:
280280
raise e
281281

282+
# TODO(stevemar): Remove the line below when we support multitenancy
283+
info.pop('parent_id', None)
282284
return zip(*sorted(six.iteritems(info)))

‎openstackclient/identity/v3/project.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def take_action(self, parsed_args):
111111
raise e
112112

113113
project._info.pop('links')
114+
# TODO(stevemar): Remove the line below when we support multitenancy
115+
project._info.pop('parent_id', None)
114116
return zip(*sorted(six.iteritems(project._info)))
115117

116118

@@ -325,4 +327,6 @@ def take_action(self, parsed_args):
325327
parsed_args.project)
326328

327329
project._info.pop('links')
330+
# TODO(stevemar): Remove the line below when we support multitenancy
331+
project._info.pop('parent_id', None)
328332
return zip(*sorted(six.iteritems(project._info)))

0 commit comments

Comments
 (0)