Internal method to update the parameter dict stored in attribute
        protocol_agent_values. Allows masking of real attribute names to
        something more sane.
        
        :rtype: bool
16993
def _update(self, **kwargs):
        
        updated = False
        if 'proxy_server' in kwargs:
            proxy_server = kwargs.get('proxy_server')
            if not proxy_server and self._inspected_service_ref:
                self.protocol_agent_values.pop('inspected_service_ref', None)
                updated = True
            elif isinstance(proxy_server, ProxyServer):
                # Need the inspected service reference for the protocol
                enabled_services = {svc.name:svc.href for svc in proxy_server.inspected_services}
                
                if self.protocol_agent.name not in enabled_services:
                    raise MissingDependency('The specified ProxyServer %r does not enable '
                        'the required protocol %s' % (proxy_server.name, self.protocol_agent.name))
                
                if self._inspected_service_ref != enabled_services.get(self.protocol_agent.name):
                    self.protocol_agent_values['inspected_service_ref'] = enabled_services.get(
                        self.protocol_agent.name)
                    updated = True
        return updated
599907
def perform_update(self, data, instance):
        

        for key, val in data.items():
            setattr(instance, key, val)
837796
def update(self, **kwargs):
        
        for arg in kwargs:
            if hasattr(self, arg):
                setattr(self, arg, kwargs[arg])
            else:
                raise ValueError("Invalid RayParams parameter in"
                                 " update: %s" % arg)

        self._check_usage()
534598
def update_from(self, mapping):
        
        for key, value in mapping.items():
            if key in self:
                if isinstance(value, Parameter):
                    value = value.value
                self[key].value = value
628245
def update(self, **kwargs):
        
        for attr, val in kwargs.items():
            if attr in (list(self.__class__.__attributes__) + \
                        list(associations.associations_for(self.__class__))):
                setattr(self, attr, val)
1058292
def set_parameters(self):
        
        for key in (ADMITTED_STR_PARAMETERS + ADMITTED_FLOAT_PARAMETERS +
                    ADMITTED_SET_PARAMETERS):
            try:
                val = getattr(self.gmpe, key)
            except AttributeError:
                pass
            else:
                setattr(self, key, val)
155945
def updateParams(self, newvalues, update_all=False):
        """"""
        assert all(map(lambda x: x in self.freeparams, newvalues.keys())),\
                "Invalid entry in newvalues: {0}\nfreeparams: {1}".format(
                ', '.join(newvalues.keys()), ', '.join(self.freeparams))
        changed = set([]) # contains string names of changed params
        for (name, value) in newvalues.items():
            _checkParam(name, value, self.PARAMLIMITS, self.PARAMTYPES)
            if isinstance(value, scipy.ndarray):
                if (value != getattr(self, name)).any():
                    changed.add(name)
                    setattr(self, name, value.copy())
            else:
                if value != getattr(self, name):
                    changed.add(name)
                    setattr(self, name, copy.copy(value))

        if update_all or changed:
            self._cached = {}

        # The order of the updating below is important.
        # If you change it, you may break either this class
        # **or** classes that inherit from it.
        # Note also that not all attributes need to be updated
        # for all possible parameter changes, but just doing it
        # this way is much simpler and adds negligible cost.
        if update_all or (changed and changed != set(['mu'])):
            self._update_pi_vars()
            self._update_phi()
            self._update_prx()
            self._update_dprx()
            self._update_Qxy()
            self._update_Frxy()
            self._update_Prxy()
            self._update_Prxy_diag()
            self._update_dPrxy()
            self._update_B()
112117
void updateAgentConfigurationFile(
			TargetHandlerParameters parameters,
			SSHClient ssh,
			File tmpDir,
			Map<String,String> keyToNewValue )
	throws IOException {

		this.logger.fine( "Updating agent parameters on remote host..." );

		// Update the agent's configuration file
		String agentConfigDir = Utils.getValue( parameters.getTargetProperties(), SCP_AGENT_CONFIG_DIR, DEFAULT_SCP_AGENT_CONFIG_DIR );
		File localAgentConfig = new File( tmpDir, Constants.KARAF_CFG_FILE_AGENT );
		File remoteAgentConfig = new File( agentConfigDir, Constants.KARAF_CFG_FILE_AGENT );

		// Download remote agent config file...
		ssh.newSCPFileTransfer().download(remoteAgentConfig.getCanonicalPath(), new FileSystemFile(tmpDir));

		// Replace "parameters" property to point on the user data file...
		String config = Utils.readFileContent(localAgentConfig);
		config = Utils.updateProperties( config, keyToNewValue );
		Utils.writeStringInto(config, localAgentConfig);

		// Then upload agent config file back
		ssh.newSCPFileTransfer().upload(new FileSystemFile(localAgentConfig), agentConfigDir);
	}
