2020-02-03 00:38:23 +01:00
|
|
|
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)
|
2020-02-16 20:24:40 +01:00
|
|
|
self.manufacturer = dmidecode.get_by_type(self.dmi, 'Baseboard')[0].get('Manufacturer')
|
2020-02-03 00:38:23 +01:00
|
|
|
|
|
|
|
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()
|