Merge "Don't put --builder in image_group"

This commit is contained in:
Jenkins 2016-07-21 16:51:05 +00:00 committed by Gerrit Code Review
commit 4decfb4328
2 changed files with 10 additions and 1 deletions

View File

@ -280,6 +280,15 @@ class TestOvercloudImageBuild(TestPluginV1):
parsed_args = self.check_parser(self.cmd, ['--all'], [])
self.assertRaises(RuntimeError, self.cmd.take_action, parsed_args)
def test_pass_builder(self):
argslist = ['--builder', 'foo', '--all']
verifylist = [('builder', 'foo'), ('all', True)]
# NOTE(bnemec): At this time there is only one allowed option for
# --builder, so to verify that it actually parses we have to patch
# another one in.
with mock.patch.object(self.cmd, '_BUILDERS', ['dib', 'foo']):
self.check_parser(self.cmd, argslist, verifylist)
class TestUploadOvercloudImage(TestPluginV1):
def setUp(self):

View File

@ -385,7 +385,7 @@ class BuildOvercloudImage(command.Command):
default='',
help=_("Extra arguments for the image builder"),
)
image_group.add_argument(
parser.add_argument(
"--builder",
dest="builder",
metavar='<builder>',