def delete(self, request, obj_id): jb = saharaclient.job_binary_get(request, obj_id) (jb_type, jb_internal_id) = jb.url.split("://") if jb_type == "internal-db": try: saharaclient.job_binary_internal_delete( request, jb_internal_id) except api_base.APIException: # nothing to do for job-binary-internal if # it does not exist. pass saharaclient.job_binary_delete(request, obj_id)
def action(self, request, obj_id): jb = saharaclient.job_binary_get(request, obj_id) (jb_type, jb_internal_id) = jb.url.split("://") if jb_type == "internal-db": try: saharaclient.job_binary_internal_delete(request, jb_internal_id) except api_base.APIException: # nothing to do for job-binary-internal if # it does not exist. pass saharaclient.job_binary_delete(request, obj_id)