Backport/2.8/58226 ce_vxlan_gateway: update the regular expression to match the more acc… (#58557)

* 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

(cherry picked from commit 2f91266aa9)

* add a changlog fragment to PR 58557.

* Update 58226-update-ce_vxlan_gateway-to-fix-a-bug.yml
This commit is contained in:
Xu Yuandong 2019-07-18 03:14:48 +08:00 committed by Toshio Kuratomi
parent d170588ab6
commit 6491c5cdd7
2 changed files with 5 additions and 3 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ce_vxlan_gateway - update the regular expression to match the more.(https://github.com/ansible/ansible/pull/58226)

View file

@ -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)