summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-12 17:01:59 +0000
committerGerrit Code Review <review@openstack.org>2015-11-12 17:01:59 +0000
commite88df234dabcdf747fe2f514b11bfc46c12f357f (patch)
treeeb8f26664437c8e542992cebf6eaaaef2b1471b4
parentfd13e89c46eac108c6e4cf7559d0c3c160204030 (diff)
parentc6a3c766ee336a6ba873b041a5ec5711a20a911a (diff)
downloadpython-novaclient-2.35.0.tar.gz
Merge "Check flavor option before image checks"2.35.0
-rw-r--r--novaclient/v2/shell.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py
index 69028d09..d5361ddc 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.