def on_post(self, req, resp, method=None):
if not self.has_param(req, 'uuid'):
raise falcon.HTTPBadRequest("Please provide the 'uuid' parameter, specifying which Productstatus resource to process.")
if not self.has_param(req, 'adapter'):
raise falcon.HTTPBadRequest("Please provide the 'adapter' parameter, specifying which adapter should process the resource.")
try:
self.exec_functions(req, resp, method, ['productinstance', 'datainstance'])
resp.status = falcon.HTTP_202
except productstatus.exceptions.NotFoundException as e:
raise falcon.HTTPBadRequest('The Productstatus resource could not be found: %s' % e)
except productstatus.exceptions.ServiceUnavailableException as e:
raise falcon.HTTPServiceUnavailable('An error occurred when retrieving Productstatus resources: %s' % e)
评论列表
文章目录