Merge "Enabling domain lookup for project set v3 command"
This commit is contained in:
		@@ -283,16 +283,12 @@ class SetProject(command.Command):
 | 
				
			|||||||
                and not parsed_args.disable):
 | 
					                and not parsed_args.disable):
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        project = utils.find_resource(
 | 
					        project = common.find_project(identity_client, parsed_args.project,
 | 
				
			||||||
            identity_client.projects,
 | 
					                                      parsed_args.domain)
 | 
				
			||||||
            parsed_args.project,
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        kwargs = {}
 | 
					        kwargs = {}
 | 
				
			||||||
        if parsed_args.name:
 | 
					        if parsed_args.name:
 | 
				
			||||||
            kwargs['name'] = parsed_args.name
 | 
					            kwargs['name'] = parsed_args.name
 | 
				
			||||||
        if parsed_args.domain:
 | 
					 | 
				
			||||||
            kwargs['domain'] = parsed_args.domain
 | 
					 | 
				
			||||||
        if parsed_args.description:
 | 
					        if parsed_args.description:
 | 
				
			||||||
            kwargs['description'] = parsed_args.description
 | 
					            kwargs['description'] = parsed_args.description
 | 
				
			||||||
        if parsed_args.enable:
 | 
					        if parsed_args.enable:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -636,7 +636,6 @@ class TestProjectSet(TestProject):
 | 
				
			|||||||
        # Set expected values
 | 
					        # Set expected values
 | 
				
			||||||
        kwargs = {
 | 
					        kwargs = {
 | 
				
			||||||
            'name': 'qwerty',
 | 
					            'name': 'qwerty',
 | 
				
			||||||
            'domain': identity_fakes.domain_id,
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        # ProjectManager.update(project, name=, domain=, description=,
 | 
					        # ProjectManager.update(project, name=, domain=, description=,
 | 
				
			||||||
        #                       enabled=, **kwargs)
 | 
					        #                       enabled=, **kwargs)
 | 
				
			||||||
@@ -665,7 +664,6 @@ class TestProjectSet(TestProject):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Set expected values
 | 
					        # Set expected values
 | 
				
			||||||
        kwargs = {
 | 
					        kwargs = {
 | 
				
			||||||
            'domain': identity_fakes.domain_id,
 | 
					 | 
				
			||||||
            'description': 'new desc',
 | 
					            'description': 'new desc',
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        self.projects_mock.update.assert_called_with(
 | 
					        self.projects_mock.update.assert_called_with(
 | 
				
			||||||
@@ -692,7 +690,6 @@ class TestProjectSet(TestProject):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Set expected values
 | 
					        # Set expected values
 | 
				
			||||||
        kwargs = {
 | 
					        kwargs = {
 | 
				
			||||||
            'domain': identity_fakes.domain_id,
 | 
					 | 
				
			||||||
            'enabled': True,
 | 
					            'enabled': True,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        self.projects_mock.update.assert_called_with(
 | 
					        self.projects_mock.update.assert_called_with(
 | 
				
			||||||
@@ -719,7 +716,6 @@ class TestProjectSet(TestProject):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Set expected values
 | 
					        # Set expected values
 | 
				
			||||||
        kwargs = {
 | 
					        kwargs = {
 | 
				
			||||||
            'domain': identity_fakes.domain_id,
 | 
					 | 
				
			||||||
            'enabled': False,
 | 
					            'enabled': False,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        self.projects_mock.update.assert_called_with(
 | 
					        self.projects_mock.update.assert_called_with(
 | 
				
			||||||
@@ -746,7 +742,6 @@ class TestProjectSet(TestProject):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Set expected values
 | 
					        # Set expected values
 | 
				
			||||||
        kwargs = {
 | 
					        kwargs = {
 | 
				
			||||||
            'domain': identity_fakes.domain_id,
 | 
					 | 
				
			||||||
            'fee': 'fi',
 | 
					            'fee': 'fi',
 | 
				
			||||||
            'fo': 'fum',
 | 
					            'fo': 'fum',
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user