diff --git a/capsulflask/spoke_model.py b/capsulflask/spoke_model.py index 73f7f5e..b455ece 100644 --- a/capsulflask/spoke_model.py +++ b/capsulflask/spoke_model.py @@ -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()