From 814349c3683e19cc060fcdad92bf2e2f5fae48d7 Mon Sep 17 00:00:00 2001 From: YuandongXu Date: Sat, 15 Jun 2019 10:20:07 +0800 Subject: [PATCH] Backport/2.8/56976 update ce_ntp.py to fix bug (#57175) * update ce_ntp.py and remove the root tag name to find all nodes (#56976) * add a maintainer * update ce_ntp.py and remove the root tag name to find all node * update ce_ntp.py and remove the root tag name to find all node (cherry picked from commit 0137c4343bbc0706024bb50809c22b2b15b1a965) * add changelogs fragments * add changelogs fragments --- ...ce_ntp.py and remove the root tag name to find all nodes.yml | 2 ++ lib/ansible/modules/network/cloudengine/ce_ntp.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml diff --git a/changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml b/changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml new file mode 100644 index 00000000000..68e3387dc58 --- /dev/null +++ b/changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml @@ -0,0 +1,2 @@ +minor_changes: + - update ce_ntp.py and remove the root tag name to find all nodes(https://github.com/ansible/ansible/pull/56976). diff --git a/lib/ansible/modules/network/cloudengine/ce_ntp.py b/lib/ansible/modules/network/cloudengine/ce_ntp.py index ab0dfceeacb..cade2e8e6cc 100644 --- a/lib/ansible/modules/network/cloudengine/ce_ntp.py +++ b/lib/ansible/modules/network/cloudengine/ce_ntp.py @@ -442,7 +442,7 @@ class Ntp(object): # get all ntp config info root = ElementTree.fromstring(xml_str) - ntpsite = root.findall("data/ntp/ntpUCastCfgs/ntpUCastCfg") + ntpsite = root.findall("ntp/ntpUCastCfgs/ntpUCastCfg") for nexthop in ntpsite: ntp_dict = dict() for ele in nexthop: