Skip to content

Commit 1b916da

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Enabling domain lookup for project set v3 command"
2 parents 5aeb831 + 66931c6 commit 1b916da

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

openstackclient/identity/v3/project.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,12 @@ def take_action(self, parsed_args):
283283
and not parsed_args.disable):
284284
return
285285

286-
project = utils.find_resource(
287-
identity_client.projects,
288-
parsed_args.project,
289-
)
286+
project = common.find_project(identity_client, parsed_args.project,
287+
parsed_args.domain)
290288

291289
kwargs = {}
292290
if parsed_args.name:
293291
kwargs['name'] = parsed_args.name
294-
if parsed_args.domain:
295-
kwargs['domain'] = parsed_args.domain
296292
if parsed_args.description:
297293
kwargs['description'] = parsed_args.description
298294
if parsed_args.enable:

openstackclient/tests/identity/v3/test_project.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,6 @@ def test_project_set_name(self):
636636
# Set expected values
637637
kwargs = {
638638
'name': 'qwerty',
639-
'domain': identity_fakes.domain_id,
640639
}
641640
# ProjectManager.update(project, name=, domain=, description=,
642641
# enabled=, **kwargs)
@@ -665,7 +664,6 @@ def test_project_set_description(self):
665664

666665
# Set expected values
667666
kwargs = {
668-
'domain': identity_fakes.domain_id,
669667
'description': 'new desc',
670668
}
671669
self.projects_mock.update.assert_called_with(
@@ -692,7 +690,6 @@ def test_project_set_enable(self):
692690

693691
# Set expected values
694692
kwargs = {
695-
'domain': identity_fakes.domain_id,
696693
'enabled': True,
697694
}
698695
self.projects_mock.update.assert_called_with(
@@ -719,7 +716,6 @@ def test_project_set_disable(self):
719716

720717
# Set expected values
721718
kwargs = {
722-
'domain': identity_fakes.domain_id,
723719
'enabled': False,
724720
}
725721
self.projects_mock.update.assert_called_with(
@@ -746,7 +742,6 @@ def test_project_set_property(self):
746742

747743
# Set expected values
748744
kwargs = {
749-
'domain': identity_fakes.domain_id,
750745
'fee': 'fi',
751746
'fo': 'fum',
752747
}

0 commit comments

Comments
 (0)