From 227efbc7aedfa4062f8155c10c301716cb1a6a40 Mon Sep 17 00:00:00 2001 From: yanzhangi <51999930+yanzhangi@users.noreply.github.com> Date: Thu, 19 Sep 2019 22:39:24 +0800 Subject: [PATCH] [Backport/2.9/61684]Update ce_ospf to fix bugs (#62597) * Update ce_ospf to fix bugs (cherry picked from commit 1583c5ead2f9a648a026dff3bfffcaf0cdc2078e) * Update ce_ospf modified information --- changelogs/fragments/61684-ce_ospf-to-fix-bugs.yml | 2 ++ lib/ansible/modules/network/cloudengine/ce_ospf.py | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/61684-ce_ospf-to-fix-bugs.yml diff --git a/changelogs/fragments/61684-ce_ospf-to-fix-bugs.yml b/changelogs/fragments/61684-ce_ospf-to-fix-bugs.yml new file mode 100644 index 00000000000..1f9a1480b91 --- /dev/null +++ b/changelogs/fragments/61684-ce_ospf-to-fix-bugs.yml @@ -0,0 +1,2 @@ +bugfixes: +- ce_ospf - update to fix some bugs - Contrast before and after adding configuration. (https://github.com/ansible/ansible/pull/61684) diff --git a/lib/ansible/modules/network/cloudengine/ce_ospf.py b/lib/ansible/modules/network/cloudengine/ce_ospf.py index 2569281f8e8..cb1b7fdc59c 100644 --- a/lib/ansible/modules/network/cloudengine/ce_ospf.py +++ b/lib/ansible/modules/network/cloudengine/ce_ospf.py @@ -514,9 +514,6 @@ class OSPF(object): for network in area.get("networks"): if network["ipAddress"] == self.addr and network["wildcardMask"] == self.get_wildcard_mask(): return True - else: - break - return False def is_nexthop_exist(self): @@ -890,7 +887,8 @@ class OSPF(object): self.end_state["max_load_balance"] = ospf_info.get("maxLoadBalancing") if self.end_state == self.existing: - self.changed = False + if not self.auth_text_simple and not self.auth_text_md5: + self.changed = False def work(self): """worker"""