mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Update slxos_vlan for new SLX-OS versions, linting fixes (#52956)
This commit is contained in:
parent
4ea09d4d96
commit
b92d81cc01
32 changed files with 58 additions and 80 deletions
|
@ -311,7 +311,7 @@ class Interfaces(FactsBase):
|
|||
def populate_ipv6_interfaces(self, data):
|
||||
addresses = re.split(r'-{3,}', data)[1].lstrip()
|
||||
for line in addresses.split('\n'):
|
||||
if len(line) == 0:
|
||||
if not line:
|
||||
break
|
||||
|
||||
match = re.match(r'^([\da-f:]+)/(\d+)\s+([CV])-(\d+)\s+.+$', line)
|
||||
|
@ -350,7 +350,7 @@ class Interfaces(FactsBase):
|
|||
def parse_neighbors(self, neighbors):
|
||||
facts = dict()
|
||||
lines = neighbors.split('Port: ')
|
||||
if len(lines) == 0:
|
||||
if not lines:
|
||||
return facts
|
||||
for line in lines:
|
||||
match = re.search(r'^(\w.*?)\s+Index.*IfName\s+(\w.*)$\s+SysName\s+:\s(\S+)', line, (re.M | re.S))
|
||||
|
@ -368,7 +368,7 @@ class Interfaces(FactsBase):
|
|||
parsed = dict()
|
||||
interfaces = re.split(r'-{3,}', data)[1].lstrip()
|
||||
for line in interfaces.split('\n'):
|
||||
if len(line) == 0:
|
||||
if not line or re.match('^All', line):
|
||||
break
|
||||
else:
|
||||
match = re.split(r'^(\S+)\s+', line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue