Update the service agreement status.

    :param storage_path: storage path for the internal db, str
    :param service_agreement_id:
    :param status:
    :return:
437629
def update_service_agreement_status(storage_path, service_agreement_id, status='pending'):
    
    conn = sqlite3.connect(storage_path)
    try:
        cursor = conn.cursor()
        cursor.execute(
            'UPDATE service_agreements SET status=? WHERE id=?',
            (status, service_agreement_id),
        )
        conn.commit()
    finally:
        conn.close()
764084
def update_delivery_note(self, delivery_note_id, delivery_note_dict):
        
        return self._create_put_request(
            resource=DELIVERY_NOTES,
            billomat_id=delivery_note_id,
            send_data=delivery_note_dict
        )
212316
def update(self, status):
        
        data = values.of({'Status': status, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return VerificationInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
165148
def updateStatus(self, logical_file_name, is_file_valid, lost, dataset):
        

        conn = self.dbi.connection()
        trans = conn.begin()
        try :
            self.updatestatus.execute(conn, logical_file_name, is_file_valid, lost, dataset, trans)
            trans.commit()
            trans = None
        except Exception as ex:
            if trans:
                trans.rollback()
                trans = None
            raise ex

        finally:
            if trans:
                trans.rollback()
            if conn:
                conn.close()
770945
def update_job_status(job_id, status, conn=None):
    
    if status not in VALID_STATES:
        raise ValueError("Invalid status")
    job_update = RBJ.get(job_id).update({STATUS_FIELD: status}).run(conn)
    if job_update["replaced"] == 0 and job_update["unchanged"] == 0:
        raise ValueError("Unknown job_id: {}".format(job_id))
    output_job_status = {OUTPUTJOB_FIELD: {STATUS_FIELD: status}}
    if RBO.index_list().contains(IDX_OUTPUT_JOB_ID).run(conn):
        # NEW
        output_update = RBO.get_all(job_id, index=IDX_OUTPUT_JOB_ID).update(output_job_status).run(conn)
    else:
        # OLD
        id_filter = (r.row[OUTPUTJOB_FIELD][ID_FIELD] == job_id)
        output_update = RBO.filter(id_filter).update(output_job_status).run(conn)
    return {str(RBJ): job_update, str(RBO): output_update}
419536
def update_dcnm_partition_static_route(self, tenant_id, arg_dict):
        
        ip_list = self.os_helper.get_subnet_nwk_excl(tenant_id,
                                                     arg_dict.get('excl_list'))
        srvc_node_ip = self.get_out_srvc_node_ip_addr(tenant_id)
        ret = self.dcnm_obj.update_partition_static_route(
            arg_dict.get('tenant_name'), fw_const.SERV_PART_NAME, ip_list,
            vrf_prof=self.cfg.firewall.fw_service_part_vrf_profile,
            service_node_ip=srvc_node_ip)
        if not ret:
            LOG.error("Unable to update DCNM ext profile with static "
                      "route %s", arg_dict.get('router_id'))
            self.delete_intf_router(tenant_id, arg_dict.get('tenant_name'),
                                    arg_dict.get('router_id'))
            return False
        return True
651478
def update_status(message, new_status = nil)
      @log      = @options[:logger] || RDSBackup.default_logger(STDOUT)
      @message  = message
      @status   = new_status if new_status
      @status == 200 ? (@log.info message) : (@log.error message)
      write_to_s3
    end
175758
public void updateServiceInstanceStatus(String serviceName, String instanceId, OperationalStatus status, final RegistrationCallback cb, Object context){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.UpdateServiceInstanceStatus);

        UpdateServiceInstanceStatusProtocol p = new UpdateServiceInstanceStatusProtocol(serviceName, instanceId, status);

        ProtocolCallback pcb = new ProtocolCallback(){

            @Override
            public void call(boolean result, Response response,
                    ErrorCode error, Object ctx) {
                cb.call(result, error, ctx);
            }

        };

        connection.submitCallbackRequest(header, p, pcb, context);
    }
1327962
def _update_record(self, identifier, rtype=None, name=None, content=None):
        
        result = False

        # TODO: some providers allow content-based updates without supplying an
        # ID, and therefore `identifier` is here optional. If we don't receive
        # an ID, look it up.
        if not identifier and rtype and name:
            records = self._list_records(rtype, name)
            if len(records) == 1:
                identifier = records[0]["id"]

        if identifier and content:
            with localzone.manage(self.filename, self.origin, autosave=True) as zone:
                if zone.update_record(identifier, content):  # pylint: disable=no-member
                    result = True

        LOGGER.debug("update_record: %s", result)
        return result
175116
def update_status(status)
      if status.present?
        RRRSpec.redis.hset(key, 'status', status)
      else
        RRRSpec.redis.hdel(key, 'status')
      end
    end
468298
def update(self, status):
        
        data = values.of({'Status': status, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return RoomInstance(self._version, payload, sid=self._solution['sid'], )
228552
def scheduled_status_update(self, id, scheduled_at):
        
        scheduled_at = self.__consistent_isoformat_utc(scheduled_at)
        id = self.__unpack_id(id)
        params = self.__generate_params(locals(), ['id'])
        url = '/api/v1/scheduled_statuses/{0}'.format(str(id))
        return self.__api_request('PUT', url, params)
594781
def update_line(self, resource_id, data):
        """"""
        return OrderLines(self.client).on(self).update(resource_id, data)
777592
def _save_or_update(self):
        
        with self._resource_lock:
            if not self._config or not self._config._storage_path:
                raise Exception("self._config._storage path is undefined")
            if not self._config._base_name:
                raise Exception("self._config._base_name is undefined")
            if not os.path.exists(self._config._storage_path):
                os.makedirs(self._config._storage_path)
            path = self._get_cloud_provider_storage_path()
            with open(path, 'wb') as storage:
                pickle.dump(self._config, storage, pickle.HIGHEST_PROTOCOL)
                pickle.dump(self._subscriptions, storage,
                            pickle.HIGHEST_PROTOCOL)
1215815
def update_file(self, uuid, file_path, async=False):
        
        url = "documents/{u}/upload?async={a}".format(u=uuid, a=async)
        return self.core.upload(file_path, url, http_method='PUT')
388306
def setStoragePath(self, location, path):
        
        if not path:
            self._storagePaths.pop(location, None)
        else:
            self._storagePaths[location] = path
690190
def add_index(self, mode, blob_id, path):
        
        self.command_exec(['update-index', '--add', '--cacheinfo', mode, blob_id, path])