|
|
|
@ -68,8 +68,12 @@ def get_ipaddress(): |
|
|
|
|
|
|
|
data = [n for n in data if not n.startswith(('lo', '127'))] |
|
|
|
|
|
|
|
itf = dict(zip(*[iter(data)] * 2)) |
|
|
|
data = [i.split(None, 2) for i in data] |
|
|
|
for e in data: |
|
|
|
if len(e) > 2: |
|
|
|
itf = dict(zip([iter(e[0])])) |
|
|
|
else: |
|
|
|
itf = [e[0]] |
|
|
|
|
|
|
|
ips = {'interface': itf, 'itfip': data} |
|
|
|
|
|
|
|
|