def ec2_vpc_subnets(self, lookup, default=None):
    """
    Args:
      lookup - the friendly name of the VPC whose subnets we want
    Returns:
      A comma-separated list of all subnets in use in the named VPC or default/None if no match found
    """
    vpc_id = self.ec2_vpc_vpc_id(lookup)
    if vpc_id is None:
      return default
    subnets = EFAwsResolver.__CLIENTS["ec2"].describe_subnets(Filters=[{
      'Name': 'vpc-id',
      'Values': [vpc_id]
    }])
    if len(subnets["Subnets"]) > 0:
      # Strip the metadata section (subnets["Subnets"])
      subnet_list = [s["SubnetId"] for s in subnets["Subnets"]]
      # Add internal ", " only. This is called literally from: "{{aws...}}" - reuses the outer quotes
      return "\", \"".join(subnet_list)
    else:
      return default
def ec2_vpc_subnets ( self , lookup , default = None ) : vpc_id = self . ec2_vpc_vpc_id ( lookup ) if vpc_id is None : return default subnets = EFAwsResolver . __CLIENTS [ "ec2" ] . describe_subnets ( Filters = [ { 'Name' : 'vpc-id' , 'Values' : [ vpc_id ] } ] ) if len ( subnets [ "Subnets" ] ) > 0 : subnet_list = [ s [ "SubnetId" ] for s in subnets [ "Subnets" ] ] return "\", \"" . join ( subnet_list ) else : return default
Args:
      lookup - the friendly name of the VPC whose subnets we want
    Returns:
      A comma-separated list of all subnets in use in the named VPC or default/None if no match found