Several minor fixes (#47)

Several minor fixes:
- raid_array check should return an empty array, not NoneType
- not all systems will have IPv6 defined, handle this case
- Vendor Supermicro was incomplete.
This commit is contained in:
ThomasADavis 2019-08-29 08:33:27 -07:00 committed by Solvik
parent 0faee59bde
commit 6ec08e8669
3 changed files with 31 additions and 4 deletions

View file

@ -3,8 +3,14 @@ from netbox_agent.server import ServerBase
class SupermicroHost(ServerBase):
def __init__(self, *args, **kwargs):
super(SupermicroHost, self).__init__(*args, **kwargs)
self.manufacturer = 'Supermicro'
def is_blade(self):
return self.get_product_name().startswith('SBI')
blade = self.get_product_name().startswith('SBI')
blade |= self.get_product_name().startswith('SYS')
return blade
def get_blade_slot(self):
if self.is_blade():