fix(server): improve code
This commit is contained in:
parent
2caf2a0042
commit
ca7bb74c3a
1 changed files with 3 additions and 2 deletions
|
@ -483,11 +483,12 @@ class ServerBase():
|
|||
if update:
|
||||
expansion.save()
|
||||
|
||||
myip = nb.ipam.ip_addresses.filter(device_id=server.id)
|
||||
myips = nb.ipam.ip_addresses.filter(device_id=server.id)
|
||||
|
||||
for ip in myip:
|
||||
for ip in myips:
|
||||
if ip.assigned_object.display == "IPMI":
|
||||
server.update({'oob_ip': ip.id})
|
||||
break
|
||||
|
||||
logging.debug('Finished updating Server!')
|
||||
|
||||
|
|
Loading…
Reference in a new issue