From d350269da153bcce831a55cee845108aa7f5cfd6 Mon Sep 17 00:00:00 2001 From: yanzhangi <51999930+yanzhangi@users.noreply.github.com> Date: Tue, 13 Aug 2019 09:23:52 +0800 Subject: [PATCH] update ce_acl to fix bugs (#60357) * update ce_acl to fix bugs (#60274) (cherry picked from commit 66c3e9bb9bb33e54d23ebbaa7e3d7db49003438c) * Update ce_acl modified information --- changelogs/fragments/60274-ce_acl-to-fix-bugs.yml | 2 ++ lib/ansible/modules/network/cloudengine/ce_acl.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/60274-ce_acl-to-fix-bugs.yml diff --git a/changelogs/fragments/60274-ce_acl-to-fix-bugs.yml b/changelogs/fragments/60274-ce_acl-to-fix-bugs.yml new file mode 100644 index 00000000000..1ad14e555fa --- /dev/null +++ b/changelogs/fragments/60274-ce_acl-to-fix-bugs.yml @@ -0,0 +1,2 @@ +bugfixes: +- ce_acl - update to fix some bugs - When the frag_type parameter is in the module and the configuration is repeatedly sent to the device, the module displays change = True. (https://github.com/ansible/ansible/pull/60274) diff --git a/lib/ansible/modules/network/cloudengine/ce_acl.py b/lib/ansible/modules/network/cloudengine/ce_acl.py index 0968f414801..4885c34320d 100644 --- a/lib/ansible/modules/network/cloudengine/ce_acl.py +++ b/lib/ansible/modules/network/cloudengine/ce_acl.py @@ -650,7 +650,8 @@ class BaseAcl(object): find_flag = False if self.src_wild and tmp.get("aclSrcWild") != self.src_wild: find_flag = False - if self.frag_type and tmp.get("aclFragType") != self.frag_type: + frag_type = "clear_fragment" if tmp.get("aclFragType") is None else tmp.get("aclFragType") + if self.frag_type and frag_type != self.frag_type: find_flag = False if self.vrf_name and tmp.get("vrfName") != self.vrf_name: find_flag = False