Add missing prtint debug

This commit is contained in:
Grégoire Compagnon 2023-08-21 20:38:41 +02:00 committed by Tom Hubrecht
parent 12ceea413c
commit 6ef23eae4d
Signed by: thubrecht
SSH key fingerprint: SHA256:CYNvFo44Ar9qCNnWNnvJVhs0QXO9AZjOLlPeWcSij3Q

View file

@ -7,6 +7,7 @@ from netbox_agent.location import Tenant
from netbox_agent.logging import logging # NOQA
from netbox_agent.misc import create_netbox_tags, get_hostname, get_device_platform
from netbox_agent.network import VirtualNetwork
from pprint import pprint
def is_vm(dmi):
@ -138,3 +139,14 @@ class VirtualMachine(object):
if updated:
vm.save()
def print_debug(self):
self.network = VirtualNetwork(server=self)
print('Cluster:', self.get_netbox_cluster(config.virtual.cluster_name))
print('Platform:', self.device_platform)
print('VM:', self.get_netbox_vm())
print('vCPU:', self.get_vcpus())
print('Memory:', f"{self.get_memory()} MB")
print('NIC:',)
pprint(self.network.get_network_cards())
pass