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