def _get_securitygroupname_id(securitygroupname_list):
 securitygroupid_set = set()
 if (not isinstance(securitygroupname_list, list)):
  securitygroupname_list = [securitygroupname_list]
 params = {'Action': 'DescribeSecurityGroups'}
 for sg in aws.query(params, location=get_location(), provider=get_provider(), opts=__opts__, sigver='4'):
  if (sg['groupName'] in securitygroupname_list):
   log.debug('AWS SecurityGroup ID of {0} is {1}'.format(sg['groupName'], sg['groupId']))
   securitygroupid_set.add(sg['groupId'])
 return list(securitygroupid_set)

def _get_securitygroupname_id ( securitygroupname_list ) : securitygroupid_set = set ( ) if ( not isinstance ( securitygroupname_list , list ) ) : securitygroupname_list = [ securitygroupname_list ] params = { 'Action' : 'DescribeSecurityGroups' } for sg in aws . query ( params , location = get_location ( ) , provider = get_provider ( ) , opts = __opts__ , sigver = '4' ) : if ( sg [ 'groupName' ] in securitygroupname_list ) : log . debug ( 'AWS SecurityGroup ID of {0} is {1}' . format ( sg [ 'groupName' ] , sg [ 'groupId' ] ) ) securitygroupid_set . add ( sg [ 'groupId' ] ) return list ( securitygroupid_set )
returns the securitygroupid of a securitygroupname to use .