Adds OVH instance detection
This commit is contained in:
parent
7658409d15
commit
0501797fc0
2 changed files with 25 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ from netbox_agent.logging import logging # NOQA
|
||||||
from netbox_agent.vendors.dell import DellHost
|
from netbox_agent.vendors.dell import DellHost
|
||||||
from netbox_agent.vendors.generic import GenericHost
|
from netbox_agent.vendors.generic import GenericHost
|
||||||
from netbox_agent.vendors.scaleway import ScalewayHost
|
from netbox_agent.vendors.scaleway import ScalewayHost
|
||||||
|
from netbox_agent.vendors.ovh import OvhHost
|
||||||
from netbox_agent.vendors.hp import HPHost
|
from netbox_agent.vendors.hp import HPHost
|
||||||
from netbox_agent.vendors.qct import QCTHost
|
from netbox_agent.vendors.qct import QCTHost
|
||||||
from netbox_agent.vendors.supermicro import SupermicroHost
|
from netbox_agent.vendors.supermicro import SupermicroHost
|
||||||
|
|
@ -18,6 +19,7 @@ MANUFACTURERS = {
|
||||||
'Supermicro': SupermicroHost,
|
'Supermicro': SupermicroHost,
|
||||||
'Quanta Cloud Technology Inc.': QCTHost,
|
'Quanta Cloud Technology Inc.': QCTHost,
|
||||||
'Scaleway': ScalewayHost,
|
'Scaleway': ScalewayHost,
|
||||||
|
'OpenStack Foundation': OvhHost,
|
||||||
'Generic': GenericHost,
|
'Generic': GenericHost,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
23
netbox_agent/vendors/ovh.py
vendored
Normal file
23
netbox_agent/vendors/ovh.py
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import netbox_agent.dmidecode as dmidecode
|
||||||
|
from netbox_agent.server import ServerBase
|
||||||
|
|
||||||
|
|
||||||
|
class OvhHost(ServerBase):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(OvhHost, self).__init__(*args, **kwargs)
|
||||||
|
self.manufacturer = dmidecode.get_by_type(self.dmi, 'System')[0].get('Manufacturer')
|
||||||
|
|
||||||
|
def is_blade(self):
|
||||||
|
return False
|
||||||
|
|
||||||
|
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()
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue