Add missing prtint debug
This commit is contained in:
parent
12ceea413c
commit
6ef23eae4d
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@ from netbox_agent.location import Tenant
|
||||||
from netbox_agent.logging import logging # NOQA
|
from netbox_agent.logging import logging # NOQA
|
||||||
from netbox_agent.misc import create_netbox_tags, get_hostname, get_device_platform
|
from netbox_agent.misc import create_netbox_tags, get_hostname, get_device_platform
|
||||||
from netbox_agent.network import VirtualNetwork
|
from netbox_agent.network import VirtualNetwork
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
|
||||||
def is_vm(dmi):
|
def is_vm(dmi):
|
||||||
|
@ -138,3 +139,14 @@ class VirtualMachine(object):
|
||||||
|
|
||||||
if updated:
|
if updated:
|
||||||
vm.save()
|
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
|
||||||
|
|
Loading…
Reference in a new issue