Skip to content

Commit

Permalink
save IPMI IP in field OOB
Browse files Browse the repository at this point in the history
  • Loading branch information
clbu committed Oct 17, 2024
1 parent 8dde35d commit 0cf5861
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions netbox_agent/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@ def netbox_create_or_update(self, config):
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):
Expand Down

0 comments on commit 0cf5861

Please sign in to comment.