def setup_subnets(self):
    zones = get_zones(self.region)
    subnets = {}
    for (zone_index, zone) in enumerate(sorted(zones.keys())):
        vpc_zone_tag = SUBNET_PREFIX_FORMAT.format(zone)
        zone_cidr = self.metadata['zone_cidr_format'].format(get_cidr_prefix(self.metadata, self.region), ((zone_index + 1) * 16))
        subnet = create_subnet(self.client, self.vpc, zone, zone_cidr, vpc_zone_tag)
        subnets[zone] = subnet
    self.subnets = subnets
def setup_subnets(self):
    zones = get_zones(self.region)
    subnets = {}
    for (zone_index, zone) in enumerate(sorted(zones.keys())):
        vpc_zone_tag = SUBNET_PREFIX_FORMAT.format(zone)
        zone_cidr = self.metadata['zone_cidr_format'].format(get_cidr_prefix(self.metadata, self.region), ((zone_index + 1) * 16))
        subnet = create_subnet(self.client, self.vpc, zone, zone_cidr, vpc_zone_tag)
        subnets[zone] = subnet
    self.subnets = subnets