Add a member (service) to this servicegroup

        :param service_name: member (service) name
        :type service_name: str
        :param servicegroup_name: servicegroup name
        :type servicegroup_name: str
        :return: None
505162
def add_member(self, service_name, servicegroup_name):
        
        servicegroup = self.find_by_name(servicegroup_name)
        if not servicegroup:
            servicegroup = Servicegroup({'servicegroup_name': servicegroup_name,
                                         'alias': servicegroup_name,
                                         'members': service_name})
            self.add(servicegroup)
        else:
            servicegroup.add_members(service_name)
1192025
def add_update_callback(self, group=None, name=None, cb=None):
        
        if not group and not name:
            self.all_update_callback.add_callback(cb)
        elif not name:
            if group not in self.group_update_callbacks:
                self.group_update_callbacks[group] = Caller()
            self.group_update_callbacks[group].add_callback(cb)
        else:
            paramname = '{}.{}'.format(group, name)
            if paramname not in self.param_update_callbacks:
                self.param_update_callbacks[paramname] = Caller()
            self.param_update_callbacks[paramname].add_callback(cb)
865247
public static base_response rename(nitro_service client, servicegroup resource, String new_servicegroupname) throws Exception {
		servicegroup renameresource = new servicegroup();
		renameresource.servicegroupname = resource.servicegroupname;
		return renameresource.rename_resource(client,new_servicegroupname);
	}
35827
def _servicegroup_get(sg_name, **connection_args):
    '''
    
    '''
    nitro = _connect(**connection_args)
    if nitro is None:
        return None
    sg = NSServiceGroup()
    sg.set_servicegroupname(sg_name)
    try:
        sg = NSServiceGroup.get(nitro, sg)
    except NSNitroError as error:
        log.debug('netscaler module error - NSServiceGroup.get() failed: %s', error)
        sg = None
    _disconnect(nitro)
    return sg
342951
def add_members(self, group_jid, peer_jids: Union[str, List[str]]):
        
        log.info("[+] Adding some members to the group {}".format(group_jid))
        return self._send_xmpp_element(group_adminship.AddMembersRequest(group_jid, peer_jids))
1201598
def add(name, **kwargs):
    '''
    
    '''
    if not info(name):
        comp_obj = _get_computer_object()
        try:
            new_group = comp_obj.Create('group', name)
            new_group.SetInfo()
            log.info('Successfully created group %s', name)
        except pywintypes.com_error as exc:
            msg = 'Failed to create group {0}. {1}'.format(
                name, win32api.FormatMessage(exc.excepinfo[5]))
            log.error(msg)
            return False
    else:
        log.warning('The group %s already exists.', name)
        return False
    return True
711959
def add_service_server(service_server)
      @master.register_service(service_server.service_name,
                               service_server.service_uri)
      service_server.set_manager(self)
      @service_servers.push(service_server)
      service_server
    end
50167
public static base_response add(nitro_service client, service resource) throws Exception {
		service addresource = new service();
		addresource.name = resource.name;
		addresource.ip = resource.ip;
		addresource.servername = resource.servername;
		addresource.servicetype = resource.servicetype;
		addresource.port = resource.port;
		addresource.cleartextport = resource.cleartextport;
		addresource.cachetype = resource.cachetype;
		addresource.maxclient = resource.maxclient;
		addresource.healthmonitor = resource.healthmonitor;
		addresource.maxreq = resource.maxreq;
		addresource.cacheable = resource.cacheable;
		addresource.cip = resource.cip;
		addresource.cipheader = resource.cipheader;
		addresource.usip = resource.usip;
		addresource.pathmonitor = resource.pathmonitor;
		addresource.pathmonitorindv = resource.pathmonitorindv;
		addresource.useproxyport = resource.useproxyport;
		addresource.sc = resource.sc;
		addresource.sp = resource.sp;
		addresource.rtspsessionidremap = resource.rtspsessionidremap;
		addresource.clttimeout = resource.clttimeout;
		addresource.svrtimeout = resource.svrtimeout;
		addresource.customserverid = resource.customserverid;
		addresource.serverid = resource.serverid;
		addresource.cka = resource.cka;
		addresource.tcpb = resource.tcpb;
		addresource.cmp = resource.cmp;
		addresource.maxbandwidth = resource.maxbandwidth;
		addresource.accessdown = resource.accessdown;
		addresource.monthreshold = resource.monthreshold;
		addresource.state = resource.state;
		addresource.downstateflush = resource.downstateflush;
		addresource.tcpprofilename = resource.tcpprofilename;
		addresource.httpprofilename = resource.httpprofilename;
		addresource.hashid = resource.hashid;
		addresource.comment = resource.comment;
		addresource.appflowlog = resource.appflowlog;
		addresource.netprofile = resource.netprofile;
		addresource.td = resource.td;
		return addresource.add_resource(client);
	}
