Skip to content
Permalink
Browse files
Fix bug where VPC_OFFERING_ID isn't in configuration and user tries t…
…o create vpc
  • Loading branch information
brogand93 committed Aug 7, 2014
1 parent 7c5417e commit 064531a3e4b8cb6f6f6d3293d5abe99afbdfce20
Showing 1 changed file with 8 additions and 1 deletion.
@@ -37,7 +37,14 @@ def _create_vpc_request():
args['displaytext'] = name
args['zoneid'] = zones.get_zone(
current_app.config['CLOUDSTACK_DEFAULT_ZONE'])['id']
args['vpcofferingid'] = current_app.config['VPC_OFFERING_ID']

if 'VPC_OFFERING_ID' in current_app.config:
args['vpcofferingid'] = current_app.config['VPC_OFFERING_ID']
else:
errors.invalid_request(
str('VPC_OFFERING_ID') + " not found in configuration, " +
"please run ec2stack-configure -a True")

args['cidr'] = helpers.get('CidrBlock')

response = requester.make_request_async(args)

0 comments on commit 064531a

Please sign in to comment.