Solvik / netbox-agent

Netbox agent to run on your infrastructure's servers
Apache License 2.0
299 stars 77 forks source link

'VirtualMachine' object has no attribute 'print_debug' #190

Open taupehat opened 3 years ago

taupehat commented 3 years ago

When attempting "netbox_agent -c /etc/netbox_agent.yaml --register --debug" from a virtual machine the following is output: Exception: virtual.cluster_name parameter is mandatory because it's a VM

So I added to the config: virtual: cluster_name: cluster.whatever

Which then throws: AttributeError: 'VirtualMachine' object has no attribute 'print_debug'

Seems like a pretty simple fix to add debug here, and obviously useful.

Configuration file netbox: url: 'https://something.example' token: '[redacted]' ssl_verify: false

network: ignore_interfaces: "(dummy.|docker.)" ignore_ips: (127.0.0..*)

device: server_role: "Server"

virtual: cluster_name: foo.whatever

inventory: true

Environment: Centos 7 (64-bit) running on current ESXi Netbox agent version 0.6.2

cyrinux commented 2 years ago

Hi @taupehat can you still reproduce this with the tag 0.7.2 ?

correoenuve commented 2 years ago

Same issue