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
This commit is contained in:
YuandongXu 2019-06-29 05:11:02 +08:00 committed by ansibot
parent 23139cdbb9
commit 2f91266aa9

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)