1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-23 00:29:59 +02:00

Start to fix AIX ARP support

This commit is contained in:
Dave Marquardt
2023-01-06 10:00:58 -06:00
parent cad94cc6b3
commit df72b16022

View File

@ -222,14 +222,24 @@ def parse(
else:
for line in cleandata:
splitline = line.split()
if '<incomplete>' not in splitline:
# Ignore AIX bucket information
if 'bucket:' in splitline[0]:
continue
elif 'There' in splitline[0] and 'are' in splitline[1]:
continue
elif '<incomplete>' not in splitline:
output_line = {
'name': splitline[0],
'address': splitline[1].lstrip('(').rstrip(')'),
'hwtype': splitline[4].lstrip('[').rstrip(']'),
'hwaddress': splitline[3],
'iface': splitline[6],
}
# AIX tells what bucket the entry is in, and no interface
# information
if 'in' not in splitline[6]:
output_line['iface'] = splitline[6]
else:
output_line = {