in ec2stack/providers/cloudstack/vpcs.py [0:0]
def _create_vpc_request():
"""
Request to create a vpc.
@return: Response.
"""
args = {'command': 'createVPC'}
name = uuid.uuid1()
args['name'] = name
args['displaytext'] = name
args['zoneid'] = zones.get_zone(
current_app.config['CLOUDSTACK_DEFAULT_ZONE'])['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)
return response