* update to fix a bug. (#58200)
(cherry picked from commit 875e7c3e50
)
* add a changlog fragment to PR 58200.
* Update 58200-update-ce_bfd_global-to-fix-a-bug.yml
This commit is contained in:
parent
b53ed66d78
commit
db5ceb2390
2 changed files with 6 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- ce_bfd_global - line284, 'data' tag of xpath should be removed.
|
||||
line498, add "self.existing == self.end_state" to compare the status and get 'changed'.
|
|
@ -281,7 +281,7 @@ class BfdGlobal(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
|
||||
|
@ -495,6 +495,8 @@ class BfdGlobal(object):
|
|||
return
|
||||
|
||||
self.end_state["global"] = bfd_dict.get("global")
|
||||
if self.existing == self.end_state:
|
||||
self.changed = False
|
||||
|
||||
def work(self):
|
||||
"""worker"""
|
||||
|
|
Loading…
Reference in a new issue