"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zaqar/transport/wsgi/v1_0/pools.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).

pools.py  (zaqar-9.0.0):pools.py  (zaqar-10.0.0)
skipping to change at line 180 skipping to change at line 180
raise wsgi_errors.HTTPBadRequestBody( raise wsgi_errors.HTTPBadRequestBody(
'cannot connect to %s' % data['uri'] 'cannot connect to %s' % data['uri']
) )
try: try:
self._ctrl.create(pool, weight=data['weight'], self._ctrl.create(pool, weight=data['weight'],
uri=data['uri'], uri=data['uri'],
options=data.get('options', {})) options=data.get('options', {}))
response.status = falcon.HTTP_201 response.status = falcon.HTTP_201
response.location = request.path response.location = request.path
except errors.PoolAlreadyExists as e: except errors.PoolAlreadyExists as e:
LOG.exception(e) LOG.exception('Pool "%s" already exists', pool)
raise wsgi_errors.HTTPConflict(six.text_type(e)) raise wsgi_errors.HTTPConflict(six.text_type(e))
def on_delete(self, request, response, project_id, pool): def on_delete(self, request, response, project_id, pool):
"""Deregisters a pool. """Deregisters a pool.
:returns: HTTP | 204 :returns: HTTP | 204
""" """
LOG.debug(u'DELETE pool - name: %s', pool) LOG.debug(u'DELETE pool - name: %s', pool)
self._ctrl.delete(pool) self._ctrl.delete(pool)
skipping to change at line 232 skipping to change at line 232
conf=conf): conf=conf):
raise wsgi_errors.HTTPBadRequestBody( raise wsgi_errors.HTTPBadRequestBody(
'cannot connect to %s' % data['uri'] 'cannot connect to %s' % data['uri']
) )
fields = common_utils.fields(data, EXPECT, fields = common_utils.fields(data, EXPECT,
pred=lambda v: v is not None) pred=lambda v: v is not None)
try: try:
self._ctrl.update(pool, **fields) self._ctrl.update(pool, **fields)
except errors.PoolDoesNotExist as ex: except errors.PoolDoesNotExist as ex:
LOG.exception(ex) LOG.exception('Pool "%s" does not exist', pool)
raise wsgi_errors.HTTPNotFound(six.text_type(ex)) raise wsgi_errors.HTTPNotFound(six.text_type(ex))
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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