f06da32fc3
Add ability to create Virtual Machine in netbox with an auto-detecting feature (currently VirtualBox, Xen, Hyper-V, VMWare, GCP) One caveat, I made the choice not to report the disk as Netbox model allow only one size but VM often have multiples. Also, lot of code refactoring to be able to use create_or_update function style, fixing a lot of corner case
9 lines
200 B
Python
9 lines
200 B
Python
import logging
|
|
|
|
from netbox_agent.config import config
|
|
|
|
logger = logging.getLogger()
|
|
if config.log_level.lower() == 'debug':
|
|
logger.setLevel(logging.DEBUG)
|
|
else:
|
|
logger.setLevel(logging.INFO)
|