This commit is contained in:
forest 2021-12-10 20:01:30 -05:00
parent c11d4001ce
commit 63332108aa
3 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,8 @@ def index():
db_vms_by_id = get_all_vms_from_db()
virt_vms_by_id = get_all_vms_from_hosts(db_vms_by_id)
current_app.logger.info(pprint.pformat(virt_vms_by_id))
current_app.logger.info(f"\n*******************1:\n{pprint.pformat(virt_vms_by_id)}\n\n\n\n")
network_display_width_px = float(270)
#operations = get_model().list_all_operations()

View File

@ -1,4 +1,5 @@
import pprint
from flask import current_app
from capsulflask.db import get_model
@ -45,6 +46,7 @@ def get_all_vms_from_db() -> dict:
# this returns the same shape of object as get_all_vms_from_db except it has 'state' instead of 'desired_state'
def get_all_vms_from_hosts(db_vms_by_id: dict) -> dict:
virt_vms_by_id = current_app.config["HUB_MODEL"].get_all_by_id()
current_app.logger.info(f"\n*******************2:\n{pprint.pformat(virt_vms_by_id)}\n\n\n\n")
db_hosts = get_model().list_hosts_with_networks(None)
for vm_id, virt_vm in virt_vms_by_id.items():

View File

@ -209,6 +209,8 @@ class ShellScriptSpoke(VirtualizationInterface):
else:
current_app.logger.warn(f"get_all_by_id: {status['mac-address']} not in vm_id_by_mac")
current_app.logger.info(f"\n*******************3:\n{pprint.pformat(vms_by_id)}\n\n\n\n")
return vms_by_id