summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorWilliam Wolf <throughnothing@gmail.com>2011-07-25 20:34:41 -0400
committerWilliam Wolf <throughnothing@gmail.com>2011-07-25 20:34:41 -0400
commiteba09454a21ce49afa821ec63ed801883354ff7e (patch)
tree2289fbc9be135bac14179235b3f492a19e8b631e /nova/api
parent7be2b2482fde20be8802cfe6a200590933a73d7e (diff)
initial stuff to get away from string comparisons for XML, and use ElementTree
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/versions.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/api/openstack/versions.py b/nova/api/openstack/versions.py
index 6fba4bbe0..c250dac8c 100644
--- a/nova/api/openstack/versions.py
+++ b/nova/api/openstack/versions.py
@@ -201,6 +201,13 @@ class VersionsRequestDeserializer(wsgi.RequestDeserializer):
class VersionsXMLSerializer(wsgi.XMLDictSerializer):
+ #TODO(wwolf): this is temporary until we get rid of toprettyxml
+ # in the base class (XMLDictSerializer), which I plan to do in
+ # another branch
+ def to_xml_string(self, node, has_atom=False):
+ self._add_xmlns(node, has_atom)
+ return node.toxml(encoding='UTF-8')
+
def _versions_to_xml(self, versions):
root = self._xml_doc.createElement('versions')