print debugging

This commit is contained in:
forest 2021-12-09 13:10:48 -06:00
parent 2ff7a26bf1
commit 288d0c9630

View File

@ -2,6 +2,7 @@ import subprocess
import re
import json
import sys
import pprint
from flask import current_app
from time import sleep
@ -157,7 +158,6 @@ class ShellScriptSpoke(VirtualizationInterface):
#current_app.logger.info(f"list_of_networks: {json.dumps(list_of_networks)}")
networks = dict()
vms_by_id = dict()
vm_id_by_mac = dict()
for network in list_of_networks:
@ -202,7 +202,13 @@ 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:
if vm['network'] not in networks: