print debugging
This commit is contained in:
parent
2ce638ab29
commit
92af0192c7
@ -2,6 +2,7 @@ import re
|
||||
import sys
|
||||
import json
|
||||
import ipaddress
|
||||
import pprint
|
||||
from datetime import datetime, timedelta
|
||||
from flask import Blueprint, current_app, render_template, make_response, session, request, redirect, url_for
|
||||
from flask_mail import Message
|
||||
@ -113,6 +114,11 @@ def index():
|
||||
|
||||
virt_vms_by_id = get_all_vms_from_hosts()
|
||||
|
||||
pprint.pprint(db_vms_by_id)
|
||||
|
||||
|
||||
pprint.pprint(virt_vms_by_id)
|
||||
|
||||
virt_vm_id_by_ipv4 = dict()
|
||||
for vm_id, virt_vm in virt_vms_by_id.items():
|
||||
virt_vm_id_by_ipv4[virt_vm['public_ipv4']] = vm_id
|
||||
|
@ -40,7 +40,9 @@
|
||||
|
||||
{% if in_db_but_not_in_virt|length > 0 %}
|
||||
<div class="third-margin">
|
||||
<div class="row">
|
||||
<h1>🚨 in the database but not in the virtualization model 🚨</h1>
|
||||
</div>
|
||||
{% for vm in in_db_but_not_in_virt %}
|
||||
<div class="row">
|
||||
{{vm['id']}} {{vm['public_ipv4']}}
|
||||
@ -54,7 +56,9 @@
|
||||
|
||||
{% if state_not_equal_to_desired_state|length > 0 %}
|
||||
<div class="third-margin">
|
||||
<div class="row">
|
||||
<h1>😴 vm state != desired state 😴</h1>
|
||||
</div>
|
||||
{% for vm in state_not_equal_to_desired_state %}
|
||||
<div class="row">
|
||||
<div>{{vm['id']}}: state={{vm['state']}} desired_state={{vm['desired_state']}}</div>
|
||||
@ -75,7 +79,9 @@
|
||||
|
||||
{% if stole_someone_elses_ip_and_own_ip_avaliable|length > 0 %}
|
||||
<div class="third-margin">
|
||||
<div class="row">
|
||||
<h1>👻 stole someone elses ip and own desired ip is avaliable 👻</h1>
|
||||
</div>
|
||||
{% for vm in stole_someone_elses_ip_and_own_ip_avaliable %}
|
||||
<div class="row">
|
||||
<div>{{vm['id']}}: current_ipv4={{vm['current_ipv4']}} desired_ipv4={{vm['desired_ipv4']}}</div>
|
||||
@ -93,7 +99,9 @@
|
||||
|
||||
{% if has_wrong_ip|length > 0 %}
|
||||
<div class="third-margin">
|
||||
<div class="row">
|
||||
<h1>🥴 has wrong ip address 🥴</h1>
|
||||
</div>
|
||||
{% for vm in has_wrong_ip %}
|
||||
<div class="row">
|
||||
<div>{{vm['id']}}: current_ipv4={{vm['current_ipv4']}} desired_ipv4={{vm['desired_ipv4']}}</div>
|
||||
@ -112,7 +120,9 @@
|
||||
|
||||
{% if stole_someone_elses_ip_but_own_ip_also_stolen|length > 0 %}
|
||||
<div class="third-margin">
|
||||
<div class="row">
|
||||
<h1>💀 stole someone elses ip but own desired ip was also stolen 💀</h1>
|
||||
</div>
|
||||
{% for vm in stole_someone_elses_ip_but_own_ip_also_stolen %}
|
||||
<div class="row">
|
||||
<div>{{vm['id']}}: current_ipv4={{vm['current_ipv4']}} desired_ipv4={{vm['desired_ipv4']}}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user