Skip to content
Snippets Groups Projects
Commit 8195afb9 authored by mvrp21's avatar mvrp21
Browse files

fix: updating device for VM

parent 6eaaac25
Branches
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ def update_old_vms(old_vms, new_vms):
# Device & cluster are set by name
# (i don't think I made a cluster name change possible... but whatever)
if old_vms[name][key]['name'] != new_vms[name][key]['name']:
old_vms[name][key]['name'] = new_vms[name][key]['name']
old_vms[name][key] = new_vms[name][key]
something_changed = True
else:
del old_vms[name][key]
......@@ -130,7 +130,7 @@ def update_old_interfaces(proxmox_interfaces, netbox_interfaces):
ni.mac_address = pi['mac_address'].upper()
ni.untagged_vlan = pi['untagged_vlan']
if updated_interface:
updated.append(ni)
updated.append(dict(ni))
break
# if not found: create
if not found:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment