From e78c8be3d19c56d41ae77df32d8f92d3d4826cf5 Mon Sep 17 00:00:00 2001 From: yanzhangi <51999930+yanzhangi@users.noreply.github.com> Date: Thu, 11 Jun 2020 06:27:25 +0800 Subject: [PATCH] Modify the way of parsing NETCONF XML message in ce.py (#69571) * update module_utils for ce * update module_utils for ce * Module modification information * Module modification information --- changelogs/fragments/69571-ce_modify_the_parse_mode.yml | 2 ++ lib/ansible/module_utils/network/cloudengine/ce.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/69571-ce_modify_the_parse_mode.yml diff --git a/changelogs/fragments/69571-ce_modify_the_parse_mode.yml b/changelogs/fragments/69571-ce_modify_the_parse_mode.yml new file mode 100644 index 00000000000..841e432a056 --- /dev/null +++ b/changelogs/fragments/69571-ce_modify_the_parse_mode.yml @@ -0,0 +1,2 @@ +bugfixes: +- "ce - Modify the way of parsing NETCONF XML message in ce.py (https://github.com/ansible/ansible/pull/69571 https://github.com/ansible-collections/community.network/pull/39)." diff --git a/lib/ansible/module_utils/network/cloudengine/ce.py b/lib/ansible/module_utils/network/cloudengine/ce.py index 01df0e795de..44d0f2384c7 100644 --- a/lib/ansible/module_utils/network/cloudengine/ce.py +++ b/lib/ansible/module_utils/network/cloudengine/ce.py @@ -367,7 +367,7 @@ def get_nc_next(module, xml_str): except ConnectionError: break if result is not None: - return etree.tostring(result) + return to_string(to_xml(result)) return result