From 4a6c86715a591394049f8f2e74243f2520ccc582 Mon Sep 17 00:00:00 2001 From: YuandongXu <786018072@qq.com> Date: Sat, 29 Jun 2019 04:14:41 +0800 Subject: [PATCH] update to fix a bug (#58207) --- lib/ansible/modules/network/cloudengine/ce_bfd_view.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/cloudengine/ce_bfd_view.py b/lib/ansible/modules/network/cloudengine/ce_bfd_view.py index d8b90c28354..d87317e0b09 100644 --- a/lib/ansible/modules/network/cloudengine/ce_bfd_view.py +++ b/lib/ansible/modules/network/cloudengine/ce_bfd_view.py @@ -284,13 +284,13 @@ class BfdView(object): root = ElementTree.fromstring(xml_str) # get bfd global info - glb = root.find("data/bfd/bfdSchGlobal") + glb = root.find("bfd/bfdSchGlobal") if glb: for attr in glb: bfd_dict["global"][attr.tag] = attr.text # get bfd session info - sess = root.find("data/bfd/bfdCfgSessions/bfdCfgSession") + sess = root.find("bfd/bfdCfgSessions/bfdCfgSession") if sess: for attr in sess: bfd_dict["session"][attr.tag] = attr.text @@ -497,6 +497,8 @@ class BfdView(object): return self.end_state["session"] = bfd_dict.get("session") + if self.end_state == self.existing: + self.changed = False def work(self): """worker"""