Update raw infoblox object. This is a low level api call.

    CLI Example:

    .. code-block:: bash

        salt-call infoblox.update_object objref=[ref_of_object] data={}
490225
def update_object(objref, data, **api_opts):
    '''
    
    '''
    if '__opts__' in globals() and __opts__['test']:
        return {'Test': 'Would attempt to update object: {0}'.format(objref)}
    infoblox = _get_infoblox(**api_opts)
    return infoblox.update_object(objref, data)
699261
function update(client) {
  var id = client.id;

  // Auto-remove when this client is closed.
  client.once('closed', function() {
    remove(id);
  });

  var info = find(client);
  if(!info) {
    log.warn('No ClientInfo object found for client.id=%s', id);
    return;
  }
  info.username = client.username;
}
1293193
def update(self, obj):
        ''''''
        self._dict.update(obj)
        for k, v in obj.items():
            # if k.isupper():
            #    self._check_readonly(k, v)
            if env.verbosity > 2:
                self._log(k, v)
282921
def cli(obj, name, email, password, status, text):
    """"""
    if not any([name, email, password, status, text]):
        click.echo('Nothing to update.')
        sys.exit(1)

    client = obj['client']
    try:
        r = client.update_me(name=name, email=email, password=password, status=status, attributes=None, text=text)
    except Exception as e:
        click.echo('ERROR: {}'.format(e))
        sys.exit(1)
    if r['status'] == 'ok':
        click.echo('Updated.')
    else:
        click.echo(r['message'])
1045552
def update(cls):
        
        ifaddrs = getifaddrs()
        # Create new interfaces
        for ifname in ifaddrs.keys():
            if filter(ifname.startswith, cls.NAME_FILTER):
                cls.objects.get_or_create(name=ifname)

        # Delete no longer existing ones
        cls.objects.exclude(name__in=ifaddrs.keys()).delete()
468128
def obj_update_or_create(model, defaults=None, update_fields=UNSET, **kwargs):
    
    obj, created = model.objects.get_or_create(defaults=defaults, **kwargs)
    if created:
        logger.debug('CREATED %s %s',
                     model._meta.object_name,
                     obj.pk,
                     extra={'pk': obj.pk})
    else:
        obj_update(obj, defaults, update_fields=update_fields)
    return obj, created
1241798
function createOrUpdate(object, callback) {
    if (typeof object[options.idProperty] === 'undefined') {
      // Create a new object
      self.create(object, callback)
    } else {
      // Try and find the object first to update
      var query = {}
      query[options.idProperty] = object[options.idProperty]

      self.findOne(query, function (err, foundObject) {
        if (foundObject) {
          // We found the object so update
          self.update(object, callback)
        } else {
          // We didn't find the object so create
          self.create(object, callback)
        }
      })
    }
  }
667409
def refresh!
      raise UnknownObject, self.name unless self.exists?
      h = Rudy::Metadata.get self.name
      return false if h.nil? || h.empty?
      obj = self.from_hash(h)
      obj.postprocess
      obj
    end
1260844
def update_object(
        request, model=None, object_id=None, slug=None,
        slug_field='slug', template_name=None, template_loader=loader,
        extra_context=None, post_save_redirect=None, login_required=False,
        context_processors=None, template_object_name='object',
        form_class=None):
    
    if extra_context is None:
        extra_context = {}
    if login_required and not request.user.is_authenticated:
        return redirect_to_login(request.path)

    model, form_class = get_model_and_form_class(model, form_class)
    obj = lookup_object(model, object_id, slug, slug_field)

    if request.method == 'POST':
        form = form_class(request.POST, request.FILES, instance=obj)
        if form.is_valid():
            obj = form.save()
            msg = ugettext("The %(verbose_name)s was updated successfully.") %\
                {"verbose_name": model._meta.verbose_name}
            messages.success(request, msg, fail_silently=True)
            return redirect(post_save_redirect, obj)
    else:
        form = form_class(instance=obj)

    if not template_name:
        template_name = "%s/%s_form.html" % (
            model._meta.app_label, model._meta.object_name.lower())
    t = template_loader.get_template(template_name)
    c = {
        'form': form,
        template_object_name: obj,
    }
    apply_extra_context(extra_context, c)
    response = HttpResponse(t.render(context=c, request=request))
    return response
959178
def update(self, obj, size):
        '''
        '''
        self.number += 1
        self.total  += size
        if self.high < size:  # largest
           self.high = size
           try:  # prefer using weak ref
               self.objref, self.weak = Weakref.ref(obj), True
           except TypeError:
               self.objref, self.weak = obj, False
795803
async def refresh(self):
        """"""
        cls = type(self)
        if hasattr(cls, 'read'):
            descriptors, alt_descriptors = get_pk_descriptors(cls)
            if len(descriptors) == 1:
                try:
                    obj = await cls.read(getattr(self, descriptors[0][0]))
                except AttributeError:
                    found = False
                    for alt_name, _ in alt_descriptors[0]:
                        if hasattr(self, alt_name):
                            obj = await cls.read(getattr(self, alt_name))
                            found = True
                            break
                    if not found:
                        raise
            elif len(descriptors) > 1:
                args = []
                for idx, (name, _) in enumerate(descriptors):
                    try:
                        args.append(getattr(self, name))
                    except AttributeError:
                        found = False
                        for alt_name, _ in alt_descriptors[idx]:
                            if hasattr(self, alt_name):
                                args.append(getattr(self, alt_name))
                                found = True
                                break
                        if not found:
                            raise
                obj = await cls.read(*args)
            else:
                raise AttributeError(
                    "unable to perform 'refresh' no primary key "
                    "fields defined.")
            if type(obj) is cls:
                self._data = obj._data
                self._loaded = True
            else:
                raise TypeError(
                    "result of '%s.read' must be '%s', not '%s'" % (
                        cls.__name__, cls.__name__, type(obj).__name__))
        else:
            raise AttributeError(
                "'%s' object doesn't support refresh." % cls.__name__)
538812
def raw_update(self, attributes=None):
        
        if attributes is None:
            attributes = {}

        if self._query is not None:
            return self._query.update(attributes)
620336
def update_release(id, **kwargs):
    
    data = update_release_raw(id, **kwargs)
    if data:
        return utils.format_json(data)
1069479
function updateObjectImpl(obj, update, isSelected) {
  if (isSelected(obj)) {
    return update(obj);
  }
  var result = obj;
  var changed = false;
  _lodash2.default.forOwn(obj, function (val, key) {
    var newval = updateValue(val, update, isSelected);
    if (newval === val) {
      return;
    }
    if (!changed) {
      result = _extends({}, obj);
      changed = true;
    }
    result[key] = newval;
  });
  return result;
}
136839
def create_object(object_type, data, **api_opts):
    '''
    
    '''
    if '__opts__' in globals() and __opts__['test']:
        return {'Test': 'Would attempt to create object: {0}'.format(object_type)}
    infoblox = _get_infoblox(**api_opts)
    return infoblox.create_object(object_type, data)
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
167913
def update_product_version(id, **kwargs):
    
    content = update_product_version_raw(id, **kwargs)
    if content:
        return utils.format_json(content)