nxos: 32 bits AS in as-dot format not recognized by regexp asn_regex (#30569)

* added test for 32 bits AS

* Lint not happy.
This commit is contained in:
Arnaud 2017-11-20 11:09:16 +01:00 committed by Trishna Guha
commit 84117e57ba
6 changed files with 46 additions and 4 deletions

View file

@ -461,7 +461,7 @@ def get_existing(module, args, warnings):
existing = {}
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module, flags=['bgp all']))
asn_re = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+).*', re.S)
asn_re = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*', re.S)
asn_match = asn_re.match(str(netcfg))
if asn_match:

View file

@ -449,7 +449,7 @@ def get_existing(module, args, warnings):
existing = {}
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
asn_regex = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+).*', re.DOTALL)
asn_regex = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*', re.DOTALL)
match_asn = asn_regex.match(str(netcfg))
if match_asn:

View file

@ -308,7 +308,7 @@ def get_existing(module, args, warnings):
existing = {}
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
asn_regex = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+).*', re.S)
asn_regex = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*', re.S)
match_asn = asn_regex.match(str(netcfg))
if match_asn:

View file

@ -446,7 +446,7 @@ def get_existing(module, args, warnings):
existing = {}
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
asn_regex = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+).*', re.S)
asn_regex = re.compile(r'.*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*', re.S)
match_asn = asn_regex.match(str(netcfg))
if match_asn: