305d4d41ec
- Added an option to specify an SSL CA certificates file to talk to the Netbox API - Enhanced GPU expansion bays inventory: internal GPU (VGA) goes into the blade, external GPU (3D) goes into the expansion bay - Unified the way expansion bays are managed (GPU and drive exansion bays) - Started to refactor `network` module to make it more readable - Dependencies in `setup.py` now reads its requirements from `requirements.txt` to avoid double maintenance
23 lines
609 B
Python
23 lines
609 B
Python
import netbox_agent.dmidecode as dmidecode
|
|
from netbox_agent.server import ServerBase
|
|
|
|
|
|
class GenericHost(ServerBase):
|
|
def __init__(self, *args, **kwargs):
|
|
super(GenericHost, self).__init__(*args, **kwargs)
|
|
self.manufacturer = dmidecode.get_by_type(self.dmi, 'Baseboard')[0].get('Manufacturer')
|
|
|
|
def is_blade(self):
|
|
return None
|
|
|
|
def get_blade_slot(self):
|
|
return None
|
|
|
|
def get_chassis_name(self):
|
|
return None
|
|
|
|
def get_chassis(self):
|
|
return self.get_product_name()
|
|
|
|
def get_chassis_service_tag(self):
|
|
return self.get_service_tag()
|