Updates a security group
10009
def update_security_group(self, sec_grp, name=None, desc=None):
        '''
        
        '''
        sec_grp_id = self._find_security_group_id(sec_grp)
        body = {'security_group': {}}
        if name:
            body['security_group']['name'] = name
        if desc:
            body['security_group']['description'] = desc
        return self.network_conn.update_security_group(sec_grp_id,
                                                       body=body)
731288
def secgroup_create(self, name, description):
        '''
        
        '''
        nt_ks = self.compute_conn
        nt_ks.security_groups.create(name, description)
        ret = {'name': name, 'description': description}
        return ret
421428
def change_group(self, name, group):
		
		m1 = OmapiMessage.open(b"host")
		m1.update_object(dict(name=name))
		r1 = self.query_server(m1)
		if r1.opcode != OMAPI_OP_UPDATE:
			raise OmapiError("opening host %s failed" % name)
		m2 = OmapiMessage.update(r1.handle)
		m2.update_object(dict(group=group))
		r2 = self.query_server(m2)
		if r2.opcode != OMAPI_OP_UPDATE:
			raise OmapiError("changing group of host %s to %s failed" % (name, group))
274465
def _apply_dvportgroup_security_policy(pg_name, sec_policy, sec_policy_conf):
    '''
    
    '''
    log.trace('Building portgroup\'s \'%s\' security policy ', pg_name)
    if 'allow_promiscuous' in sec_policy_conf:
        sec_policy.allowPromiscuous = vim.BoolPolicy()
        sec_policy.allowPromiscuous.value = \
                sec_policy_conf['allow_promiscuous']
    if 'forged_transmits' in sec_policy_conf:
        sec_policy.forgedTransmits = vim.BoolPolicy()
        sec_policy.forgedTransmits.value = sec_policy_conf['forged_transmits']
    if 'mac_changes' in sec_policy_conf:
        sec_policy.macChanges = vim.BoolPolicy()
        sec_policy.macChanges.value = sec_policy_conf['mac_changes']
413372
def add_to_group(server_context, user_ids, group_id, container_path=None):
    
    return __make_security_group_api_request(server_context, 'addGroupMember.api', user_ids, group_id, container_path)
1295550
def update_group_dampening(self, group_id, dampening_id, dampening):
        
        data = self._serialize_object(dampening)
        url = self._service_url(['triggers', 'groups', group_id, 'dampenings', dampening_id])
        return Dampening(self._put(url, data))
938378
def update(self, ogps):
        

        data = {'ogps': ogps}
        ogps_ids = [str(ogp.get('id')) for ogp in ogps]

        return super(ApiObjectGroupPermission, self).put('api/v3/object-group-perm/%s/' %
                                                         ';'.join(ogps_ids), data)
286499
def update(self):
        """"""
        if "tag_groups" not in self._device_dict:
            return
        for group in self.tag_groups:
            group.update()
        for i in range(len(self._device_dict["tag_groups"])):
            tag_group_dict = self._device_dict["tag_groups"][i]
            for group in self.tag_groups:
                if group.name == tag_group_dict["common.ALLTYPES_NAME"]:
                    self._device_dict["tag_groups"][i] = group.as_dict()
89441
public GitlabGroup updateGroup(GitlabGroup group, GitlabUser sudoUser) throws IOException {

        Query query = new Query()
                .appendIf("name", group.getName())
                .appendIf("path", group.getPath())
                .appendIf("description", group.getDescription())
                .appendIf("membership_lock", group.getMembershipLock())
                .appendIf("share_with_group_lock", group.getShareWithGroupLock())
                .appendIf("visibility", group.getVisibility().toString())
                .appendIf("lfs_enabled", group.isLfsEnabled())
                .appendIf("request_access_enabled", group.isRequestAccessEnabled())
                .appendIf("shared_runners_minutes_limit", group.getSharedRunnersMinutesLimit())
                .appendIf("ldap_cn", group.getLdapCn())
                .appendIf("ldap_access", group.getLdapAccess())
                .appendIf(PARAM_SUDO, sudoUser != null ? sudoUser.getId() : null);

        String tailUrl = GitlabGroup.URL + "/" + group.getId() + query.toString();

        return retrieve().method(PUT).to(tailUrl, GitlabGroup.class);
    }
449430
def update_group(self, group_id, name):
        
        return self.post(
            url="https://api.weixin.qq.com/cgi-bin/groups/update",
            data={"group": {
                "id": int(group_id),
                "name": to_text(name)
            }}
        )
1291562
def update_membership(self, group_id, users=[]):
        
        data = {
            'groupId': group_id,
            'users': users,
        }
        return _fix_group(self.post('updateMembership', data))
583900
def get_securitygroup(self, group_id, **kwargs):
        
        if 'mask' not in kwargs:
            kwargs['mask'] = (
                'id,'
                'name,'
                'description,'
                '''rules[id, remoteIp, remoteGroupId,
                         direction, ethertype, portRangeMin,
                         portRangeMax, protocol, createDate, modifyDate],'''
                '''networkComponentBindings[
                    networkComponent[
                        id,
                        port,
                        guest[
                            id,
                            hostname,
                            primaryBackendIpAddress,
                            primaryIpAddress
                        ]
                    ]
                ]'''
            )

        return self.security_group.getObject(id=group_id, **kwargs)
831678
def cli(ctx, group_id, new_name):
    
    return ctx.gi.groups.update_group(group_id, new_name)
693378
def security_group_delete(auth=None, **kwargs):
    '''
    

    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.delete_security_group(**kwargs)
1332606
def _Execute(self, options):
        """"""
        whitelist = dict(
            name=options["name"],
            description=options.get("description", "<empty>"))
        return self._agent.client.compute.security_groups.create(**whitelist)
217908
protected function updateCategoryGroup()
    {
        $this->controlAccess('category_group_edit');

        if ($this->category_group->update($this->data_category_group['category_group_id'], $this->getSubmitted())) {
            $this->redirect('admin/content/category-group', $this->text('Category group has been updated'), 'success');
        }

        $this->redirect('', $this->text('Category group has not been updated'), 'warning');
    }
990131
@Override
    public void updateGroupMembers(IEntityGroup group) throws GroupsException {
        throwExceptionIfNotInternallyManaged();
        getGroupStore().updateMembers(group);
        if (cacheInUse()) {
            cacheUpdate(group);
        }
        synchronizeGroupMembersOnUpdate(group);
    }