Repository: libcloud Updated Branches: refs/heads/trunk a95043a38 -> 961df98fa
Replaced 'utf8' in ET.tostring with 'utf-8', invalid XML (400) otherwise Closes #538 Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/961df98f Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/961df98f Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/961df98f Branch: refs/heads/trunk Commit: 961df98fa1e48dbe9b672c6c219d611e19dc2658 Parents: a95043a Author: Jesaja Everling <[email protected]> Authored: Wed Jul 1 17:44:37 2015 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Sun Jul 5 17:00:35 2015 +0800 ---------------------------------------------------------------------- CHANGES.rst | 2 +- libcloud/compute/drivers/azure.py | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/961df98f/CHANGES.rst ---------------------------------------------------------------------- diff --git a/CHANGES.rst b/CHANGES.rst index 243be3b..1a7e459 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -159,7 +159,7 @@ Compute [Tomaz Muraus] - Add new driver for Microsft Azure Virtual Machines service. - (LIBCLOUD-556, GITHUB-305, GITHUB-499) + (LIBCLOUD-556, GITHUB-305, GITHUB-499, GITHUB-538) [Michael Bennett, davidcrossland, Richard Conway, Matt Baldwin, Tomaz Muraus] - Fix VPC lookup method in CloudStack driver http://git-wip-us.apache.org/repos/asf/libcloud/blob/961df98f/libcloud/compute/drivers/azure.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/azure.py b/libcloud/compute/drivers/azure.py index 35cc091..a9b249e 100644 --- a/libcloud/compute/drivers/azure.py +++ b/libcloud/compute/drivers/azure.py @@ -1709,7 +1709,8 @@ class AzureNodeDriver(NodeDriver): root = ET.Element() doc = self._construct_element_tree(source, root) - result = ensure_string(ET.tostring(doc, encoding='utf8', method='xml')) + result = ensure_string(ET.tostring(doc, encoding='utf-8', + method='xml')) return result def _construct_element_tree(self, source, etree): @@ -2108,7 +2109,7 @@ class AzureXmlSerializer(object): 'RestartRoleOperation', xml ) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod @@ -2119,7 +2120,7 @@ class AzureXmlSerializer(object): 'ShutdownRoleOperation', xml ) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod @@ -2130,7 +2131,7 @@ class AzureXmlSerializer(object): 'StartRoleOperation', xml ) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod @@ -2520,7 +2521,7 @@ class AzureXmlSerializer(object): system_configuration_set, doc ) - result = ensure_string(ET.tostring(xml, encoding='utf8')) + result = ensure_string(ET.tostring(xml, encoding='utf-8')) return result @staticmethod @@ -2547,7 +2548,7 @@ class AzureXmlSerializer(object): doc ) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod @@ -2587,7 +2588,7 @@ class AzureXmlSerializer(object): xml ) doc = AzureXmlSerializer.doc_from_xml('CaptureRoleOperation', xml) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod @@ -2638,7 +2639,7 @@ class AzureXmlSerializer(object): ) ) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod @@ -2707,7 +2708,7 @@ class AzureXmlSerializer(object): ) ) - result = ensure_string(ET.tostring(doc, encoding='utf8')) + result = ensure_string(ET.tostring(doc, encoding='utf-8')) return result @staticmethod
