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
|
||||
description
|
||||
mode
|
||||
type
|
||||
ip_addresses {
|
||||
address
|
||||
}
|
||||
untagged_vlan {
|
||||
name
|
||||
}
|
||||
|
@ -130,6 +134,8 @@ for device in data["device_list"]:
|
|||
"description": description,
|
||||
"enabled": interface["enabled"],
|
||||
"mode": interface["mode"],
|
||||
"type": interface["type"],
|
||||
"ips": sorted({i['address'] for i in interface['ip_addresses']}),
|
||||
"untagged_vlan": interface["untagged_vlan"]["name"]
|
||||
if interface["untagged_vlan"]
|
||||
else None,
|
||||
|
|
Loading…
Reference in a new issue