"Fossies" - the Fresh Open Source Software Archive  

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

flavors.py  (zaqar-9.0.0):flavors.py  (zaqar-10.0.0)
skipping to change at line 151 skipping to change at line 151
LOG.debug(u'PUT flavor - name: %s', flavor) LOG.debug(u'PUT flavor - name: %s', flavor)
data = wsgi_utils.load(request) data = wsgi_utils.load(request)
wsgi_utils.validate(self._validators['create'], data) wsgi_utils.validate(self._validators['create'], data)
try: try:
self._ctrl.create(flavor, self._ctrl.create(flavor,
project=project_id, project=project_id,
capabilities=data['capabilities']) capabilities=data['capabilities'])
response.status = falcon.HTTP_201 response.status = falcon.HTTP_201
response.location = request.path response.location = request.path
except errors.PoolGroupDoesNotExist as ex: except errors.PoolGroupDoesNotExist:
LOG.exception(ex)
description = (_(u'Flavor %(flavor)s could not be created. ') % description = (_(u'Flavor %(flavor)s could not be created. ') %
dict(flavor=flavor)) dict(flavor=flavor))
LOG.exception(description)
raise falcon.HTTPBadRequest(_('Unable to create'), description) raise falcon.HTTPBadRequest(_('Unable to create'), description)
def on_delete(self, request, response, project_id, flavor): def on_delete(self, request, response, project_id, flavor):
"""Deregisters a flavor. """Deregisters a flavor.
:returns: HTTP | [204] :returns: HTTP | [204]
""" """
LOG.debug(u'DELETE flavor - name: %s', flavor) LOG.debug(u'DELETE flavor - name: %s', flavor)
self._ctrl.delete(flavor, project=project_id) self._ctrl.delete(flavor, project=project_id)
skipping to change at line 200 skipping to change at line 200
for field in EXPECT: for field in EXPECT:
wsgi_utils.validate(self._validators[field], data) wsgi_utils.validate(self._validators[field], data)
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(flavor, project=project_id, **fields) self._ctrl.update(flavor, project=project_id, **fields)
except errors.FlavorDoesNotExist as ex: except errors.FlavorDoesNotExist as ex:
LOG.exception(ex) LOG.exception('Flavor "%s" does not exist', flavor)
raise wsgi_errors.HTTPNotFound(six.text_type(ex)) raise wsgi_errors.HTTPNotFound(six.text_type(ex))
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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