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

View File

@ -203,16 +203,13 @@ class ShellScriptSpoke(VirtualizationInterface):
else: else:
current_app.logger.warn(f"get_all_by_host_and_network: {status['mac-address']} not in vm_id_by_mac") 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() 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: if vm['network'] not in networks:
networks[vm['network']] = [] networks[vm['network']] = []
networks[vm['network']].append(vm) networks[vm['network']].append(vm)
to_return = dict() to_return = dict()