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

« back to all changes in this revision

Viewing changes to cinder/api/v1/volumes.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Yolanda Robla Mota, James Page, Chuck Short
  • Date: 2013-02-22 10:45:17 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130222104517-ng3r6ace9vi4m869
Tags: 2013.1.g3-0ubuntu1
[ Yolanda Robla Mota ]
* d/control: Add BD on python-hp3parclient.
* d/patches: Drop patches related to disabling hp3parclient.

[ James Page ]
* d/control: Add Suggests: python-hp3parclient for python-cinder.
* d/control: Add BD on python-oslo-config.
* d/*: Wrapped and sorted.

[ Chuck Short ]
* New upstream release.
* debian/rules, debian/cinder-volumes.install: 
  - Fail if binaries are missing and install missing binaries.
* debian/patches/fix-ubuntu-tests.patch: Fix failing tests.
* debian/control: Add python-rtslib and python-mock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
import webob
19
19
from webob import exc
20
 
from xml.dom import minidom
21
20
 
22
21
from cinder.api import common
23
22
from cinder.api.openstack import wsgi
26
25
from cinder import flags
27
26
from cinder.openstack.common import log as logging
28
27
from cinder.openstack.common import uuidutils
 
28
from cinder import utils
29
29
from cinder import volume
30
30
from cinder.volume import volume_types
31
31
 
204
204
 
205
205
    def default(self, string):
206
206
        """Deserialize an xml-formatted volume create request."""
207
 
        dom = minidom.parseString(string)
 
207
        dom = utils.safe_minidom_parse_string(string)
208
208
        volume = self._extract_volume(dom)
209
209
        return {'body': {'volume': volume}}
210
210
 
378
378
        if not body:
379
379
            raise exc.HTTPUnprocessableEntity()
380
380
 
381
 
        if not 'volume' in body:
 
381
        if 'volume' not in body:
382
382
            raise exc.HTTPUnprocessableEntity()
383
383
 
384
384
        volume = body['volume']