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
pull/58633/head
YuandongXu 5 years ago committed by ansibot
parent 23139cdbb9
commit 2f91266aa9

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

Loading…
Cancel
Save