start adding lshw support..

This commit is contained in:
Thomas Davis 2019-08-29 12:51:15 -07:00
commit c502e5def8

View file

@ -6,11 +6,13 @@ from netbox_agent.config import netbox_instance as nb, INVENTORY_ENABLED
from netbox_agent.misc import is_tool from netbox_agent.misc import is_tool
from netbox_agent.raid.hp import HPRaid from netbox_agent.raid.hp import HPRaid
from netbox_agent.raid.storcli import StorcliRaid from netbox_agent.raid.storcli import StorcliRaid
from netbox_agent.lshw import LSHW
INVENTORY_TAG = { INVENTORY_TAG = {
'cpu': {'name': 'hw:cpu', 'slug': 'hw-cpu'}, 'cpu': {'name': 'hw:cpu', 'slug': 'hw-cpu'},
'memory': {'name': 'hw:memory', 'slug': 'hw-memory'},
'disk': {'name': 'hw:disk', 'slug': 'hw-disk'}, 'disk': {'name': 'hw:disk', 'slug': 'hw-disk'},
'memory': {'name': 'hw:memory', 'slug': 'hw-memory'},
'network':{'name': 'hw:network', 'slug':'hw-network'},
'raid_card': {'name': 'hw:raid_card', 'slug': 'hw-raid-card'}, 'raid_card': {'name': 'hw:raid_card', 'slug': 'hw-raid-card'},
} }
@ -55,6 +57,8 @@ class Inventory():
self.raid = None self.raid = None
self.disks = [] self.disks = []
self.lshw = LSHW()
def get_cpus(self): def get_cpus(self):
model = None model = None
nb = None nb = None