View on GitHub

Automation for AWS VPC management, built on top of boto.

Methods and attributes exposed by veep.VPC

get_regions()

Returns a list of veep.VPC.region objects for all non-blacklisted regions (see veep.Config.blacklists).

find(ids=list, names=list)

Returns a list of veep.VPC.vpc objects matching the parameters specified. With no parameters, the function returns all "Managed" vpcs- these are vpcs with an "Environment" tag as assigned by veep at creation time.

connect_to_region(name)

returns a veep.VPC.Region object connected to the region specified by name.

Methods and attributes of the veep.VPC.vpc object

get_name()

returns the vpc's name (contents of the Name tag, defaults to the concat of region name and vpc env).

set_name(name)

Sets the vpc's name.

get_env()

returns the vpc's environment name (Contents of the Environment tag).

set_env(env)

sets the vpc's environment name

get_cidr()

returns the cidr block allocated to the vpc.

get_igw()

returns the Internet Gateway attached to this vpc.

add_igw()

Creates a new Internet Gateway and attaches it to this vpc, returning it on success.

get_tiers(name=name)

Returns a list of Tier objects contained in this vpc.

add_tier(tier_name, cidr_block, subnet_size=21)

Creates a new Tier object and associates it with this vpc. Subnets for each availability zone will be created out of cidr_block, of subnet_size.

delete_tier(tier)

Removes a tier and its associated subnets from this vpc.

rename_tier(old, new)

Renames an existing tier by name.

get_tables(name=name)

Returns route tables associated with this vpc. If name is specified, only return matching tables.

create_table(name=name)

Creates a new route table, named name, and associates it with this vpc.

delete_table(table=table, name=name, id=id)

Deletes a route table associated with this vpc. Select by passing either a table, it's name or ID.

sg_rule(**kwargs)

text

get_secgrps(**kwargs)

text

create_secgrp(**kwargs)

text

update_secgrp(**kwargs)

text

delete_secgrp(**kwargs)

text