Return all the security group names configured in this action.
2528
def get_action_group_names(self):
        """"""
        return self.get_group_names(
            list(itertools.chain(
                *[self._get_array('add'),
                  self._get_array('remove'),
                  self._get_array('isolation-group')])))
310342
public java.util.List<VpcSecurityGroupMembership> getVpcSecurityGroups() {
        if (vpcSecurityGroups == null) {
            vpcSecurityGroups = new com.amazonaws.internal.SdkInternalList<VpcSecurityGroupMembership>();
        }
        return vpcSecurityGroups;
    }
46527
def get_securitygroup(vm_):
    '''
    
    '''
    sgs = list_securitygroup()
    securitygroup = config.get_cloud_config_value(
        'securitygroup', vm_, __opts__, search_global=False
    )

    if not securitygroup:
        raise SaltCloudNotFound('No securitygroup ID specified for this VM.')

    if securitygroup and six.text_type(securitygroup) in sgs:
        return sgs[securitygroup]['SecurityGroupId']
    raise SaltCloudNotFound(
        'The specified security group, \'{0}\', could not be found.'.format(
            securitygroup)
    )
1020147
def _find_usage_security_groups(self):
        """"""
        num_groups = 0
        # If EC2-Classic isn't available (e.g., a new account)
        # this method will fail with:
        #   Code:    "InvalidParameterValue"
        #   Message: "Use of cache security groups is not permitted in
        #             this API version for your account."
        #   Type:    "Sender"
        try:
            paginator = self.conn.get_paginator(
                'describe_cache_security_groups')
            for page in paginator.paginate():
                for secgroup in page['CacheSecurityGroups']:
                    num_groups += 1
        except ClientError as ex:
            if ex.response['Error']['Code'] != 'InvalidParameterValue':
                raise ex
            logger.debug("caught ClientError checking ElastiCache security "
                         "groups (account without EC2-Classic?)")

        self.limits['Security Groups']._add_current_usage(
            num_groups,
            aws_type='WS::ElastiCache::SecurityGroup'
        )
240102
def get_members_of_group(self, gname):
        
        hostgroup = self.find_by_name(gname)
        if hostgroup:
            return hostgroup.get_services()
        return []
7901
def get_groupnames(self, sgs):
        
        return ','.join([sgs[sg].get_name() for sg in self.servicegroups])
283059
def get_groupnames(self, hostgroups):
        
        group_names = []
        for hostgroup_id in self.hostgroups:
            hostgroup = hostgroups[hostgroup_id]
            group_names.append(hostgroup.get_name())
        return ','.join(sorted(group_names))
912465
def get_secgroup_id(kwargs=None, call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The get_secgroup_id function must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    name = kwargs.get('name', None)
    if name is None:
        raise SaltCloudSystemExit(
            'The get_secgroup_id function requires a \'name\'.'
        )

    try:
        ret = list_security_groups()[name]['id']
    except KeyError:
        raise SaltCloudSystemExit(
            'The security group \'{0}\' could not be found.'.format(name)
        )

    return ret
781504
def get_all_role_config_groups(resource_root, service_name,
    cluster_name="default"):
  
  return call(resource_root.get,
      _get_role_config_groups_path(cluster_name, service_name),
      ApiRoleConfigGroup, True, api_version=3)
194627
def _find_usage_security_groups(self):
        """"""
        vpc_count = 0

        paginator = self.conn.get_paginator('describe_db_security_groups')
        for page in paginator.paginate():
            for group in page['DBSecurityGroups']:
                if 'VpcId' in group and group['VpcId'] is not None:
                    vpc_count += 1
                self.limits['Max auths per security group']._add_current_usage(
                    len(group["EC2SecurityGroups"]) + len(group["IPRanges"]),
                    aws_type='AWS::RDS::DBSecurityGroup',
                    resource_id=group['DBSecurityGroupName']
                )

        self.limits['VPC Security Groups']._add_current_usage(
            vpc_count,
            aws_type='AWS::RDS::DBSecurityGroup',
        )
599995
def list_group_members(self, name):
        
        return self.service.list_group_members(
            name, self.url_prefix, self.auth, self.session,
            self.session_send_opts)
384214
public static List<String> getGroups(String userName, AlluxioConfiguration conf)
      throws IOException {
    GroupMappingService groupMappingService = GroupMappingService.Factory.get(conf);
    return groupMappingService.getGroups(userName);
  }
1297778
def getGroupsURL(certfile, group):
    """"""

    GMS = "https://" + _SERVER + _GMS

    certfile.seek(0)
    buf = certfile.read()

    x509 = crypto.load_certificate(crypto.FILETYPE_PEM, buf)
    sep = ""
    dn = ""
    parts = []
    for i in x509.get_issuer().get_components():
        #print i
        if i[0] in parts:
            continue
        parts.append(i[0])
        dn = i[0] + "=" + i[1] + sep + dn
        sep = ","

    return GMS + "/" + group + "/" + urllib.quote(dn)
1147325
def security_group_id
      resp = ec2.describe_security_groups(filters: [
        {name: "vpc-id", values: [vpc_id]},
        {name: "group-name", values: ["default"]}
      ])
      resp.security_groups.first.group_id
    end
1373000
public java.util.List<SecurityGroupReference> getSecurityGroupReferenceSet() {
        if (securityGroupReferenceSet == null) {
            securityGroupReferenceSet = new com.amazonaws.internal.SdkInternalList<SecurityGroupReference>();
        }
        return securityGroupReferenceSet;
    }
1071240
def groups(self):
        
        group_list = []
        all_groups = self.get('memberof')
        for group_dn in all_groups:
            if self.__ldap_group_ou__ in group_dn:
                group_list.append(group_dn)

        return group_list
1018737
def scope_groups(self):
        
        import ns1.rest.ipam
        return ns1.rest.ipam.Scopegroups(self.config)