(self, request, tenant_id, entity_id)
return b''
Delete an entity, all checks that belong to entity, all alarms that belong to those checks
Delete an entity, all checks that belong to entity, all alarms that belong to those checks
Delete an entity all checks that belong to entity all alarms that belong to those checks
def delete_entity(self, request, tenant_id, entity_id):
        """
        Delete an entity, all checks that belong to entity, all alarms that belong to those checks
        """
        entities = self._entity_cache_for_tenant(tenant_id).entities

        try:
            _delete_entity(entities, entity_id)
        except ObjectDoesNotExist as e:
            request.setResponseCode(e.code)
            self._audit('entities', 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('entities', request, tenant_id, status)
        return b''
def delete_entity ( self , request , tenant_id , entity_id ) : entities = self . _entity_cache_for_tenant ( tenant_id ) . entities try : _delete_entity ( entities , entity_id ) except ObjectDoesNotExist as e : request . setResponseCode ( e . code ) self . _audit ( 'entities' , 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 ( 'entities' , request , tenant_id , status ) return b''