diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py index 69028d09a..d5361ddc2 100644 --- a/novaclient/v2/shell.py +++ b/novaclient/v2/shell.py @@ -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.