392061
def vserver_servicegroup_add(v_name, sg_name, **connection_args):
    '''
    
    '''
    ret = True
    if vserver_servicegroup_exists(v_name, sg_name, **connection_args):
        return False
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    vsg = NSLBVServerServiceGroupBinding()
    vsg.set_name(v_name)
    vsg.set_servicegroupname(sg_name)
    try:
        NSLBVServerServiceGroupBinding.add(nitro, vsg)
    except NSNitroError as error:
        log.debug('netscaler module error - NSLBVServerServiceGroupBinding.add() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret
932990
def add(name, gid=None, **kwargs):
    '''
    
    '''
    ### NOTE: **kwargs isn't used here but needs to be included in this
    ### function for compatibility with the group.present state
    if info(name):
        raise CommandExecutionError(
            'Group \'{0}\' already exists'.format(name)
        )
    if salt.utils.stringutils.contains_whitespace(name):
        raise SaltInvocationError('Group name cannot contain whitespace')
    if name.startswith('_'):
        raise SaltInvocationError(
            'Salt will not create groups beginning with underscores'
        )
    if gid is not None and not isinstance(gid, int):
        raise SaltInvocationError('gid must be an integer')
    # check if gid is already in use
    gid_list = _list_gids()
    if six.text_type(gid) in gid_list:
        raise CommandExecutionError(
            'gid \'{0}\' already exists'.format(gid)
        )

    cmd = ['dseditgroup', '-o', 'create']
    if gid:
        cmd.extend(['-i', gid])
    cmd.append(name)
    return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
30306
def make_service_hooks_update_groups_action(service):
    
    def update_service_groups(modeladmin, request, queryset):
        for user in queryset:  # queryset filtering doesn't work here?
            service.update_groups(user)

    update_service_groups.__name__ = str('update_{}_groups'.format(slugify(service.name)))
    update_service_groups.short_description = "Sync groups for selected {} accounts".format(service.title)
    return update_service_groups
1145253
private IEntityGroup inewGroup(Class<?> type, String serviceName) throws GroupsException {
        try {
            return compositeGroupService.newGroup(type, parseServiceName(serviceName));
        } catch (InvalidNameException ine) {
            throw new GroupsException("GroupService.inewGroup(): invalid service name", ine);
        }
    }
1244357
def create_service_key(self, service_name, key_name):
        
        if self.has_key(service_name, key_name):
            logging.warning("Reusing existing service key %s" % (key_name))
            return self.get_service_key(service_name, key_name)

        body = {
            'service_instance_guid': self.get_instance_guid(service_name),
            'name': key_name
            }

        return self.api.post('/v2/service_keys', body)
528892
def add_service(self, zconf, typ, name):
        
        service = None
        tries = 0
        _LOGGER.debug("add_service %s, %s", typ, name)
        while service is None and tries < 4:
            try:
                service = zconf.get_service_info(typ, name)
            except IOError:
                # If the zeroconf fails to receive the necessary data we abort
                # adding the service
                break
            tries += 1

        if not service:
            _LOGGER.debug("add_service failed to add %s, %s", typ, name)
            return

        def get_value(key):
            """Retrieve value and decode to UTF-8."""
            value = service.properties.get(key.encode('utf-8'))

            if value is None or isinstance(value, str):
                return value
            return value.decode('utf-8')

        ips = zconf.cache.entries_with_name(service.server.lower())
        host = repr(ips[0]) if ips else service.server

        model_name = get_value('md')
        uuid = get_value('id')
        friendly_name = get_value('fn')

        if uuid:
            uuid = UUID(uuid)

        self.services[name] = (host, service.port, uuid, model_name,
                               friendly_name)

        if self.add_callback:
            self.add_callback(name)
1304669
def add_group(self, groupname):
        
        url = self._options['server'] + '/rest/api/latest/group'

        # implementation based on
        # https://docs.atlassian.com/jira/REST/ondemand/#d2e5173

        x = OrderedDict()

        x['name'] = groupname

        payload = json.dumps(x)

        self._session.post(url, data=payload)

        return True
483654
def service_group(self, service_name):
    
    for group in EFConfig.SERVICE_GROUPS:
      if self.services(group).has_key(service_name):
        return group
    return None
419786
def add_group(self, group_name, payment_address):
        
        if (self.is_group_name_exists(group_name)):
            raise Exception("the group \"%s\" is already present"%str(group_name))
        group_id_base64 = base64.b64encode(secrets.token_bytes(32))
        self.m["groups"] += [{"group_name"      : group_name ,
                              "group_id"        : group_id_base64.decode("ascii"),
                              "payment_address" : payment_address}]
        return group_id_base64