~ubuntu-branches/ubuntu/trusty/cinder/trusty

« back to all changes in this revision

Viewing changes to cinder/api/v2/snapshots.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-03-25 08:30:42 UTC
  • mfrom: (10.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130325083042-4c9f80w7t98klicf
Tags: 1:2013.1~rc2-0ubuntu2
debian/rules: Fix FTBFS, we want '-v' and not '-V'. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
        context = req.environ['cinder.context']
168
168
 
169
169
        if not self.is_valid_body(body, 'snapshot'):
170
 
            raise exc.HTTPUnprocessableEntity()
 
170
            raise exc.HTTPBadRequest()
171
171
 
172
172
        snapshot = body['snapshot']
173
173
        kwargs['metadata'] = snapshot.get('metadata', None)
212
212
        context = req.environ['cinder.context']
213
213
 
214
214
        if not body:
215
 
            raise exc.HTTPUnprocessableEntity()
 
215
            raise exc.HTTPBadRequest()
216
216
 
217
217
        if 'snapshot' not in body:
218
 
            raise exc.HTTPUnprocessableEntity()
 
218
            raise exc.HTTPBadRequest()
219
219
 
220
220
        snapshot = body['snapshot']
221
221
        update_dict = {}