Deletes the named measurement.
        :return: 200 if something was deleted, 404 if the measurement doesn't exist, 500 in any other case.
337928
def delete(self, measurementId):
        
        message, count, deleted = self._measurementController.delete(measurementId)
        if count == 0:
            return message, 404
        elif deleted is None:
            return message, 500
        else:
            return deleted, 200
1219410
def stop(self, measurementId, failureReason=None):
        
        if failureReason is None:
            self.endResponseCode = self._doPut(self.sendURL + "/complete")
        else:
            self.endResponseCode = self._doPut(self.sendURL + "/failed", data={'failureReason': failureReason})
        self.sendURL = None
972326
def delete(self):
        

        return self._client._delete(
            self.__class__.base_url(
                self.sys['space'].id,
                self.sys['id'],
                environment_id=self._environment_id
            )
        )
816809
def reset(self):
        
        if getattr(self, 'num', None) is None:
            self.num_inst = 0
            self.sum_metric = 0.0
        else:
            self.num_inst = [0] * self.num
            self.sum_metric = [0.0] * self.num
908870
def completeMeasurement(self, measurementId, deviceId):
        
        am, handler = self.getDataHandler(measurementId, deviceId)
        if handler is not None:
            handler.stop(measurementId)
            am.updateDeviceStatus(deviceId, RecordStatus.COMPLETE)
            return True
        else:
            return False
677073
public boolean remove(MetricName name) {
        final Metric metric = metrics.remove(name);
        if (metric != null) {
            onMetricRemoved(name, metric);
            return true;
        }
        return false;
    }
756197
def put(self, measurementId, deviceId):
        
        logger.info('Starting measurement ' + measurementId + ' for ' + deviceId)
        if self._measurementController.startMeasurement(measurementId, deviceId):
            logger.info('Started measurement ' + measurementId + ' for ' + deviceId)
            return None, 200
        else:
            logger.warning('Failed to start measurement ' + measurementId + ' for ' + deviceId)
            return None, 404
1220775
def clear_measurements(self):
        
        mid_list = self.assignments.get('measurements', None)
        if mid_list is not None:
            for mid in mid_list:
                self.configs.delete_measurements(mid=mid)
            self.assignments['measurements'] = None
895583
def _delete(self, **kwargs):
        
        requests_params = self._handle_requests_params(kwargs)

        delete_uri = self._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']
        response = session.delete(delete_uri, **requests_params)
        if response.status_code == 200 or 201:
            self.__dict__ = {'deleted': True}
245707
def delete(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
               allow_redirects=False):
        
        response = self.request(
            method,
            uri,
            params=params,
            data=data,
            headers=headers,
            auth=auth,
            timeout=timeout,
            allow_redirects=allow_redirects,
        )

        if response.status_code < 200 or response.status_code >= 300:
            raise self.exception(method, uri, response, 'Unable to delete record')

        return response.status_code == 204
328562
def delete(self):
        
        self.requester.delete(
            '/{endpoint}/{id}', endpoint=self.endpoint,
            id=self.id
        )
        return self
710120
def delete_plate(self, name):
        '''
        '''
        logger.info(
            'delete plate "%s" of experiment "%s"',
            name, self.experiment_name
        )
        plate_id = self._get_plate_id(name)
        url = self._build_api_url(
            '/experiments/{experiment_id}/plates/{plate_id}'.format(
                experiment_id=self._experiment_id, plate_id=plate_id
            )
        )
        res = self._session.delete(url)
        res.raise_for_status()
703941
def delete(self, run_id):
        
        self.generic_dao.delete_record(
            self.metrics_collection_name,
            {"run_id": self._parse_run_id(run_id)})
321664
def put(self, measurementId, deviceId):
        
        payload = request.get_json()
        failureReason = json.loads(payload).get('failureReason') if payload is not None else None
        logger.warning('Failing measurement ' + measurementId + ' for ' + deviceId + ' because ' + str(failureReason))
        if self._measurementController.failMeasurement(measurementId, deviceId, failureReason=failureReason):
            logger.warning('Failed measurement ' + measurementId + ' for ' + deviceId)
            return None, 200
        else:
            logger.error('Unable to fail measurement ' + measurementId + ' for ' + deviceId)
            return None, 404
359200
def stop(self):
        
        if hasattr(sys, "gettrace") and self.log:
            if sys.gettrace() != self._trace:
                msg = "Trace function changed, measurement is likely wrong: %r"
                print >> sys.stdout, msg % sys.gettrace()
        sys.settrace(None)
346353
def delete(self):
        
        if self.resource_uri is None:
            raise ValueError("{0} object cannot be deleted because resource_uri attribute cannot be None".format(self._meta.resource_name))

        self._meta.api.http_resource("DELETE", self.resource_uri)
1277131
def delete(collection_name, spec, safe, last_error_args):
    
    data = __ZERO
    data += bson._make_c_string(collection_name)
    data += __ZERO
    data += bson.BSON.encode(spec)
    if safe:
        (_, remove_message) = __pack_message(2006, data)
        (request_id, error_message) = __last_error(last_error_args)
        return (request_id, remove_message + error_message)
    else:
        return __pack_message(2006, data)