oops fix dictionary iteration being set up wrong

This commit is contained in:
forest 2021-12-09 13:16:05 -06:00
parent 288d0c9630
commit 5f87f6ef9b
1 changed files with 4 additions and 7 deletions

View File

@ -202,17 +202,14 @@ class ShellScriptSpoke(VirtualizationInterface):
vms_by_id[vm_id]['ipv4'] = status['ip-address']
else:
current_app.logger.warn(f"get_all_by_host_and_network: {status['mac-address']} not in vm_id_by_mac")
pprint.pprint("vms_by_id")
pprint.pprint(vms_by_id)
pprint.pprint("vm_id_by_mac")
pprint.pprint(vm_id_by_mac)
networks = dict()
for vm in vms_by_id:
for vm_id in vms_by_id:
vm = vms_by_id[vm_id]
if vm['network'] not in networks:
networks[vm['network']] = []
networks[vm['network']].append(vm)
to_return = dict()