(self, request, tenant_id, entity_id, check_id)
return b''
Deletes check and all alarms associated to it
Deletes check and all alarms associated to it
Deletes check and all alarms associated to it
def delete_check(self, request, tenant_id, entity_id, check_id):
        """
        Deletes check and all alarms associated to it
        """
        entities = self._entity_cache_for_tenant(tenant_id).entities

        try:
            _delete_check(entities, entity_id, check_id)
        except (ObjectDoesNotExist, ParentDoesNotExist) as e:
            request.setResponseCode(e.code)
            self._audit('checks', request, tenant_id, e.code)
            return json.dumps(e.to_json())

        status = 204
        request.setResponseCode(status)
        request.setHeader(b'content-type', b'text/plain')
        self._audit('checks', request, tenant_id, status)
        return b''
def delete_check ( self , request , tenant_id , entity_id , check_id ) : entities = self . _entity_cache_for_tenant ( tenant_id ) . entities try : _delete_check ( entities , entity_id , check_id ) except ( ObjectDoesNotExist , ParentDoesNotExist ) as e : request . setResponseCode ( e . code ) self . _audit ( 'checks' , request , tenant_id , e . code ) return json . dumps ( e . to_json ( ) ) status = 204 request . setResponseCode ( status ) request . setHeader ( b'content-type' , b'text/plain' ) self . _audit ( 'checks' , request , tenant_id , status ) return b''