more ci fixes..
This commit is contained in:
parent
f4ff32f1b0
commit
39842e609f
2 changed files with 17 additions and 10 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
import logging
|
||||||
|
|
||||||
from netbox_agent.config import netbox_instance as nb, config
|
from netbox_agent.config import netbox_instance as nb, config
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,10 @@ import json
|
||||||
class LSHW():
|
class LSHW():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.hw_info = json.loads(subprocess.check_output(["lshw", "-quiet", "-json"],encoding='utf8'))
|
self.hw_info = json.loads(
|
||||||
|
subprocess.check_output(["lshw", "-quiet", "-json"],
|
||||||
|
encoding='utf8')
|
||||||
|
)
|
||||||
|
|
||||||
self.info = {}
|
self.info = {}
|
||||||
self.memories = []
|
self.memories = []
|
||||||
|
|
@ -77,8 +80,10 @@ class LSHW():
|
||||||
self.disks.append(d)
|
self.disks.append(d)
|
||||||
|
|
||||||
elif "nvme" in obj["configuration"]["driver"]:
|
elif "nvme" in obj["configuration"]["driver"]:
|
||||||
nvme = json.loads(subprocess.check_output(["nvme", '-list', '-o', 'json'],
|
nvme = json.loads(
|
||||||
encoding='utf8'))
|
subprocess.check_output(["nvme", '-list', '-o', 'json'],
|
||||||
|
encoding='utf8')
|
||||||
|
)
|
||||||
|
|
||||||
d = {}
|
d = {}
|
||||||
d["vendor"] = obj["vendor"]
|
d["vendor"] = obj["vendor"]
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue