scripts/netbox-dump: also add interface type and ip addresses
This commit is contained in:
parent
a738b49aa4
commit
66c6a92ec5
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,10 @@ QUERY = """{
|
||||||
enabled
|
enabled
|
||||||
description
|
description
|
||||||
mode
|
mode
|
||||||
|
type
|
||||||
|
ip_addresses {
|
||||||
|
address
|
||||||
|
}
|
||||||
untagged_vlan {
|
untagged_vlan {
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
@ -130,6 +134,8 @@ for device in data["device_list"]:
|
||||||
"description": description,
|
"description": description,
|
||||||
"enabled": interface["enabled"],
|
"enabled": interface["enabled"],
|
||||||
"mode": interface["mode"],
|
"mode": interface["mode"],
|
||||||
|
"type": interface["type"],
|
||||||
|
"ips": sorted({i['address'] for i in interface['ip_addresses']}),
|
||||||
"untagged_vlan": interface["untagged_vlan"]["name"]
|
"untagged_vlan": interface["untagged_vlan"]["name"]
|
||||||
if interface["untagged_vlan"]
|
if interface["untagged_vlan"]
|
||||||
else None,
|
else None,
|
||||||
|
|
Loading…
Reference in a new issue