"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zaqar/transport/wsgi/v1_0/metadata.py" between
zaqar-9.0.0.tar.gz and zaqar-10.0.0.tar.gz

About: OpenStack Zaqar is a multi-tenant cloud messaging and notification service for web and mobile developers.
The "Ussuri" series (latest release).

metadata.py  (zaqar-9.0.0):metadata.py  (zaqar-10.0.0)
skipping to change at line 48 skipping to change at line 48
@decorators.TransportLog("Queue metadata") @decorators.TransportLog("Queue metadata")
def on_get(self, req, resp, project_id, queue_name): def on_get(self, req, resp, project_id, queue_name):
try: try:
resp_dict = self._queue_ctrl.get_metadata(queue_name, resp_dict = self._queue_ctrl.get_metadata(queue_name,
project=project_id) project=project_id)
except storage_errors.DoesNotExist as ex: except storage_errors.DoesNotExist as ex:
LOG.debug(ex) LOG.debug(ex)
raise wsgi_errors.HTTPNotFound(six.text_type(ex)) raise wsgi_errors.HTTPNotFound(six.text_type(ex))
except Exception as ex: except Exception:
LOG.exception(ex)
description = _(u'Queue metadata could not be retrieved.') description = _(u'Queue metadata could not be retrieved.')
LOG.exception(description)
raise wsgi_errors.HTTPServiceUnavailable(description) raise wsgi_errors.HTTPServiceUnavailable(description)
resp.content_location = req.path resp.content_location = req.path
resp.body = utils.to_json(resp_dict) resp.body = utils.to_json(resp_dict)
# status defaults to 200 # status defaults to 200
@decorators.TransportLog("Queue metadata") @decorators.TransportLog("Queue metadata")
def on_put(self, req, resp, project_id, queue_name): def on_put(self, req, resp, project_id, queue_name):
try: try:
# Place JSON size restriction before parsing # Place JSON size restriction before parsing
skipping to change at line 88 skipping to change at line 88
metadata=metadata, metadata=metadata,
project=project_id) project=project_id)
except validation.ValidationFailed as ex: except validation.ValidationFailed as ex:
LOG.debug(ex) LOG.debug(ex)
raise wsgi_errors.HTTPBadRequestAPI(six.text_type(ex)) raise wsgi_errors.HTTPBadRequestAPI(six.text_type(ex))
except storage_errors.QueueDoesNotExist as ex: except storage_errors.QueueDoesNotExist as ex:
raise wsgi_errors.HTTPNotFound(six.text_type(ex)) raise wsgi_errors.HTTPNotFound(six.text_type(ex))
except Exception as ex: except Exception:
LOG.exception(ex)
description = _(u'Metadata could not be updated.') description = _(u'Metadata could not be updated.')
LOG.exception(description)
raise wsgi_errors.HTTPServiceUnavailable(description) raise wsgi_errors.HTTPServiceUnavailable(description)
resp.status = falcon.HTTP_204 resp.status = falcon.HTTP_204
resp.location = req.path resp.location = req.path
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)