(self, request, tenant_id, entity_id)
Returns all the checks for a paricular entity
Returns all the checks for a paricular entity
Returns all the checks for a paricular entity
def get_checks_for_entity(self, request, tenant_id, entity_id):
        """
        Returns all the checks for a paricular entity
        """
        entities = self._entity_cache_for_tenant(tenant_id).entities

        try:
            entity = _get_parent_entity(entities, entity_id)
            checks = entity.list_checks()
            metadata = {'count': len(checks),
                        'limit': 1000,
                        'marker': None,
                        'next_marker': None,
                        'next_href': None}
            request.setResponseCode(200)
            return json.dumps({'metadata': metadata, 'values': checks})
        except ParentDoesNotExist as e:
            request.setResponseCode(e.code)
            return json.dumps(e.to_json())
def get_checks_for_entity ( self , request , tenant_id , entity_id ) : entities = self . _entity_cache_for_tenant ( tenant_id ) . entities try : entity = _get_parent_entity ( entities , entity_id ) checks = entity . list_checks ( ) metadata = { 'count' : len ( checks ) , 'limit' : 1000 , 'marker' : None , 'next_marker' : None , 'next_href' : None } request . setResponseCode ( 200 ) return json . dumps ( { 'metadata' : metadata , 'values' : checks } ) except ParentDoesNotExist as e : request . setResponseCode ( e . code ) return json . dumps ( e . to_json ( ) )