mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
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:
parent
a9afb1e19e
commit
84117e57ba
6 changed files with 46 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue