Merge "Allow to not specify image if block_device_mapping is set"

This commit is contained in:
Jenkins 2011-12-27 20:09:25 +00:00 committed by Gerrit Code Review
commit eee43516b8

@ -43,8 +43,9 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
raise exceptions.CommandError("min_instances nor max_instances should"
"be 0")
if not args.image:
raise exceptions.CommandError("you need to specify a Image ID ")
if not args.image and not args.block_device_mapping:
raise exceptions.CommandError("you need to specify an Image ID "
"or a block device mapping ")
if not args.flavor:
raise exceptions.CommandError("you need to specify a Flavor ID ")