From 2f91266aa9b5ac682889829505f4c1d738057942 Mon Sep 17 00:00:00 2001 From: YuandongXu Date: Sat, 29 Jun 2019 05:11:02 +0800 Subject: [PATCH] ce_vxlan_gateway: update the regular expression to match the more accurate. (#58226) * Update the regular expression to match the more accurate * Update the regular expression to match the more accurate * Update the regular expression to match the more accurate --- lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py b/lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py index e59fc0be0e..22c9127ed0 100644 --- a/lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py +++ b/lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py @@ -398,11 +398,11 @@ class VxlanGateway(object): """get current configuration""" flags = list() - exp = " | ignore-case section include dfs-group" + exp = r" | ignore-case section include ^#\s+dfs-group" if self.vpn_instance: - exp += "|^ip vpn-instance %s$" % self.vpn_instance + exp += r"|^#\s+ip vpn-instance %s" % self.vpn_instance if self.vbdif_name: - exp += "|^interface %s$" % self.vbdif_name + exp += r"|^#\s+interface %s" % self.vbdif_name flags.append(exp) return self.get_config(flags)