Merge "Check flavor option before image checks"

This commit is contained in:
Jenkins 2015-11-12 17:01:59 +00:00 committed by Gerrit Code Review
commit e88df234da
1 changed files with 3 additions and 3 deletions

View File

@ -154,6 +154,9 @@ def _parse_block_device_mapping_v2(args, image):
def _boot(cs, args):
"""Boot a new server."""
if not args.flavor:
raise exceptions.CommandError(_("you need to specify a Flavor ID."))
if args.image:
image = _find_image(cs, args.image)
else:
@ -166,9 +169,6 @@ def _boot(cs, args):
# are selecting the first of many?
image = images[0]
if not args.flavor:
raise exceptions.CommandError(_("you need to specify a Flavor ID "))
min_count = 1
max_count = 1
# Don't let user mix num_instances and max_count/min_count.