import webob
from webob import exc
-from xml.dom import minidom
from cinder.api import common
from cinder.api import extensions
from cinder import backup as backupAPI
from cinder import exception
from cinder.openstack.common import log as logging
+from cinder import utils
LOG = logging.getLogger(__name__)
class CreateDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
- dom = minidom.parseString(string)
+ dom = utils.safe_minidom_parse_string(string)
backup = self._extract_backup(dom)
return {'body': {'backup': backup}}
class RestoreDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
- dom = minidom.parseString(string)
+ dom = utils.safe_minidom_parse_string(string)
restore = self._extract_restore(dom)
return {'body': {'restore': restore}}
import webob
from webob import exc
-from xml.dom import minidom
from cinder.api import common
from cinder.api import extensions
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import transfer as transferAPI
+from cinder import utils
LOG = logging.getLogger(__name__)
class CreateDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
- dom = minidom.parseString(string)
+ dom = utils.safe_minidom_parse_string(string)
transfer = self._extract_transfer(dom)
return {'body': {'transfer': transfer}}
class AcceptDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
- dom = minidom.parseString(string)
+ dom = utils.safe_minidom_parse_string(string)
transfer = self._extract_transfer(dom)
return {'body': {'accept': transfer}}