include manufacturer

This commit is contained in:
Jeffrey C. Ollie 2023-10-30 22:26:24 -05:00
parent d8700a7b20
commit 522501d598
Signed by: jeff
GPG key ID: 6F86035A6D97044E
2 changed files with 9 additions and 0 deletions

View file

@ -53,6 +53,9 @@ class Entry(BaseModel):
address: str
port: int
username: str
manufacturer: str
model: str
part_number: str
Config = TypeAdapter(dict[str, Entry])

View file

@ -48,6 +48,9 @@ def main():
),
"port": port,
"username": "jcollie",
"manufacturer": device.device_type.manufacturer.name,
"model": device.device_type.model,
"part_number": device.device_type.part_number,
}
print(name, str(ipaddress.ip_interface(device.primary_ip4.address).ip))
@ -76,6 +79,9 @@ def main():
),
"port": port,
"username": "apc",
"manufacturer": device.device_type.manufacturer.name,
"model": device.device_type.model,
"part_number": device.device_type.part_number,
}
print(name, str(ipaddress.ip_interface(device.primary_ip4.address).ip))