From 0cf586127210244521239fb5fcd04ee7ea36f43e Mon Sep 17 00:00:00 2001 From: clbu Date: Thu, 17 Oct 2024 10:08:22 +0200 Subject: [PATCH] save IPMI IP in field OOB --- netbox_agent/server.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/netbox_agent/server.py b/netbox_agent/server.py index 5077b7f..e1553c9 100644 --- a/netbox_agent/server.py +++ b/netbox_agent/server.py @@ -482,6 +482,13 @@ class ServerBase(): update += 1 if update: expansion.save() + + myip = nb.ipam.ip_addresses.filter(device_id=server.id) + + for ip in myip: + if ip.assigned_object.display == "IPMI": + server.update({'oob_ip': ip.id}) + logging.debug('Finished updating Server!') def print_debug(self):