138371
def set_param(self, key, value):
        
        self.__dict__[key] = value
        self._parameters[key] = value
607939
def update(self, **kwargs):
        
        if not self.object_id:
            return False

        url = self.build_url(
            self._endpoints.get('item').format(id=self.object_id))

        data = {self._cc(key): value for key, value in kwargs.items() if
                key in {'name',
                        'description'}}  # convert keys to protocol casing
        if not data:
            return False

        response = self.con.patch(url, data=data)
        if not response:
            return False

        new_data = response.json()

        for key in data:
            value = new_data.get(key, None)
            if value:
                setattr(self, self.protocol.to_api_case(key), value)

        return True
932741
def update(self, **kwargs):
        
        # Update inherited configurations
        super(VrfConf, self).update(**kwargs)
        vrf_id = kwargs.get(ConfWithId.ID)
        vrf_rd = kwargs.get(ROUTE_DISTINGUISHER)
        vrf_rf = kwargs.get(VRF_RF)
        if (vrf_id != self.id or
                vrf_rd != self.route_dist or
                vrf_rf != self.route_family):
            raise ConfigValueError(desc='id/route-distinguisher/route-family'
                                   ' do not match configured value.')

        # Validate and update individual settings
        new_imp_rts, old_imp_rts = \
            self._update_import_rts(**kwargs)
        export_rts_changed = self._update_export_rts(**kwargs)
        soos_list_changed = self._update_soo_list(**kwargs)
        med_changed = self._update_med(**kwargs)
        re_export_needed = (export_rts_changed or
                            soos_list_changed or
                            med_changed)
        import_maps = kwargs.get(IMPORT_MAPS, [])
        re_import_needed = self._update_importmaps(import_maps)

        # If we did have any change in value of any settings, we notify
        # listeners
        if (new_imp_rts is not None or
                old_imp_rts is not None or
                re_export_needed or re_import_needed):
            evt_value = (
                new_imp_rts,
                old_imp_rts,
                import_maps,
                re_export_needed,
                re_import_needed
            )
            self._notify_listeners(VrfConf.VRF_CHG_EVT, evt_value)
        return True
18598
def agent_version(self, value):
        
        if value == self._defaults['ai.internal.agentVersion'] and 'ai.internal.agentVersion' in self._values:
            del self._values['ai.internal.agentVersion']
        else:
            self._values['ai.internal.agentVersion'] = value
510190
def update(self, **kwargs):
        
        if 'useProxyServer' in kwargs and kwargs['useProxyServer'] == 'enabled':
            if 'proxyServerPool' not in kwargs:
                error = 'Missing proxyServerPool parameter value.'
                raise MissingUpdateParameter(error)
        if hasattr(self, 'useProxyServer'):
            if getattr(self, 'useProxyServer') == 'enabled' and 'proxyServerPool' not in self.__dict__:
                error = 'Missing proxyServerPool parameter value.'
                raise MissingUpdateParameter(error)

        self._update(**kwargs)

        return self
19853
def update_metadata_from_rmd_options(name, value, metadata):
    
    for jupyter_option, rmd_option, rev in _BOOLEAN_OPTIONS_DICTIONARY:
        if name == rmd_option:
            try:
                metadata[jupyter_option] = _py_logical_values(value) != rev
                return True
            except RLogicalValueError:
                pass
    return False
456425
def _update_field(self, natvalue):
        
        updated = False
        if natvalue.element and natvalue.element != self.element:
            self.update(element=natvalue.element)
            self.pop('ip_descriptor', None)
            updated = True
        elif natvalue.ip_descriptor and self.ip_descriptor and \
            natvalue.ip_descriptor != self.ip_descriptor:
            self.update(ip_descriptor=natvalue.ip_descriptor)
            self.pop('element', None)
            updated = True

        for port in ('min_port', 'max_port'):
            _port = getattr(natvalue, port, None)
            if _port is not None and getattr(self, port, None) != _port:
                self[port] = _port
                updated = True
    
        return updated
598322
def update_attributes(self, id, old_attrs, new_attrs):
        
        update = dict()
        set_value = {'attributes.' + k: v for k, v in new_attrs.items() if v is not None}
        if set_value:
            update['$set'] = set_value
        unset_value = {'attributes.' + k: v for k, v in new_attrs.items() if v is None}
        if unset_value:
            update['$unset'] = unset_value

        if update:
            response = self.get_db().alerts.update_one({'_id': {'$regex': '^' + id}}, update=update)
            return response.matched_count > 0
525167
def _reset_param(self, param):
        
        if param not in self._instance.CONFIG_PARAMS:
            raise ValueError("Cannot reset unknown parameter '{}'".format(param))
        setattr(self, param, self._instance.CONFIG_PARAMS[param])