Merge branch 'master' into use-sudo
This commit is contained in:
commit
32bfbe1867
51 changed files with 12763 additions and 493 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -179,3 +179,5 @@ dmypy.json
|
|||
.pyre/
|
||||
|
||||
# End of https://www.gitignore.io/api/emacs,python
|
||||
|
||||
netbox-docker
|
||||
|
|
|
|||
19
.travis.yml
19
.travis.yml
|
|
@ -2,20 +2,23 @@ sudo: false
|
|||
dist: xenial
|
||||
language: python
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: 3.5
|
||||
env: TOXENV=py35
|
||||
env: TOXENV=pytest
|
||||
- python: 3.6
|
||||
env: TOXENV=py36
|
||||
env: TOXENV=pytest
|
||||
- python: 3.7
|
||||
env: TOXENV=py37
|
||||
env: TOXENV=pytest
|
||||
- python: pypy3
|
||||
env: TOXENV=pypy3
|
||||
env: TOXENV=pytest
|
||||
- python: 3.5
|
||||
env: TOXENV=pep8
|
||||
env: TOXENV=flake8
|
||||
- python: 3.7
|
||||
env: TOXENV=pep8
|
||||
env: TOXENV=flake8
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
|
@ -23,7 +26,7 @@ cache:
|
|||
|
||||
install:
|
||||
- pip install tox
|
||||
- if [[ $TOXENV == py* ]]; then pip install coveralls; fi
|
||||
- if [[ $TOXENV == pytest ]]; then pip install coveralls; fi
|
||||
|
||||
script:
|
||||
- tox
|
||||
|
|
@ -32,4 +35,4 @@ notifications:
|
|||
email: false
|
||||
|
||||
after_success:
|
||||
- if [[ $TOXENV == py* ]]; then coveralls; fi
|
||||
- if [[ $TOXENV == pytest ]]; then coveralls; fi
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -1,5 +1,4 @@
|
|||
# Netbox agent
|
||||
|
||||
# Netbox agent [](https://travis-ci.com/Solvik/netbox-agent)
|
||||
|
||||
This project aims to create hardware automatically into [Netbox](https://github.com/netbox-community/netbox) based on standard tools (dmidecode, lldpd, parsing /sys/, etc).
|
||||
|
||||
|
|
@ -7,7 +6,7 @@ The goal is to generate an existing infrastructure on Netbox and have the abilit
|
|||
|
||||
# Features
|
||||
|
||||
* Create servers, chassis and blade through standard tools (`dmidecode`)
|
||||
* Create virtual machines, servers, chassis and blade through standard tools (`dmidecode`)
|
||||
* Create physical, bonding and vlan network interfaces with IPs (IPv4 & IPv6)
|
||||
* Create IPMI interface if found
|
||||
* Create or get existing VLAN and associate it to interfaces
|
||||
|
|
@ -53,6 +52,12 @@ network:
|
|||
# enable auto-cabling
|
||||
lldp: true
|
||||
|
||||
# virtual:
|
||||
# # not mandatory, can be guessed
|
||||
# enabled: True
|
||||
# # see https://netbox.company.com/virtualization/clusters/
|
||||
# cluster_name: my_vm_cluster
|
||||
|
||||
datacenter_location:
|
||||
driver: "cmd:cat /etc/qualification | tr [a-z] [A-Z]"
|
||||
regex: "DATACENTER: (?P<datacenter>[A-Za-z0-9]+)"
|
||||
|
|
@ -105,6 +110,14 @@ In order to handle this case, user need to set Netbox IP's mode to `Anycast` so
|
|||
|
||||
Tested on:
|
||||
|
||||
## Virtual Machines
|
||||
|
||||
* Hyper-V
|
||||
* VMWare
|
||||
* VirtualBox
|
||||
* AWS
|
||||
* GCP
|
||||
|
||||
## Dell Inc.
|
||||
|
||||
### Blades
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
-r requirements.txt
|
||||
|
||||
pytest
|
||||
pytest-cov
|
||||
mypy
|
||||
flake8==3.7.9
|
||||
pep8-naming==0.9.1
|
||||
flake8-quotes==2.1.1
|
||||
flake8-import-order==0.18.1
|
||||
Sphinx
|
||||
flake8
|
||||
flake8-isort
|
||||
tox
|
||||
|
|
|
|||
|
|
@ -1,31 +1,42 @@
|
|||
from netbox_agent.logging import logging # NOQA
|
||||
from netbox_agent.vendors.dell import DellHost
|
||||
import netbox_agent.dmidecode as dmidecode
|
||||
from netbox_agent.config import config
|
||||
from netbox_agent.logging import logging # NOQA
|
||||
from netbox_agent.vendors.dell import DellHost
|
||||
from netbox_agent.vendors.generic import GenericHost
|
||||
from netbox_agent.vendors.hp import HPHost
|
||||
from netbox_agent.vendors.qct import QCTHost
|
||||
from netbox_agent.vendors.supermicro import SupermicroHost
|
||||
from netbox_agent.virtualmachine import VirtualMachine, is_vm
|
||||
|
||||
MANUFACTURERS = {
|
||||
'Dell Inc.': DellHost,
|
||||
'HP': HPHost,
|
||||
'HPE': HPHost,
|
||||
'Supermicro': SupermicroHost,
|
||||
'Quanta Cloud Technology Inc.': QCTHost,
|
||||
}
|
||||
'Dell Inc.': DellHost,
|
||||
'HP': HPHost,
|
||||
'HPE': HPHost,
|
||||
'Supermicro': SupermicroHost,
|
||||
'Quanta Cloud Technology Inc.': QCTHost,
|
||||
'Generic': GenericHost,
|
||||
}
|
||||
|
||||
|
||||
def run(config):
|
||||
manufacturer = dmidecode.get_by_type('Chassis')[0].get('Manufacturer')
|
||||
server = MANUFACTURERS[manufacturer](dmi=dmidecode)
|
||||
dmi = dmidecode.parse()
|
||||
|
||||
if config.virtual.enabled or is_vm(dmi):
|
||||
if not config.virtual.cluster_name:
|
||||
raise Exception('virtual.cluster_name parameter is mandatory because it\'s a VM')
|
||||
server = VirtualMachine(dmi=dmi)
|
||||
else:
|
||||
manufacturer = dmidecode.get_by_type(dmi, 'Chassis')[0].get('Manufacturer')
|
||||
try:
|
||||
server = MANUFACTURERS[manufacturer](dmi=dmi)
|
||||
except KeyError:
|
||||
server = GenericHost(dmi=dmi)
|
||||
|
||||
if config.debug:
|
||||
server.print_debug()
|
||||
if config.register:
|
||||
server.netbox_create(config)
|
||||
if config.update_all or config.update_network or config.update_location or \
|
||||
if config.register or config.update_all or config.update_network or config.update_location or \
|
||||
config.update_inventory or config.update_psu:
|
||||
server.netbox_update(config)
|
||||
server.netbox_create_or_update(config)
|
||||
return True
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import logging
|
||||
import pynetbox
|
||||
import jsonargparse
|
||||
import sys
|
||||
|
||||
import jsonargparse
|
||||
import pynetbox
|
||||
|
||||
|
||||
def get_config():
|
||||
p = jsonargparse.ArgumentParser(
|
||||
|
|
@ -13,6 +14,8 @@ def get_config():
|
|||
],
|
||||
prog='netbox_agent',
|
||||
description="Netbox agent to run on your infrastructure's servers",
|
||||
env_prefix='NETBOX_AGENT_',
|
||||
default_env=True
|
||||
)
|
||||
p.add_argument('-c', '--config', action=jsonargparse.ActionConfigFile)
|
||||
|
||||
|
|
@ -27,6 +30,8 @@ def get_config():
|
|||
p.add_argument('--log_level', default='debug')
|
||||
p.add_argument('--netbox.url', help='Netbox URL')
|
||||
p.add_argument('--netbox.token', help='Netbox API Token')
|
||||
p.add_argument('--virtual.enabled', action='store_true', help='Is a virtual machine or not')
|
||||
p.add_argument('--virtual.cluster_name', help='Cluster name of VM')
|
||||
p.add_argument('--hostname_cmd', default=None,
|
||||
help="Command to output hostname, used as Device's name in netbox")
|
||||
p.add_argument('--datacenter_location.driver',
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import logging
|
||||
import re as _re
|
||||
import subprocess as _subprocess
|
||||
import sys
|
||||
|
||||
from netbox_agent.misc import is_tool
|
||||
import logging
|
||||
|
||||
_handle_re = _re.compile('^Handle\\s+(.+),\\s+DMI\\s+type\\s+(\\d+),\\s+(\\d+)\\s+bytes$')
|
||||
_in_block_re = _re.compile('^\\t\\t(.+)$')
|
||||
|
|
@ -11,7 +11,7 @@ _record_re = _re.compile('\\t(.+):\\s+(.+)$')
|
|||
_record2_re = _re.compile('\\t(.+):$')
|
||||
|
||||
_type2str = {
|
||||
0: 'BIOS',
|
||||
0: 'BIOS',
|
||||
1: 'System',
|
||||
2: 'Baseboard',
|
||||
3: 'Chassis',
|
||||
|
|
@ -60,19 +60,22 @@ for type_id, type_str in _type2str.items():
|
|||
_str2type[type_str] = type_id
|
||||
|
||||
|
||||
def parse():
|
||||
def parse(output=None):
|
||||
"""
|
||||
parse the full output of the dmidecode
|
||||
command and return a dic containing the parsed information
|
||||
"""
|
||||
buffer = _execute_cmd()
|
||||
if output:
|
||||
buffer = output
|
||||
else:
|
||||
buffer = _execute_cmd()
|
||||
if isinstance(buffer, bytes):
|
||||
buffer = buffer.decode('utf-8')
|
||||
_data = _parse(buffer)
|
||||
return _data
|
||||
|
||||
|
||||
def get_by_type(type_id):
|
||||
def get_by_type(data, type_id):
|
||||
"""
|
||||
filter the output of dmidecode per type
|
||||
0 BIOS
|
||||
|
|
@ -124,7 +127,6 @@ def get_by_type(type_id):
|
|||
if type_id is None:
|
||||
return None
|
||||
|
||||
data = parse()
|
||||
result = []
|
||||
for entry in data.values():
|
||||
if entry['DMIType'] == type_id:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import re
|
||||
from shutil import which
|
||||
import subprocess
|
||||
from shutil import which
|
||||
|
||||
# Originally from https://github.com/opencoff/useful-scripts/blob/master/linktest.py
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ field_map = {
|
|||
'Supported ports': 'ports',
|
||||
'Supported link modes': 'sup_link_modes',
|
||||
'Supports auto-negotiation': 'sup_autoneg',
|
||||
'Advertised link modes': 'adv_link_modes',
|
||||
'Advertised link modes': 'adv_link_modes',
|
||||
'Advertised auto-negotiation': 'adv_autoneg',
|
||||
'Speed': 'speed',
|
||||
'Duplex': 'duplex',
|
||||
|
|
@ -31,6 +31,7 @@ class Ethtool():
|
|||
There is several bindings to have something proper, but it requires
|
||||
compilation and other requirements.
|
||||
"""
|
||||
|
||||
def __init__(self, interface, *args, **kwargs):
|
||||
self.interface = interface
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ class Ethtool():
|
|||
if field not in field_map:
|
||||
continue
|
||||
field = field_map[field]
|
||||
output = line[r+1:].strip()
|
||||
output = line[r + 1:].strip()
|
||||
fields[field] = output
|
||||
else:
|
||||
if len(field) > 0 and \
|
||||
|
|
@ -63,14 +64,12 @@ class Ethtool():
|
|||
return fields
|
||||
|
||||
def _parse_ethtool_module_output(self):
|
||||
status, output = subprocess.getstatusoutput(
|
||||
'sudo /usr/sbin/ethtool -m {}'.format(self.interface)
|
||||
)
|
||||
if status != 0:
|
||||
return {}
|
||||
r = re.search(r'Identifier.*\((\w+)\)', output)
|
||||
if r and len(r.groups()) > 0:
|
||||
return {'form_factor': r.groups()[0]}
|
||||
status, output = subprocess.getstatusoutput('sudo ethtool -m {}'.format(self.interface))
|
||||
if status == 0:
|
||||
r = re.search(r'Identifier.*\((\w+)\)', output)
|
||||
if r and len(r.groups()) > 0:
|
||||
return {'form_factor': r.groups()[0]}
|
||||
return {}
|
||||
|
||||
def parse(self):
|
||||
if which('ethtool') is None:
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import logging
|
||||
import pynetbox
|
||||
import re
|
||||
|
||||
from netbox_agent.config import netbox_instance as nb, config
|
||||
from netbox_agent.misc import is_tool, get_vendor
|
||||
import pynetbox
|
||||
|
||||
from netbox_agent.config import config
|
||||
from netbox_agent.config import netbox_instance as nb
|
||||
from netbox_agent.lshw import LSHW
|
||||
from netbox_agent.misc import get_vendor, is_tool
|
||||
from netbox_agent.raid.hp import HPRaid
|
||||
from netbox_agent.raid.omreport import OmreportRaid
|
||||
from netbox_agent.raid.storcli import StorcliRaid
|
||||
from netbox_agent.lshw import LSHW
|
||||
|
||||
INVENTORY_TAG = {
|
||||
'cpu': {'name': 'hw:cpu', 'slug': 'hw-cpu'},
|
||||
|
|
@ -16,7 +18,7 @@ INVENTORY_TAG = {
|
|||
'memory': {'name': 'hw:memory', 'slug': 'hw-memory'},
|
||||
'motherboard': {'name': 'hw:motherboard', 'slug': 'hw-motherboard'},
|
||||
'raid_card': {'name': 'hw:raid_card', 'slug': 'hw-raid-card'},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Inventory():
|
||||
|
|
@ -132,8 +134,8 @@ class Inventory():
|
|||
|
||||
motherboards = self.get_hw_motherboards()
|
||||
nb_motherboards = self.get_netbox_inventory(
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['motherboard']['slug'])
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['motherboard']['slug'])
|
||||
|
||||
for nb_motherboard in nb_motherboards:
|
||||
if nb_motherboard.serial not in [x['serial'] for x in motherboards]:
|
||||
|
|
@ -169,8 +171,8 @@ class Inventory():
|
|||
|
||||
def do_netbox_interfaces(self):
|
||||
nb_interfaces = self.get_netbox_inventory(
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['interface']['slug'])
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['interface']['slug'])
|
||||
interfaces = self.lshw.interfaces
|
||||
|
||||
# delete interfaces that are in netbox but not locally
|
||||
|
|
@ -269,9 +271,9 @@ class Inventory():
|
|||
"""
|
||||
|
||||
nb_raid_cards = self.get_netbox_inventory(
|
||||
device_id=self.device_id,
|
||||
tag=[INVENTORY_TAG['raid_card']['slug']]
|
||||
)
|
||||
device_id=self.device_id,
|
||||
tag=[INVENTORY_TAG['raid_card']['slug']]
|
||||
)
|
||||
raid_cards = self.get_raid_cards()
|
||||
|
||||
# delete cards that are in netbox but not locally
|
||||
|
|
@ -296,7 +298,7 @@ class Inventory():
|
|||
|
||||
non_raid_disks = [
|
||||
'MR9361-8i',
|
||||
]
|
||||
]
|
||||
|
||||
if size is None and logicalname is None or \
|
||||
'virtual' in product.lower() or 'logical' in product.lower() or \
|
||||
|
|
@ -321,7 +323,7 @@ class Inventory():
|
|||
|
||||
d = {}
|
||||
d["name"] = ""
|
||||
d['Size'] = '{} GB'.format(int(size/1024/1024/1024))
|
||||
d['Size'] = '{} GB'.format(int(size / 1024 / 1024 / 1024))
|
||||
d['logicalname'] = logicalname
|
||||
d['description'] = description
|
||||
d['SN'] = serial
|
||||
|
|
@ -378,8 +380,8 @@ class Inventory():
|
|||
|
||||
def do_netbox_disks(self):
|
||||
nb_disks = self.get_netbox_inventory(
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['disk']['slug'])
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['disk']['slug'])
|
||||
disks = self.get_hw_disks()
|
||||
|
||||
# delete disks that are in netbox but not locally
|
||||
|
|
@ -421,9 +423,9 @@ class Inventory():
|
|||
def do_netbox_memories(self):
|
||||
memories = self.lshw.memories
|
||||
nb_memories = self.get_netbox_inventory(
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['memory']['slug']
|
||||
)
|
||||
device_id=self.device_id,
|
||||
tag=INVENTORY_TAG['memory']['slug']
|
||||
)
|
||||
|
||||
for nb_memory in nb_memories:
|
||||
if nb_memory.serial not in [x['serial'] for x in memories]:
|
||||
|
|
@ -436,18 +438,7 @@ class Inventory():
|
|||
if memory.get('serial') not in [x.serial for x in nb_memories]:
|
||||
self.create_netbox_memory(memory)
|
||||
|
||||
def create(self):
|
||||
if config.inventory is None:
|
||||
return False
|
||||
self.do_netbox_cpus()
|
||||
self.do_netbox_memories()
|
||||
self.do_netbox_raid_cards()
|
||||
self.do_netbox_disks()
|
||||
self.do_netbox_interfaces()
|
||||
self.do_netbox_motherboard()
|
||||
return True
|
||||
|
||||
def update(self):
|
||||
def create_or_update(self):
|
||||
if config.inventory is None or config.update_inventory is None:
|
||||
return False
|
||||
self.do_netbox_cpus()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import logging
|
||||
import subprocess
|
||||
|
||||
from netaddr import IPNetwork
|
||||
|
||||
|
||||
class IPMI():
|
||||
"""
|
||||
|
|
@ -33,17 +35,34 @@ class IPMI():
|
|||
: O=OEM
|
||||
Bad Password Threshold : Not Available
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.ret, self.output = subprocess.getstatusoutput('sudo /usr/bin/ipmitool lan print')
|
||||
if self.ret != 0:
|
||||
logging.error('Cannot get ipmi info: {}'.format(self.output))
|
||||
|
||||
def parse(self):
|
||||
ret = {}
|
||||
_ipmi = {}
|
||||
if self.ret != 0:
|
||||
return ret
|
||||
return _ipmi
|
||||
|
||||
for line in self.output.splitlines():
|
||||
key = line.split(':')[0].strip()
|
||||
if key not in ['802.1q VLAN ID', 'IP Address', 'Subnet Mask', 'MAC Address']:
|
||||
continue
|
||||
value = ':'.join(line.split(':')[1:]).strip()
|
||||
ret[key] = value
|
||||
_ipmi[key] = value
|
||||
|
||||
ret = {}
|
||||
ret['name'] = 'IPMI'
|
||||
ret['bonding'] = False
|
||||
ret['mac'] = _ipmi['MAC Address']
|
||||
ret['vlan'] = int(_ipmi['802.1q VLAN ID']) \
|
||||
if _ipmi['802.1q VLAN ID'] != 'Disabled' else None
|
||||
ip = _ipmi['IP Address']
|
||||
netmask = _ipmi['Subnet Mask']
|
||||
address = str(IPNetwork('{}/{}'.format(ip, netmask)))
|
||||
|
||||
ret['ip'] = [address]
|
||||
ret['ipmi'] = True
|
||||
return ret
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@ import subprocess
|
|||
|
||||
|
||||
class LLDP():
|
||||
def __init__(self):
|
||||
self.output = subprocess.getoutput('sudo /usr/sbin/lldpctl -f keyvalue')
|
||||
def __init__(self, output=None):
|
||||
if output:
|
||||
self.output = output
|
||||
else:
|
||||
self.output = subprocess.getoutput('sudo /usr/sbin/lldpctl -f keyvalue')
|
||||
self.data = self.parse()
|
||||
|
||||
def parse(self):
|
||||
|
|
@ -49,6 +52,8 @@ class LLDP():
|
|||
# lldp.eth0.port.descr=GigabitEthernet1/0/1
|
||||
if self.data['lldp'].get(interface) is None:
|
||||
return None
|
||||
if self.data['lldp'][interface]['port'].get('ifname'):
|
||||
return self.data['lldp'][interface]['port']['ifname']
|
||||
return self.data['lldp'][interface]['port']['descr']
|
||||
|
||||
def get_switch_vlan(self, interface):
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class LocationBase():
|
|||
There's also a support for an external driver file outside of this project in case
|
||||
the logic isn't supported here.
|
||||
"""
|
||||
|
||||
def __init__(self, driver, driver_value, driver_file, regex, *args, **kwargs):
|
||||
self.driver = driver
|
||||
self.driver_value = driver_value
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@ import logging
|
|||
|
||||
from netbox_agent.config import config
|
||||
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
if config.log_level == 'debug':
|
||||
if config.log_level.lower() == 'debug':
|
||||
logger.setLevel(logging.DEBUG)
|
||||
else:
|
||||
logger.setLevel(logging.INFO)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import subprocess
|
||||
import json
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from netbox_agent.misc import is_tool
|
||||
|
|
@ -105,13 +105,14 @@ class LSHW():
|
|||
self.disks.append(d)
|
||||
|
||||
def find_cpus(self, obj):
|
||||
c = {}
|
||||
c["product"] = obj["product"]
|
||||
c["vendor"] = obj["vendor"]
|
||||
c["description"] = obj["description"]
|
||||
c["location"] = obj["slot"]
|
||||
if "product" in obj:
|
||||
c = {}
|
||||
c["product"] = obj["product"]
|
||||
c["vendor"] = obj["vendor"]
|
||||
c["description"] = obj["description"]
|
||||
c["location"] = obj["slot"]
|
||||
|
||||
self.cpus.append(c)
|
||||
self.cpus.append(c)
|
||||
|
||||
def find_memories(self, obj):
|
||||
if "children" not in obj:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import socket
|
||||
import subprocess
|
||||
from shutil import which
|
||||
|
||||
|
||||
|
|
@ -24,8 +26,14 @@ def get_vendor(name):
|
|||
'MD': 'Toshiba',
|
||||
'MG': 'Toshiba',
|
||||
'WD': 'WDC'
|
||||
}
|
||||
}
|
||||
for key, value in vendors.items():
|
||||
if name.upper().startswith(key):
|
||||
return value
|
||||
return name
|
||||
|
||||
|
||||
def get_hostname(config):
|
||||
if config.hostname_cmd is None:
|
||||
return '{}'.format(socket.gethostname())
|
||||
return subprocess.getoutput(config.hostname_cmd)
|
||||
|
|
|
|||
|
|
@ -1,55 +1,46 @@
|
|||
from itertools import chain
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from itertools import chain
|
||||
|
||||
from netaddr import IPAddress, IPNetwork
|
||||
import netifaces
|
||||
from netaddr import IPAddress
|
||||
|
||||
from netbox_agent.config import netbox_instance as nb, config
|
||||
from netbox_agent.config import config
|
||||
from netbox_agent.config import netbox_instance as nb
|
||||
from netbox_agent.ethtool import Ethtool
|
||||
from netbox_agent.ipmi import IPMI
|
||||
from netbox_agent.lldp import LLDP
|
||||
|
||||
IFACE_TYPE_100ME_FIXED = 800
|
||||
IFACE_TYPE_1GE_FIXED = 1000
|
||||
IFACE_TYPE_1GE_GBIC = 1050
|
||||
IFACE_TYPE_1GE_SFP = 1100
|
||||
IFACE_TYPE_2GE_FIXED = 1120
|
||||
IFACE_TYPE_5GE_FIXED = 1130
|
||||
IFACE_TYPE_10GE_FIXED = 1150
|
||||
IFACE_TYPE_10GE_CX4 = 1170
|
||||
IFACE_TYPE_10GE_SFP_PLUS = 1200
|
||||
IFACE_TYPE_10GE_XFP = 1300
|
||||
IFACE_TYPE_10GE_XENPAK = 1310
|
||||
IFACE_TYPE_10GE_X2 = 1320
|
||||
IFACE_TYPE_25GE_SFP28 = 1350
|
||||
IFACE_TYPE_40GE_QSFP_PLUS = 1400
|
||||
IFACE_TYPE_50GE_QSFP28 = 1420
|
||||
IFACE_TYPE_100GE_CFP = 1500
|
||||
IFACE_TYPE_100GE_CFP2 = 1510
|
||||
IFACE_TYPE_100GE_CFP4 = 1520
|
||||
IFACE_TYPE_100GE_CPAK = 1550
|
||||
IFACE_TYPE_100GE_QSFP28 = 1600
|
||||
IFACE_TYPE_200GE_CFP2 = 1650
|
||||
IFACE_TYPE_200GE_QSFP56 = 1700
|
||||
IFACE_TYPE_400GE_QSFP_DD = 1750
|
||||
IFACE_TYPE_OTHER = 32767
|
||||
IFACE_TYPE_LAG = 200
|
||||
|
||||
IPADDRESS_ROLE_ANYCAST = 30
|
||||
|
||||
|
||||
class Network():
|
||||
class Network(object):
|
||||
def __init__(self, server, *args, **kwargs):
|
||||
self.nics = []
|
||||
|
||||
self.server = server
|
||||
self.device = self.server.get_netbox_server()
|
||||
self.lldp = LLDP() if config.network.lldp else None
|
||||
self.scan()
|
||||
self.nics = self.scan()
|
||||
self.ipmi = None
|
||||
self.dcim_choices = {}
|
||||
dcim_c = nb.dcim.choices()
|
||||
|
||||
for choice in dcim_c:
|
||||
self.dcim_choices[choice] = {}
|
||||
for c in dcim_c[choice]:
|
||||
self.dcim_choices[choice][c['label']] = c['value']
|
||||
|
||||
self.ipam_choices = {}
|
||||
ipam_c = nb.ipam.choices()
|
||||
|
||||
for choice in ipam_c:
|
||||
self.ipam_choices[choice] = {}
|
||||
for c in ipam_c[choice]:
|
||||
self.ipam_choices[choice][c['label']] = c['value']
|
||||
|
||||
def get_network_type():
|
||||
return NotImplementedError
|
||||
|
||||
def scan(self):
|
||||
nics = []
|
||||
for interface in os.listdir('/sys/class/net/'):
|
||||
# ignore if it's not a link (ie: bonding_masters etc)
|
||||
if not os.path.islink('/sys/class/net/{}'.format(interface)):
|
||||
|
|
@ -107,13 +98,14 @@ class Network():
|
|||
x['addr'],
|
||||
IPAddress(x['netmask']).netmask_bits()
|
||||
) for x in ip_addr
|
||||
] if ip_addr else None, # FIXME: handle IPv6 addresses
|
||||
] if ip_addr else None, # FIXME: handle IPv6 addresses
|
||||
'ethtool': Ethtool(interface).parse(),
|
||||
'vlan': vlan,
|
||||
'bonding': bonding,
|
||||
'bonding_slaves': bonding_slaves,
|
||||
}
|
||||
self.nics.append(nic)
|
||||
nics.append(nic)
|
||||
return nics
|
||||
|
||||
def _set_bonding_interfaces(self):
|
||||
bonding_nics = (x for x in self.nics if x['bonding'])
|
||||
|
|
@ -141,49 +133,45 @@ class Network():
|
|||
|
||||
def get_netbox_network_card(self, nic):
|
||||
if nic['mac'] is None:
|
||||
interface = nb.dcim.interfaces.get(
|
||||
device_id=self.device.id,
|
||||
interface = self.nb_net.interfaces.get(
|
||||
name=nic['name'],
|
||||
**self.custom_arg_id,
|
||||
)
|
||||
else:
|
||||
interface = nb.dcim.interfaces.get(
|
||||
device_id=self.device.id,
|
||||
interface = self.nb_net.interfaces.get(
|
||||
mac_address=nic['mac'],
|
||||
name=nic['name'],
|
||||
**self.custom_arg_id,
|
||||
)
|
||||
return interface
|
||||
|
||||
def get_netbox_network_cards(self):
|
||||
return nb.dcim.interfaces.filter(
|
||||
device_id=self.device.id,
|
||||
mgmt_only=False,
|
||||
return self.nb_net.interfaces.filter(
|
||||
**self.custom_arg_id,
|
||||
)
|
||||
|
||||
def get_netbox_type_for_nic(self, nic):
|
||||
if self.get_network_type() == 'virtual':
|
||||
return self.dcim_choices['interface:type']['Virtual']
|
||||
|
||||
if nic.get('bonding'):
|
||||
return IFACE_TYPE_LAG
|
||||
return self.dcim_choices['interface:type']['Link Aggregation Group (LAG)']
|
||||
|
||||
if nic.get('bonding'):
|
||||
return self.dcim_choices['interface:type']['Link Aggregation Group (LAG)']
|
||||
if nic.get('ethtool') is None:
|
||||
return IFACE_TYPE_OTHER
|
||||
return self.dcim_choices['interface:type']['Other']
|
||||
|
||||
if nic['ethtool']['speed'] == '10000Mb/s':
|
||||
if nic['ethtool']['port'] == 'FIBRE':
|
||||
return IFACE_TYPE_10GE_SFP_PLUS
|
||||
return IFACE_TYPE_10GE_FIXED
|
||||
return self.dcim_choices['interface:type']['SFP+ (10GE)']
|
||||
return self.dcim_choices['interface:type']['10GBASE-T (10GE)']
|
||||
|
||||
elif nic['ethtool']['speed'] == '1000Mb/s':
|
||||
if nic['ethtool']['port'] == 'FIBRE':
|
||||
return IFACE_TYPE_1GE_SFP
|
||||
return IFACE_TYPE_1GE_FIXED
|
||||
return IFACE_TYPE_OTHER
|
||||
|
||||
def get_ipmi(self):
|
||||
ipmi = IPMI().parse()
|
||||
return ipmi
|
||||
|
||||
def get_netbox_ipmi(self):
|
||||
ipmi = self.get_ipmi()
|
||||
mac = ipmi['MAC Address']
|
||||
return nb.dcim.interfaces.get(
|
||||
mac=mac
|
||||
)
|
||||
return self.dcim_choices['interface:type']['SFP (1GE)']
|
||||
return self.dcim_choices['interface:type']['1000BASE-T (1GE)']
|
||||
return self.dcim_choices['interface:type']['Other']
|
||||
|
||||
def get_or_create_vlan(self, vlan_id):
|
||||
# FIXME: we may need to specify the datacenter
|
||||
|
|
@ -214,14 +202,16 @@ class Network():
|
|||
interface.untagged_vlan = None
|
||||
# if it's a vlan interface
|
||||
elif vlan_id and (
|
||||
interface.mode is None or interface.mode.value != 200 or
|
||||
len(interface.tagged_vlans) != 1 or
|
||||
interface.tagged_vlans[0].vid != vlan_id):
|
||||
interface.mode is None or
|
||||
type(interface.mode) is not int and (
|
||||
interface.mode.value == self.dcim_choices['interface:mode']['Access'] or
|
||||
len(interface.tagged_vlans) != 1 or
|
||||
interface.tagged_vlans[0].vid != vlan_id)):
|
||||
logging.info('Resetting tagged VLAN(s) on interface {interface}'.format(
|
||||
interface=interface))
|
||||
update = True
|
||||
nb_vlan = self.get_or_create_vlan(vlan_id)
|
||||
interface.mode = 200
|
||||
interface.mode = self.dcim_choices['interface:mode']['Tagged']
|
||||
interface.tagged_vlans = [nb_vlan] if nb_vlan else []
|
||||
interface.untagged_vlan = None
|
||||
# if lldp reports a vlan-id with pvid
|
||||
|
|
@ -229,53 +219,17 @@ class Network():
|
|||
pvid_vlan = [key for (key, value) in lldp_vlan.items() if value['pvid']]
|
||||
if len(pvid_vlan) > 0 and (
|
||||
interface.mode is None or
|
||||
interface.mode.value != 100 or
|
||||
interface.mode.value != self.dcim_choices['interface:mode']['Access'] or
|
||||
interface.untagged_vlan is None or
|
||||
interface.untagged_vlan.vid != int(pvid_vlan[0])):
|
||||
logging.info('Resetting access VLAN on interface {interface}'.format(
|
||||
interface=interface))
|
||||
update = True
|
||||
nb_vlan = self.get_or_create_vlan(pvid_vlan[0])
|
||||
interface.mode = 100
|
||||
interface.mode = self.dcim_choices['interface:mode']['Access']
|
||||
interface.untagged_vlan = nb_vlan.id
|
||||
return update, interface
|
||||
|
||||
def create_or_update_ipmi(self):
|
||||
ipmi = self.get_ipmi()
|
||||
mac = ipmi['MAC Address']
|
||||
ip = ipmi['IP Address']
|
||||
netmask = ipmi['Subnet Mask']
|
||||
vlan = int(ipmi['802.1q VLAN ID']) if ipmi['802.1q VLAN ID'] != 'Disabled' else None
|
||||
address = str(IPNetwork('{}/{}'.format(ip, netmask)))
|
||||
|
||||
interface = nb.dcim.interfaces.get(
|
||||
device_id=self.device.id,
|
||||
mgmt_only=True,
|
||||
)
|
||||
nic = {
|
||||
'name': 'IPMI',
|
||||
'mac': mac,
|
||||
'vlan': vlan,
|
||||
'ip': [address],
|
||||
}
|
||||
if interface is None:
|
||||
interface = self.create_netbox_nic(nic, mgmt=True)
|
||||
self.create_or_update_netbox_ip_on_interface(address, interface)
|
||||
else:
|
||||
# let the user chose the name of mgmt ?
|
||||
# guess it with manufacturer (IDRAC, ILO, ...) ?
|
||||
update = False
|
||||
self.create_or_update_netbox_ip_on_interface(address, interface)
|
||||
update, interface = self.reset_vlan_on_interface(nic, interface)
|
||||
if mac.upper() != interface.mac_address:
|
||||
logging.info('IPMI mac changed from {old_mac} to {new_mac}'.format(
|
||||
old_mac=interface.mac_address, new_mac=mac.upper()))
|
||||
interface.mac_address = mac
|
||||
update = True
|
||||
if update:
|
||||
interface.save()
|
||||
return interface
|
||||
|
||||
def create_netbox_nic(self, nic, mgmt=False):
|
||||
# TODO: add Optic Vendor, PN and Serial
|
||||
type = self.get_netbox_type_for_nic(nic)
|
||||
|
|
@ -283,12 +237,12 @@ class Network():
|
|||
name=nic['name'], mac=nic['mac'], device=self.device.name))
|
||||
|
||||
nb_vlan = None
|
||||
interface = nb.dcim.interfaces.create(
|
||||
device=self.device.id,
|
||||
interface = self.nb_net.interfaces.create(
|
||||
name=nic['name'],
|
||||
mac_address=nic['mac'],
|
||||
type=type,
|
||||
mgmt_only=mgmt,
|
||||
**self.custom_arg,
|
||||
)
|
||||
|
||||
if nic['vlan']:
|
||||
|
|
@ -304,7 +258,7 @@ class Network():
|
|||
for vid, vlan_infos in vlans.items():
|
||||
nb_vlan = self.get_or_create_vlan(vid)
|
||||
if vlan_infos.get('vid'):
|
||||
interface.mode = 100
|
||||
interface.mode = self.dcim_choices['interface:mode']['Access']
|
||||
interface.untagged_vlan = nb_vlan.id
|
||||
interface.save()
|
||||
|
||||
|
|
@ -366,7 +320,7 @@ class Network():
|
|||
address=ip,
|
||||
interface=interface.id,
|
||||
status=1,
|
||||
role=IPADDRESS_ROLE_ANYCAST,
|
||||
role=self.ipam_choices['ip-address:role']['Anycast'],
|
||||
)
|
||||
return netbox_ip
|
||||
else:
|
||||
|
|
@ -388,6 +342,112 @@ class Network():
|
|||
netbox_ip.save()
|
||||
return netbox_ip
|
||||
|
||||
def create_or_update_netbox_network_cards(self):
|
||||
if config.update_all is None or config.update_network is None:
|
||||
return None
|
||||
logging.debug('Creating/Updating NIC...')
|
||||
|
||||
# delete unknown interface
|
||||
nb_nics = self.get_netbox_network_cards()
|
||||
local_nics = [x['name'] for x in self.nics]
|
||||
for nic in nb_nics[:]:
|
||||
if nic.name not in local_nics:
|
||||
logging.info('Deleting netbox interface {name} because not present locally'.format(
|
||||
name=nic.name
|
||||
))
|
||||
nb_nics.remove(nic)
|
||||
nic.delete()
|
||||
|
||||
# delete IP on netbox that are not known on this server
|
||||
if len(nb_nics):
|
||||
netbox_ips = nb.ipam.ip_addresses.filter(
|
||||
interface_id=[x.id for x in nb_nics],
|
||||
)
|
||||
all_local_ips = list(chain.from_iterable([
|
||||
x['ip'] for x in self.nics if x['ip'] is not None
|
||||
]))
|
||||
for netbox_ip in netbox_ips:
|
||||
if netbox_ip.address not in all_local_ips:
|
||||
logging.info('Unassigning IP {ip} from {interface}'.format(
|
||||
ip=netbox_ip.address, interface=netbox_ip.interface))
|
||||
netbox_ip.interface = None
|
||||
netbox_ip.save()
|
||||
|
||||
# update each nic
|
||||
for nic in self.nics:
|
||||
interface = self.get_netbox_network_card(nic)
|
||||
if not interface:
|
||||
logging.info('Interface {mac_address} not found, creating..'.format(
|
||||
mac_address=nic['mac'])
|
||||
)
|
||||
interface = self.create_netbox_nic(nic)
|
||||
|
||||
nic_update = 0
|
||||
if nic['name'] != interface.name:
|
||||
logging.info('Updating interface {interface} name to: {name}'.format(
|
||||
interface=interface, name=nic['name']))
|
||||
interface.name = nic['name']
|
||||
nic_update += 1
|
||||
|
||||
ret, interface = self.reset_vlan_on_interface(nic, interface)
|
||||
nic_update += ret
|
||||
|
||||
_type = self.get_netbox_type_for_nic(nic)
|
||||
if not interface.type or \
|
||||
_type != interface.type.value:
|
||||
logging.info('Interface type is wrong, resetting')
|
||||
interface.type = _type
|
||||
nic_update += 1
|
||||
|
||||
if hasattr(interface, 'lag') and interface.lag is not None:
|
||||
local_lag_int = next(
|
||||
item for item in self.nics if item['name'] == interface.lag.name
|
||||
)
|
||||
if nic['name'] not in local_lag_int['bonding_slaves']:
|
||||
logging.info('Interface has no LAG, resetting')
|
||||
nic_update += 1
|
||||
interface.lag = None
|
||||
|
||||
# cable the interface
|
||||
if config.network.lldp:
|
||||
switch_ip = self.lldp.get_switch_ip(interface.name)
|
||||
switch_interface = self.lldp.get_switch_port(interface.name)
|
||||
if switch_ip and switch_interface:
|
||||
ret, interface = self.create_or_update_cable(
|
||||
switch_ip, switch_interface, interface
|
||||
)
|
||||
nic_update += ret
|
||||
|
||||
if nic['ip']:
|
||||
# sync local IPs
|
||||
for ip in nic['ip']:
|
||||
self.create_or_update_netbox_ip_on_interface(ip, interface)
|
||||
if nic_update > 0:
|
||||
interface.save()
|
||||
|
||||
self._set_bonding_interfaces()
|
||||
logging.debug('Finished updating NIC!')
|
||||
|
||||
|
||||
class ServerNetwork(Network):
|
||||
def __init__(self, server, *args, **kwargs):
|
||||
super(ServerNetwork, self).__init__(server, args, kwargs)
|
||||
self.ipmi = self.get_ipmi()
|
||||
if self.ipmi:
|
||||
self.nics.append(self.ipmi)
|
||||
self.server = server
|
||||
self.device = self.server.get_netbox_server()
|
||||
self.nb_net = nb.dcim
|
||||
self.custom_arg = {'device': self.device.id}
|
||||
self.custom_arg_id = {'device_id': self.device.id}
|
||||
|
||||
def get_network_type(self):
|
||||
return 'server'
|
||||
|
||||
def get_ipmi(self):
|
||||
ipmi = IPMI().parse()
|
||||
return ipmi
|
||||
|
||||
def connect_interface_to_switch(self, switch_ip, switch_interface, nb_server_interface):
|
||||
logging.info('Interface {} is not connected to switch, trying to connect..'.format(
|
||||
nb_server_interface.name
|
||||
|
|
@ -491,105 +551,22 @@ class Network():
|
|||
)
|
||||
return update, nb_server_interface
|
||||
|
||||
def create_netbox_network_cards(self):
|
||||
logging.debug('Creating NIC...')
|
||||
for nic in self.nics:
|
||||
interface = self.get_netbox_network_card(nic)
|
||||
# if network doesn't exist we create it
|
||||
if not interface:
|
||||
new_interface = self.create_netbox_nic(nic)
|
||||
if nic['ip']:
|
||||
# for each ip, we try to find it
|
||||
# assign the device's interface to it
|
||||
# or simply create it
|
||||
for ip in nic['ip']:
|
||||
self.create_or_update_netbox_ip_on_interface(ip, new_interface)
|
||||
self._set_bonding_interfaces()
|
||||
self.create_or_update_ipmi()
|
||||
logging.debug('Finished creating NIC!')
|
||||
|
||||
def update_netbox_network_cards(self):
|
||||
if config.update_all is None or config.update_network is None:
|
||||
return None
|
||||
logging.debug('Updating NIC...')
|
||||
class VirtualNetwork(Network):
|
||||
def __init__(self, server, *args, **kwargs):
|
||||
super(VirtualNetwork, self).__init__(server, args, kwargs)
|
||||
self.server = server
|
||||
self.device = self.server.get_netbox_vm()
|
||||
self.nb_net = nb.virtualization
|
||||
self.custom_arg = {'virtual_machine': self.device.id}
|
||||
self.custom_arg_id = {'virtual_machine_id': self.device.id}
|
||||
|
||||
# delete unknown interface
|
||||
nb_nics = self.get_netbox_network_cards()
|
||||
local_nics = [x['name'] for x in self.nics]
|
||||
for nic in nb_nics:
|
||||
if nic.name not in local_nics:
|
||||
logging.info('Deleting netbox interface {name} because not present locally'.format(
|
||||
name=nic.name
|
||||
))
|
||||
nic.delete()
|
||||
dcim_c = nb.virtualization.choices()
|
||||
|
||||
# delete IP on netbox that are not known on this server
|
||||
netbox_ips = nb.ipam.ip_addresses.filter(
|
||||
device_id=self.device.id,
|
||||
interface_id=[x.id for x in nb_nics],
|
||||
)
|
||||
all_local_ips = list(chain.from_iterable([
|
||||
x['ip'] for x in self.nics if x['ip'] is not None
|
||||
]))
|
||||
for netbox_ip in netbox_ips:
|
||||
if netbox_ip.address not in all_local_ips:
|
||||
logging.info('Unassigning IP {ip} from {interface}'.format(
|
||||
ip=netbox_ip.address, interface=netbox_ip.interface))
|
||||
netbox_ip.interface = None
|
||||
netbox_ip.save()
|
||||
for choice in dcim_c:
|
||||
self.dcim_choices[choice] = {}
|
||||
for c in dcim_c[choice]:
|
||||
self.dcim_choices[choice][c['label']] = c['value']
|
||||
|
||||
# update each nic
|
||||
for nic in self.nics:
|
||||
interface = self.get_netbox_network_card(nic)
|
||||
if not interface:
|
||||
logging.info('Interface {mac_address} not found, creating..'.format(
|
||||
mac_address=nic['mac'])
|
||||
)
|
||||
interface = self.create_netbox_nic(nic)
|
||||
|
||||
nic_update = 0
|
||||
if nic['name'] != interface.name:
|
||||
logging.info('Updating interface {interface} name to: {name}'.format(
|
||||
interface=interface, name=nic['name']))
|
||||
interface.name = nic['name']
|
||||
nic_update += 1
|
||||
|
||||
ret, interface = self.reset_vlan_on_interface(nic, interface)
|
||||
nic_update += ret
|
||||
|
||||
type = self.get_netbox_type_for_nic(nic)
|
||||
if not interface.type or \
|
||||
type != interface.type.value:
|
||||
logging.info('Interface type is wrong, resetting')
|
||||
interface.type = type
|
||||
nic_update += 1
|
||||
|
||||
if interface.lag is not None:
|
||||
local_lag_int = next(
|
||||
item for item in self.nics if item['name'] == interface.lag.name
|
||||
)
|
||||
if nic['name'] not in local_lag_int['bonding_slaves']:
|
||||
logging.info('Interface has no LAG, resetting')
|
||||
nic_update += 1
|
||||
interface.lag = None
|
||||
|
||||
# cable the interface
|
||||
if config.network.lldp:
|
||||
switch_ip = self.lldp.get_switch_ip(interface.name)
|
||||
switch_interface = self.lldp.get_switch_port(interface.name)
|
||||
if switch_ip and switch_interface:
|
||||
ret, interface = self.create_or_update_cable(
|
||||
switch_ip, switch_interface, interface
|
||||
)
|
||||
nic_update += ret
|
||||
|
||||
if nic['ip']:
|
||||
# sync local IPs
|
||||
for ip in nic['ip']:
|
||||
self.create_or_update_netbox_ip_on_interface(ip, interface)
|
||||
if nic_update > 0:
|
||||
interface.save()
|
||||
|
||||
self._set_bonding_interfaces()
|
||||
self.create_or_update_ipmi()
|
||||
logging.debug('Finished updating NIC!')
|
||||
def get_network_type(self):
|
||||
return 'virtual'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
|
||||
import netbox_agent.dmidecode as dmidecode
|
||||
from netbox_agent.config import netbox_instance as nb
|
||||
|
||||
PSU_DMI_TYPE = 39
|
||||
|
|
@ -16,7 +17,7 @@ class PowerSupply():
|
|||
|
||||
def get_power_supply(self):
|
||||
power_supply = []
|
||||
for psu in self.server.dmi.get_by_type(PSU_DMI_TYPE):
|
||||
for psu in dmidecode.get_by_type(self.server.dmi, PSU_DMI_TYPE):
|
||||
if 'Present' not in psu['Status'] or psu['Status'] == 'Not Present':
|
||||
continue
|
||||
|
||||
|
|
@ -34,13 +35,13 @@ class PowerSupply():
|
|||
'allocated_draw': None,
|
||||
'maximum_draw': max_power,
|
||||
'device': self.device_id,
|
||||
})
|
||||
})
|
||||
return power_supply
|
||||
|
||||
def get_netbox_power_supply(self):
|
||||
return nb.dcim.power_ports.filter(
|
||||
device_id=self.device_id
|
||||
)
|
||||
)
|
||||
|
||||
def create_or_update_power_supply(self):
|
||||
nb_psus = self.get_netbox_power_supply()
|
||||
|
|
@ -78,10 +79,10 @@ class PowerSupply():
|
|||
if psu['name'] not in [x.name for x in nb_psus]:
|
||||
logging.info('Creating PSU {name} ({description}), {maximum_draw}W'.format(
|
||||
**psu
|
||||
))
|
||||
))
|
||||
nb_psu = nb.dcim.power_ports.create(
|
||||
**psu
|
||||
)
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import re
|
||||
import subprocess
|
||||
|
||||
from netbox_agent.raid.base import Raid, RaidController
|
||||
from netbox_agent.misc import get_vendor
|
||||
from netbox_agent.raid.base import Raid, RaidController
|
||||
|
||||
REGEXP_CONTROLLER_HP = re.compile(r'Smart Array ([a-zA-Z0-9- ]+) in Slot ([0-9]+)')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import re
|
||||
import subprocess
|
||||
import xml.etree.ElementTree as ET # NOQA
|
||||
import xml.etree.ElementTree as ET # NOQA
|
||||
|
||||
from netbox_agent.misc import get_vendor
|
||||
from netbox_agent.raid.base import Raid, RaidController
|
||||
|
|
@ -43,7 +43,7 @@ class OmreportController(RaidController):
|
|||
ret = []
|
||||
output = subprocess.getoutput(
|
||||
'omreport storage controller controller={} -fmt xml'.format(self.controller_index)
|
||||
)
|
||||
)
|
||||
root = ET.fromstring(output)
|
||||
et_array_disks = root.find('ArrayDisks')
|
||||
if et_array_disks is not None:
|
||||
|
|
@ -54,7 +54,7 @@ class OmreportController(RaidController):
|
|||
'SN': get_field(obj, 'DeviceSerialNumber'),
|
||||
'Size': '{:.0f}GB'.format(
|
||||
int(get_field(obj, 'Length')) / 1024 / 1024 / 1024
|
||||
),
|
||||
),
|
||||
'Type': 'HDD' if int(get_field(obj, 'MediaType')) == 1 else 'SSD',
|
||||
'_src': self.__class__.__name__,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import subprocess
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
from netbox_agent.misc import get_vendor
|
||||
from netbox_agent.raid.base import Raid, RaidController
|
||||
|
|
@ -47,7 +47,7 @@ class StorcliController(RaidController):
|
|||
'Size': size,
|
||||
'Type': media_type,
|
||||
'_src': self.__class__.__name__,
|
||||
})
|
||||
})
|
||||
return ret
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
import logging
|
||||
from pprint import pprint
|
||||
import socket
|
||||
import subprocess
|
||||
from pprint import pprint
|
||||
|
||||
from netbox_agent.config import netbox_instance as nb, config
|
||||
import netbox_agent.dmidecode as dmidecode
|
||||
from netbox_agent.location import Datacenter, Rack
|
||||
from netbox_agent.config import config
|
||||
from netbox_agent.config import netbox_instance as nb
|
||||
from netbox_agent.inventory import Inventory
|
||||
from netbox_agent.network import Network
|
||||
from netbox_agent.location import Datacenter, Rack
|
||||
from netbox_agent.network import ServerNetwork
|
||||
from netbox_agent.power import PowerSupply
|
||||
|
||||
|
||||
|
|
@ -36,10 +37,10 @@ class ServerBase():
|
|||
else:
|
||||
self.dmi = dmidecode.parse()
|
||||
|
||||
self.baseboard = self.dmi.get_by_type('Baseboard')
|
||||
self.bios = self.dmi.get_by_type('BIOS')
|
||||
self.chassis = self.dmi.get_by_type('Chassis')
|
||||
self.system = self.dmi.get_by_type('System')
|
||||
self.baseboard = dmidecode.get_by_type(self.dmi, 'Baseboard')
|
||||
self.bios = dmidecode.get_by_type(self.dmi, 'BIOS')
|
||||
self.chassis = dmidecode.get_by_type(self.dmi, 'Chassis')
|
||||
self.system = dmidecode.get_by_type(self.dmi, 'System')
|
||||
|
||||
self.network = None
|
||||
|
||||
|
|
@ -135,7 +136,7 @@ class ServerBase():
|
|||
def get_power_consumption(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def _netbox_create_blade_chassis(self, datacenter, rack):
|
||||
def _netbox_create_chassis(self, datacenter, rack):
|
||||
device_type = get_device_type(self.get_chassis())
|
||||
device_role = get_device_role('Server Chassis')
|
||||
serial = self.get_chassis_service_tag()
|
||||
|
|
@ -171,27 +172,6 @@ class ServerBase():
|
|||
)
|
||||
return new_blade
|
||||
|
||||
def _netbox_set_blade_slot(self, chassis, server):
|
||||
slot = self.get_blade_slot()
|
||||
# Find the slot and update it with our blade
|
||||
device_bays = nb.dcim.device_bays.filter(
|
||||
device_id=chassis.id,
|
||||
name=slot,
|
||||
)
|
||||
if len(device_bays) > 0:
|
||||
logging.info(
|
||||
'Setting device ({serial}) new slot on {slot} '
|
||||
'(Chassis {chassis_serial})..'.format(
|
||||
serial=server.serial, slot=slot, chassis_serial=chassis.serial
|
||||
))
|
||||
device_bay = device_bays[0]
|
||||
device_bay.installed_device = server
|
||||
device_bay.save()
|
||||
else:
|
||||
logging.error('Could not find slot {slot} for chassis'.format(
|
||||
slot=slot
|
||||
))
|
||||
|
||||
def _netbox_create_server(self, datacenter, rack):
|
||||
device_role = get_device_role('Server')
|
||||
device_type = get_device_type(self.get_product_name())
|
||||
|
|
@ -214,103 +194,89 @@ class ServerBase():
|
|||
def get_netbox_server(self):
|
||||
return nb.dcim.devices.get(serial=self.get_service_tag())
|
||||
|
||||
def netbox_create(self, config):
|
||||
logging.debug('Creating Server..')
|
||||
def _netbox_set_or_update_blade_slot(self, server, chassis, datacenter):
|
||||
# before everything check if right chassis
|
||||
actual_device_bay = server.parent_device.device_bay if server.parent_device else None
|
||||
actual_chassis = actual_device_bay.device if actual_device_bay else None
|
||||
slot = self.get_blade_slot()
|
||||
if actual_chassis and \
|
||||
actual_chassis.serial == chassis.serial and \
|
||||
actual_device_bay.name == slot:
|
||||
return
|
||||
|
||||
real_device_bays = nb.dcim.device_bays.filter(
|
||||
device_id=chassis.id,
|
||||
name=slot,
|
||||
)
|
||||
if len(real_device_bays) > 0:
|
||||
logging.info(
|
||||
'Setting device ({serial}) new slot on {slot} '
|
||||
'(Chassis {chassis_serial})..'.format(
|
||||
serial=server.serial, slot=slot, chassis_serial=chassis.serial
|
||||
))
|
||||
# reset actual device bay if set
|
||||
if actual_device_bay:
|
||||
actual_device_bay.installed_device = None
|
||||
actual_device_bay.save()
|
||||
# setup new device bay
|
||||
real_device_bay = real_device_bays[0]
|
||||
real_device_bay.installed_device = server
|
||||
real_device_bay.save()
|
||||
else:
|
||||
logging.error('Could not find slot {slot} for chassis'.format(
|
||||
slot=slot
|
||||
))
|
||||
|
||||
def netbox_create_or_update(self, config):
|
||||
"""
|
||||
Netbox method to create or update info about our server/blade
|
||||
|
||||
Handle:
|
||||
* new chassis for a blade
|
||||
* new slot for a blade
|
||||
* hostname update
|
||||
* Network infos
|
||||
* Inventory management
|
||||
* PSU management
|
||||
"""
|
||||
datacenter = self.get_netbox_datacenter()
|
||||
rack = self.get_netbox_rack()
|
||||
if self.is_blade():
|
||||
# let's find the blade
|
||||
serial = self.get_service_tag()
|
||||
blade = nb.dcim.devices.get(serial=serial)
|
||||
chassis = nb.dcim.devices.get(serial=self.get_chassis_service_tag())
|
||||
# if it doesn't exist, create it
|
||||
if not blade:
|
||||
# check if the chassis exist before
|
||||
# if it doesn't exist, create it
|
||||
chassis = nb.dcim.devices.get(
|
||||
serial=self.get_chassis_service_tag()
|
||||
)
|
||||
if not chassis:
|
||||
chassis = self._netbox_create_blade_chassis(datacenter, rack)
|
||||
|
||||
blade = self._netbox_create_blade(chassis, datacenter, rack)
|
||||
if self.is_blade():
|
||||
chassis = nb.dcim.devices.get(
|
||||
serial=self.get_chassis_service_tag()
|
||||
)
|
||||
# Chassis does not exist
|
||||
if not chassis:
|
||||
chassis = self._netbox_create_chassis(datacenter, rack)
|
||||
|
||||
server = nb.dcim.devices.get(serial=self.get_service_tag())
|
||||
if not server:
|
||||
server = self._netbox_create_blade(chassis, datacenter, rack)
|
||||
|
||||
# Set slot for blade
|
||||
self._netbox_set_blade_slot(chassis, blade)
|
||||
self._netbox_set_or_update_blade_slot(server, chassis, datacenter)
|
||||
else:
|
||||
server = nb.dcim.devices.get(serial=self.get_service_tag())
|
||||
if not server:
|
||||
self._netbox_create_server(datacenter, rack)
|
||||
|
||||
self.network = Network(server=self)
|
||||
self.network.create_netbox_network_cards()
|
||||
|
||||
self.power = PowerSupply(server=self)
|
||||
self.power.create_or_update_power_supply()
|
||||
|
||||
if config.inventory:
|
||||
self.inventory = Inventory(server=self)
|
||||
self.inventory.create()
|
||||
logging.debug('Server created!')
|
||||
|
||||
def _netbox_update_chassis_for_blade(self, server, datacenter):
|
||||
chassis = server.parent_device.device_bay.device
|
||||
device_bay = nb.dcim.device_bays.get(
|
||||
server.parent_device.device_bay.id
|
||||
)
|
||||
netbox_chassis_serial = server.parent_device.device_bay.device.serial
|
||||
move_device_bay = False
|
||||
|
||||
# check chassis serial with dmidecode
|
||||
if netbox_chassis_serial != self.get_chassis_service_tag():
|
||||
move_device_bay = True
|
||||
# try to find the new netbox chassis
|
||||
chassis = nb.dcim.devices.get(
|
||||
serial=self.get_chassis_service_tag()
|
||||
)
|
||||
if not chassis:
|
||||
chassis = self._netbox_create_blade_chassis(datacenter)
|
||||
if move_device_bay or device_bay.name != self.get_blade_slot():
|
||||
logging.info('Device ({serial}) seems to have moved, reseting old slot..'.format(
|
||||
serial=server.serial))
|
||||
device_bay.installed_device = None
|
||||
device_bay.save()
|
||||
|
||||
# Set slot for blade
|
||||
self._netbox_set_blade_slot(chassis, server)
|
||||
|
||||
def netbox_update(self, config):
|
||||
"""
|
||||
Netbox method to update info about our server/blade
|
||||
|
||||
Handle:
|
||||
* new chasis for a blade
|
||||
* new slot for a bblade
|
||||
* hostname update
|
||||
* new network infos
|
||||
"""
|
||||
logging.debug('Updating Server...')
|
||||
# check network cards
|
||||
if config.register or config.update_all or config.update_network:
|
||||
self.network = ServerNetwork(server=self)
|
||||
self.network.create_or_update_netbox_network_cards()
|
||||
# update inventory if feature is enabled
|
||||
if config.inventory and (config.register or config.update_all or config.update_inventory):
|
||||
self.inventory = Inventory(server=self)
|
||||
self.inventory.create_or_update()
|
||||
# update psu
|
||||
if config.register or config.update_all or config.update_psu:
|
||||
self.power = PowerSupply(server=self)
|
||||
self.power.create_or_update_power_supply()
|
||||
self.power.report_power_consumption()
|
||||
|
||||
server = nb.dcim.devices.get(serial=self.get_service_tag())
|
||||
if not server:
|
||||
raise Exception("The server (Serial: {}) isn't yet registered in Netbox, register"
|
||||
'it before updating it'.format(self.get_service_tag()))
|
||||
update = 0
|
||||
if self.is_blade():
|
||||
datacenter = self.get_netbox_datacenter()
|
||||
# if it's already linked to a chassis
|
||||
if server.parent_device:
|
||||
self._netbox_update_chassis_for_blade(server, datacenter)
|
||||
else:
|
||||
logging.info('Blade is not in a chassis, fixing...')
|
||||
chassis = nb.dcim.devices.get(
|
||||
serial=self.get_chassis_service_tag()
|
||||
)
|
||||
if not chassis:
|
||||
chassis = self._netbox_create_blade_chassis(datacenter)
|
||||
# Set slot for blade
|
||||
self._netbox_set_blade_slot(chassis, server)
|
||||
|
||||
# for every other specs
|
||||
# check hostname
|
||||
if server.name != self.get_hostname():
|
||||
|
|
@ -321,25 +287,12 @@ class ServerBase():
|
|||
ret, server = self.update_netbox_location(server)
|
||||
update += ret
|
||||
|
||||
# check network cards
|
||||
if config.update_all or config.update_network:
|
||||
self.network = Network(server=self)
|
||||
self.network.update_netbox_network_cards()
|
||||
# update inventory
|
||||
if config.update_all or config.update_inventory:
|
||||
self.inventory = Inventory(server=self)
|
||||
self.inventory.update()
|
||||
# update psu
|
||||
if config.update_all or config.update_psu:
|
||||
self.power = PowerSupply(server=self)
|
||||
self.power.create_or_update_power_supply()
|
||||
self.power.report_power_consumption()
|
||||
if update:
|
||||
server.save()
|
||||
logging.debug('Finished updating Server!')
|
||||
|
||||
def print_debug(self):
|
||||
self.network = Network(server=self)
|
||||
self.network = ServerNetwork(server=self)
|
||||
print('Datacenter:', self.get_datacenter())
|
||||
print('Netbox Datacenter:', self.get_netbox_datacenter())
|
||||
print('Rack:', self.get_rack())
|
||||
|
|
|
|||
8
netbox_agent/vendors/dell.py
vendored
8
netbox_agent/vendors/dell.py
vendored
|
|
@ -1,8 +1,8 @@
|
|||
import logging
|
||||
import subprocess
|
||||
|
||||
from netbox_agent.server import ServerBase
|
||||
from netbox_agent.misc import is_tool
|
||||
from netbox_agent.server import ServerBase
|
||||
|
||||
|
||||
class DellHost(ServerBase):
|
||||
|
|
@ -20,7 +20,7 @@ class DellHost(ServerBase):
|
|||
` Location In Chassis: Slot 03`
|
||||
"""
|
||||
if self.is_blade():
|
||||
return self.dmi.get_by_type('Baseboard')[0].get('Location In Chassis').strip()
|
||||
return self.baseboard[0].get('Location In Chassis').strip()
|
||||
return None
|
||||
|
||||
def get_chassis_name(self):
|
||||
|
|
@ -30,12 +30,12 @@ class DellHost(ServerBase):
|
|||
|
||||
def get_chassis(self):
|
||||
if self.is_blade():
|
||||
return self.dmi.get_by_type('Chassis')[0]['Version'].strip()
|
||||
return self.chassis[0]['Version'].strip()
|
||||
return self.get_product_name()
|
||||
|
||||
def get_chassis_service_tag(self):
|
||||
if self.is_blade():
|
||||
return self.dmi.get_by_type('Chassis')[0]['Serial Number'].strip()
|
||||
return self.chassis[0]['Serial Number'].strip()
|
||||
return self.get_service_tag()
|
||||
|
||||
def get_power_consumption(self):
|
||||
|
|
|
|||
23
netbox_agent/vendors/generic.py
vendored
Normal file
23
netbox_agent/vendors/generic.py
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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)
|
||||
self.manufacturer = dmidecode.get_by_type(self.dmi, 'Baseboard')[0].get('Manufacturer')
|
||||
|
||||
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()
|
||||
7
netbox_agent/vendors/hp.py
vendored
7
netbox_agent/vendors/hp.py
vendored
|
|
@ -1,3 +1,4 @@
|
|||
import netbox_agent.dmidecode as dmidecode
|
||||
from netbox_agent.server import ServerBase
|
||||
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ class HPHost(ServerBase):
|
|||
"""
|
||||
# FIXME: make a dmidecode function get_by_dminame() ?
|
||||
if self.is_blade():
|
||||
locator = self.dmi.get_by_type(204)
|
||||
locator = dmidecode.get_by_type(self.dmi, 204)
|
||||
if self.get_product_name() == 'ProLiant BL460c Gen10':
|
||||
locator = locator[0]['Strings']
|
||||
return {
|
||||
|
|
@ -27,14 +28,14 @@ class HPHost(ServerBase):
|
|||
'Enclosure Name': locator[0].strip(),
|
||||
'Server Bay': locator[3].strip(),
|
||||
'Enclosure Serial': locator[4].strip(),
|
||||
}
|
||||
}
|
||||
return locator[0]
|
||||
|
||||
def get_blade_slot(self):
|
||||
if self.is_blade():
|
||||
return 'Bay {}'.format(
|
||||
int(self.hp_rack_locator['Server Bay'].strip())
|
||||
)
|
||||
)
|
||||
return None
|
||||
|
||||
def get_chassis(self):
|
||||
|
|
|
|||
8
netbox_agent/vendors/qct.py
vendored
8
netbox_agent/vendors/qct.py
vendored
|
|
@ -7,12 +7,12 @@ class QCTHost(ServerBase):
|
|||
self.manufacturer = 'QCT'
|
||||
|
||||
def is_blade(self):
|
||||
return 'Location In Chassis' in self.dmi.get_by_type('Baseboard')[0].keys()
|
||||
return 'Location In Chassis' in self.baseboard[0].keys()
|
||||
|
||||
def get_blade_slot(self):
|
||||
if self.is_blade():
|
||||
return 'Slot {}'.format(
|
||||
self.dmi.get_by_type('Baseboard')[0].get('Location In Chassis').strip()
|
||||
self.baseboard[0].get('Location In Chassis').strip()
|
||||
)
|
||||
return None
|
||||
|
||||
|
|
@ -23,10 +23,10 @@ class QCTHost(ServerBase):
|
|||
|
||||
def get_chassis(self):
|
||||
if self.is_blade():
|
||||
return self.dmi.get_by_type('Chassis')[0]['Version'].strip()
|
||||
return self.chassis[0]['Version'].strip()
|
||||
return self.get_product_name()
|
||||
|
||||
def get_chassis_service_tag(self):
|
||||
if self.is_blade():
|
||||
return self.dmi.get_by_type('Chassis')[0]['Serial Number'].strip()
|
||||
return self.chassis[0]['Serial Number'].strip()
|
||||
return self.get_service_tag()
|
||||
|
|
|
|||
1
netbox_agent/vendors/supermicro.py
vendored
1
netbox_agent/vendors/supermicro.py
vendored
|
|
@ -2,6 +2,7 @@
|
|||
from netbox_agent.location import Slot
|
||||
from netbox_agent.server import ServerBase
|
||||
|
||||
|
||||
"""
|
||||
Supermicro DMI can be messed up. They depend on the vendor
|
||||
to set the correct values. The endusers cannot
|
||||
|
|
|
|||
86
netbox_agent/virtualmachine.py
Normal file
86
netbox_agent/virtualmachine.py
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
import os
|
||||
|
||||
import netbox_agent.dmidecode as dmidecode
|
||||
from netbox_agent.config import config
|
||||
from netbox_agent.config import netbox_instance as nb
|
||||
from netbox_agent.logging import logging # NOQA
|
||||
from netbox_agent.misc import get_hostname
|
||||
from netbox_agent.network import VirtualNetwork
|
||||
|
||||
|
||||
def is_vm(dmi):
|
||||
bios = dmidecode.get_by_type(dmi, 'BIOS')
|
||||
system = dmidecode.get_by_type(dmi, 'System')
|
||||
|
||||
if 'Hyper-V' in bios[0]['Version'] or \
|
||||
'Xen' in bios[0]['Version'] or \
|
||||
'Google Compute Engine' in system[0]['Product Name'] or \
|
||||
'VirtualBox' in bios[0]['Version'] or \
|
||||
'VMware' in system[0]['Manufacturer']:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class VirtualMachine(object):
|
||||
def __init__(self, dmi=None):
|
||||
if dmi:
|
||||
self.dmi = dmi
|
||||
else:
|
||||
self.dmi = dmidecode.parse()
|
||||
self.network = None
|
||||
|
||||
def get_memory(self):
|
||||
mem_bytes = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES') # e.g. 4015976448
|
||||
mem_gib = mem_bytes / (1024.**2) # e.g. 3.74
|
||||
return int(mem_gib)
|
||||
|
||||
def get_vcpus(self):
|
||||
return os.cpu_count()
|
||||
|
||||
def get_netbox_vm(self):
|
||||
hostname = get_hostname(config)
|
||||
vm = nb.virtualization.virtual_machines.get(
|
||||
name=hostname
|
||||
)
|
||||
return vm
|
||||
|
||||
def get_netbox_cluster(self, name):
|
||||
cluster = nb.virtualization.clusters.get(
|
||||
name=name,
|
||||
)
|
||||
return cluster
|
||||
|
||||
def netbox_create_or_update(self, config):
|
||||
logging.debug('It\'s a virtual machine')
|
||||
created = False
|
||||
updated = 0
|
||||
|
||||
hostname = get_hostname(config)
|
||||
vm = self.get_netbox_vm()
|
||||
|
||||
vcpus = self.get_vcpus()
|
||||
memory = self.get_memory()
|
||||
if not vm:
|
||||
logging.debug('Creating Virtual machine..')
|
||||
cluster = self.get_netbox_cluster(config.virtual.cluster_name)
|
||||
|
||||
vm = nb.virtualization.virtual_machines.create(
|
||||
name=hostname,
|
||||
cluster=cluster.id,
|
||||
vcpus=vcpus,
|
||||
memory=memory,
|
||||
)
|
||||
created = True
|
||||
|
||||
self.network = VirtualNetwork(server=self)
|
||||
self.network.create_or_update_netbox_network_cards()
|
||||
|
||||
if not created and vm.vcpus != vcpus:
|
||||
vm.vcpus = vcpus
|
||||
updated += 1
|
||||
elif not created and vm.memory != memory:
|
||||
vm.memory = memory
|
||||
updated += 1
|
||||
|
||||
if updated:
|
||||
vm.save()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
pynetbox==4.0.8
|
||||
pynetbox==4.3.1
|
||||
netaddr==0.7.19
|
||||
netifaces==0.10.9
|
||||
pyyaml==5.2
|
||||
jsonargparse==2.9.0
|
||||
pyyaml==5.3.1
|
||||
jsonargparse==2.27.0
|
||||
|
|
|
|||
16
setup.cfg
Normal file
16
setup.cfg
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[tool:pytest]
|
||||
testpaths = tests
|
||||
python_files = *.py
|
||||
addopts = -vv --showlocals --cov-report term-missing --cov netbox_agent --no-cov-on-fail
|
||||
|
||||
[flake8]
|
||||
ignore = E125,E129,W503,W504
|
||||
exclude = .venv/,.git/,.tox/,netbox-docker/
|
||||
max-line-length = 99
|
||||
|
||||
[isort]
|
||||
line_length = 99
|
||||
indent=' '
|
||||
multi_line_output = 0
|
||||
skip = .venv/,.git/,tests/conftest.py,ipython_config.py
|
||||
known_first_party = netbox_agent,tests
|
||||
12
setup.py
12
setup.py
|
|
@ -1,8 +1,8 @@
|
|||
from setuptools import setup, find_packages
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
setup(
|
||||
name='netbox_agent',
|
||||
version='0.3.1',
|
||||
version='0.5.0',
|
||||
description='NetBox agent for server',
|
||||
long_description=open('README.md', encoding="utf-8").read(),
|
||||
url='https://github.com/solvik/netbox_agent',
|
||||
|
|
@ -13,12 +13,12 @@ setup(
|
|||
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
|
||||
use_scm_version=True,
|
||||
install_requires=[
|
||||
'pynetbox==4.0.8',
|
||||
'pynetbox==4.3.1',
|
||||
'netaddr==0.7.19',
|
||||
'netifaces==0.10.9',
|
||||
'pyyaml==5.2',
|
||||
'jsonargparse==2.9.0',
|
||||
],
|
||||
'pyyaml==5.3.1',
|
||||
'jsonargparse==2.27.0',
|
||||
],
|
||||
zip_safe=False,
|
||||
keywords=['netbox'],
|
||||
classifiers=[
|
||||
|
|
|
|||
22
tests.sh
Executable file
22
tests.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
set -x
|
||||
|
||||
git clone https://github.com/netbox-community/netbox-docker.git
|
||||
cd netbox-docker
|
||||
docker-compose pull
|
||||
docker-compose up -d
|
||||
|
||||
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://$(docker-compose port nginx 8080))" != "200" ]]
|
||||
do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
export NETBOX_AGENT__NETBOX__URL="http://$(docker-compose port nginx 8080)"
|
||||
export NETBOX_AGENT__NETBOX__TOKEN=0123456789abcdef0123456789abcdef01234567
|
||||
|
||||
cd -
|
||||
pytest
|
||||
|
||||
cd netbox-docker
|
||||
docker-compose down
|
||||
cd -
|
||||
set +x
|
||||
33
tests/conftest.py
Normal file
33
tests/conftest.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def get_fixture_paths(path):
|
||||
if not os.path.isdir(path):
|
||||
return [path]
|
||||
fixture_paths = []
|
||||
for p in os.listdir(path):
|
||||
p = os.path.join(path, p)
|
||||
if os.path.isfile(p):
|
||||
fixture_paths.append(p)
|
||||
return fixture_paths
|
||||
|
||||
|
||||
def parametrize_with_fixtures(path, base_path='tests/fixtures',
|
||||
argname='fixture', only_filenames=None):
|
||||
path = os.path.join(base_path, path)
|
||||
fixture_paths = get_fixture_paths(path)
|
||||
argvalues = []
|
||||
for path in fixture_paths:
|
||||
with open(path, 'r') as f:
|
||||
content = ''.join(f.readlines())
|
||||
filename = os.path.basename(path)
|
||||
if only_filenames and filename not in only_filenames:
|
||||
continue
|
||||
param = pytest.param(content, id=filename)
|
||||
argvalues.append(param)
|
||||
|
||||
def _decorator(test_function):
|
||||
return pytest.mark.parametrize(argname, argvalues)(test_function)
|
||||
return _decorator
|
||||
868
tests/fixtures/dmidecode/Dell_DSS7500
vendored
Normal file
868
tests/fixtures/dmidecode/Dell_DSS7500
vendored
Normal file
|
|
@ -0,0 +1,868 @@
|
|||
# dmidecode 2.12
|
||||
SMBIOS 2.8 present.
|
||||
57 structures occupying 3093 bytes.
|
||||
Table at 0x7AF09000.
|
||||
|
||||
Handle 0xDA00, DMI type 218, 11 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
DA 0B 00 DA B2 00 17 20 0E 10 03
|
||||
|
||||
Handle 0x0000, DMI type 0, 24 bytes
|
||||
BIOS Information
|
||||
Vendor: Dell Inc.
|
||||
Version: 2.3.4
|
||||
Release Date: 11/10/2016
|
||||
Address: 0xF0000
|
||||
Runtime Size: 64 kB
|
||||
ROM Size: 16384 kB
|
||||
Characteristics:
|
||||
ISA is supported
|
||||
PCI is supported
|
||||
PNP is supported
|
||||
BIOS is upgradeable
|
||||
BIOS shadowing is allowed
|
||||
Boot from CD is supported
|
||||
Selectable boot is supported
|
||||
EDD is supported
|
||||
Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
|
||||
5.25"/360 kB floppy services are supported (int 13h)
|
||||
5.25"/1.2 MB floppy services are supported (int 13h)
|
||||
3.5"/720 kB floppy services are supported (int 13h)
|
||||
8042 keyboard services are supported (int 9h)
|
||||
Serial services are supported (int 14h)
|
||||
CGA/mono video services are supported (int 10h)
|
||||
ACPI is supported
|
||||
USB legacy is supported
|
||||
BIOS boot specification is supported
|
||||
Function key-initiated network boot is supported
|
||||
Targeted content distribution is supported
|
||||
UEFI is supported
|
||||
BIOS Revision: 2.3
|
||||
|
||||
Handle 0x0100, DMI type 1, 27 bytes
|
||||
System Information
|
||||
Manufacturer: Dell Inc.
|
||||
Product Name: DSS7500
|
||||
Version: Not Specified
|
||||
Serial Number: 4242-SERVICE_TAG
|
||||
UUID: 4C4C4544-0048-5110-804A-C6C04F594A32
|
||||
Wake-up Type: Power Switch
|
||||
SKU Number: SKU=NotProvided;ModelName=DSS7500
|
||||
Family: Not Specified
|
||||
|
||||
Handle 0x0200, DMI type 2, 8 bytes
|
||||
Base Board Information
|
||||
Manufacturer: Dell Inc.
|
||||
Product Name: 0X89R8
|
||||
Version: A04
|
||||
Serial Number: 4242
|
||||
|
||||
Handle 0x0300, DMI type 3, 22 bytes
|
||||
Chassis Information
|
||||
Manufacturer: Dell Inc.
|
||||
Type: Rack Mount Chassis
|
||||
Lock: Present
|
||||
Version: Not Specified
|
||||
Serial Number: 4242
|
||||
Asset Tag: Not Specified
|
||||
Boot-up State: Safe
|
||||
Power Supply State: Safe
|
||||
Thermal State: Safe
|
||||
Security Status: Unknown
|
||||
OEM Information: 0x00000000
|
||||
Height: 4 U
|
||||
Number Of Power Cords: Unspecified
|
||||
Contained Elements: 0
|
||||
SKU Number: Not Specified
|
||||
|
||||
Handle 0x0400, DMI type 4, 42 bytes
|
||||
Processor Information
|
||||
Socket Designation: CPU1
|
||||
Type: Central Processor
|
||||
Family: Xeon
|
||||
Manufacturer: Intel
|
||||
ID: F1 06 04 00 FF FB EB BF
|
||||
Signature: Type 0, Family 6, Model 79, Stepping 1
|
||||
Flags:
|
||||
FPU (Floating-point unit on-chip)
|
||||
VME (Virtual mode extension)
|
||||
DE (Debugging extension)
|
||||
PSE (Page size extension)
|
||||
TSC (Time stamp counter)
|
||||
MSR (Model specific registers)
|
||||
PAE (Physical address extension)
|
||||
MCE (Machine check exception)
|
||||
CX8 (CMPXCHG8 instruction supported)
|
||||
APIC (On-chip APIC hardware supported)
|
||||
SEP (Fast system call)
|
||||
MTRR (Memory type range registers)
|
||||
PGE (Page global enable)
|
||||
MCA (Machine check architecture)
|
||||
CMOV (Conditional move instruction supported)
|
||||
PAT (Page attribute table)
|
||||
PSE-36 (36-bit page size extension)
|
||||
CLFSH (CLFLUSH instruction supported)
|
||||
DS (Debug store)
|
||||
ACPI (ACPI supported)
|
||||
MMX (MMX technology supported)
|
||||
FXSR (FXSAVE and FXSTOR instructions supported)
|
||||
SSE (Streaming SIMD extensions)
|
||||
SSE2 (Streaming SIMD extensions 2)
|
||||
SS (Self-snoop)
|
||||
HTT (Multi-threading)
|
||||
TM (Thermal monitor supported)
|
||||
PBE (Pending break enabled)
|
||||
Version: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
|
||||
Voltage: 1.3 V
|
||||
External Clock: 8000 MHz
|
||||
Max Speed: 4000 MHz
|
||||
Current Speed: 2200 MHz
|
||||
Status: Populated, Enabled
|
||||
Upgrade: <OUT OF SPEC>
|
||||
L1 Cache Handle: 0x0700
|
||||
L2 Cache Handle: 0x0701
|
||||
L3 Cache Handle: 0x0702
|
||||
Serial Number: 4242
|
||||
Asset Tag: Not Specified
|
||||
Part Number: Not Specified
|
||||
Core Count: 10
|
||||
Core Enabled: 10
|
||||
Thread Count: 10
|
||||
Characteristics:
|
||||
64-bit capable
|
||||
Multi-Core
|
||||
Hardware Thread
|
||||
Execute Protection
|
||||
Enhanced Virtualization
|
||||
Power/Performance Control
|
||||
|
||||
Handle 0x0401, DMI type 4, 42 bytes
|
||||
Processor Information
|
||||
Socket Designation: CPU2
|
||||
Type: Central Processor
|
||||
Family: Xeon
|
||||
Manufacturer: Intel
|
||||
ID: F1 06 04 00 FF FB EB BF
|
||||
Signature: Type 0, Family 6, Model 79, Stepping 1
|
||||
Flags:
|
||||
FPU (Floating-point unit on-chip)
|
||||
VME (Virtual mode extension)
|
||||
DE (Debugging extension)
|
||||
PSE (Page size extension)
|
||||
TSC (Time stamp counter)
|
||||
MSR (Model specific registers)
|
||||
PAE (Physical address extension)
|
||||
MCE (Machine check exception)
|
||||
CX8 (CMPXCHG8 instruction supported)
|
||||
APIC (On-chip APIC hardware supported)
|
||||
SEP (Fast system call)
|
||||
MTRR (Memory type range registers)
|
||||
PGE (Page global enable)
|
||||
MCA (Machine check architecture)
|
||||
CMOV (Conditional move instruction supported)
|
||||
PAT (Page attribute table)
|
||||
PSE-36 (36-bit page size extension)
|
||||
CLFSH (CLFLUSH instruction supported)
|
||||
DS (Debug store)
|
||||
ACPI (ACPI supported)
|
||||
MMX (MMX technology supported)
|
||||
FXSR (FXSAVE and FXSTOR instructions supported)
|
||||
SSE (Streaming SIMD extensions)
|
||||
SSE2 (Streaming SIMD extensions 2)
|
||||
SS (Self-snoop)
|
||||
HTT (Multi-threading)
|
||||
TM (Thermal monitor supported)
|
||||
PBE (Pending break enabled)
|
||||
Version: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
|
||||
Voltage: 1.3 V
|
||||
External Clock: 8000 MHz
|
||||
Max Speed: 4000 MHz
|
||||
Current Speed: 2200 MHz
|
||||
Status: Populated, Enabled
|
||||
Upgrade: <OUT OF SPEC>
|
||||
L1 Cache Handle: 0x0703
|
||||
L2 Cache Handle: 0x0704
|
||||
L3 Cache Handle: 0x0705
|
||||
Serial Number: 4242
|
||||
Asset Tag: Not Specified
|
||||
Part Number: Not Specified
|
||||
Core Count: 10
|
||||
Core Enabled: 10
|
||||
Thread Count: 10
|
||||
Characteristics:
|
||||
64-bit capable
|
||||
Multi-Core
|
||||
Hardware Thread
|
||||
Execute Protection
|
||||
Enhanced Virtualization
|
||||
Power/Performance Control
|
||||
|
||||
Handle 0x0700, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: Not Specified
|
||||
Configuration: Enabled, Not Socketed, Level 1
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 640 kB
|
||||
Maximum Size: 640 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Parity
|
||||
System Type: Unified
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0701, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: Not Specified
|
||||
Configuration: Enabled, Not Socketed, Level 2
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 2560 kB
|
||||
Maximum Size: 2560 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0702, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: Not Specified
|
||||
Configuration: Enabled, Not Socketed, Level 3
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 25600 kB
|
||||
Maximum Size: 25600 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 20-way Set-associative
|
||||
|
||||
Handle 0x0703, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: Not Specified
|
||||
Configuration: Enabled, Not Socketed, Level 1
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 640 kB
|
||||
Maximum Size: 640 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Parity
|
||||
System Type: Unified
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0704, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: Not Specified
|
||||
Configuration: Enabled, Not Socketed, Level 2
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 2560 kB
|
||||
Maximum Size: 2560 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0705, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: Not Specified
|
||||
Configuration: Enabled, Not Socketed, Level 3
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 25600 kB
|
||||
Maximum Size: 25600 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 20-way Set-associative
|
||||
|
||||
Handle 0x0800, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Back USB port 2
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0801, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Internal USB port 1
|
||||
Internal Connector Type: Access Bus (USB)
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0802, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Front USB port 2
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0803, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Back USB port 1
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0804, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Front USB port 1
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0805, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Video port 1
|
||||
External Connector Type: DB-15 female
|
||||
Port Type: Video Port
|
||||
|
||||
Handle 0x0806, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Serial port 1
|
||||
External Connector Type: DB-9 male
|
||||
Port Type: Serial Port 16550A Compatible
|
||||
|
||||
Handle 0x0900, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCIe Slot 1
|
||||
Type: x8 PCI Express 3
|
||||
Current Usage: Available
|
||||
Length: Long
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
PME signal is supported
|
||||
|
||||
Handle 0x0901, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCIe Slot 2
|
||||
Type: x8 PCI Express 3 x16
|
||||
Current Usage: In Use
|
||||
Length: Long
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
PME signal is supported
|
||||
Bus Address: 0000:04:00.0
|
||||
|
||||
Handle 0x0902, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCIe Slot 3
|
||||
Type: x8 PCI Express 3
|
||||
Current Usage: Available
|
||||
Length: Long
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
PME signal is supported
|
||||
|
||||
Handle 0x0903, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCIe Slot 4
|
||||
Type: x8 PCI Express 3
|
||||
Current Usage: In Use
|
||||
Length: Long
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
PME signal is supported
|
||||
Bus Address: 0000:06:00.0
|
||||
|
||||
Handle 0x0B00, DMI type 11, 5 bytes
|
||||
OEM Strings
|
||||
String 1: Dell System
|
||||
String 2: 5[0000]
|
||||
String 3: 1[06B6]
|
||||
String 4: 7[0721]
|
||||
String 5: 8[Dell Inc.]
|
||||
String 6: 9[DSS7500]
|
||||
String 7: 10[2.3.4]
|
||||
String 8: 11[01.00.00]
|
||||
String 9: 12[www.dell.com]
|
||||
String 10: 14[1]
|
||||
String 11: 17[8F27911A0C407F63]
|
||||
String 12: 17[8F28041BFDD8E7E6]
|
||||
String 13: 18[0]
|
||||
String 14: 19[1]
|
||||
String 15: 19[1]
|
||||
|
||||
Handle 0x0C00, DMI type 12, 5 bytes
|
||||
System Configuration Options
|
||||
Option 1: NVRAM_CLR: Clear user settable NVRAM areas and set defaults
|
||||
Option 2: PWRD_EN: Close to enable password
|
||||
|
||||
Handle 0x0D00, DMI type 13, 22 bytes
|
||||
BIOS Language Information
|
||||
Language Description Format: Long
|
||||
Installable Languages: 1
|
||||
en|US|iso8859-1
|
||||
Currently Installed Language: en|US|iso8859-1
|
||||
|
||||
Handle 0x1000, DMI type 16, 23 bytes
|
||||
Physical Memory Array
|
||||
Location: System Board Or Motherboard
|
||||
Use: System Memory
|
||||
Error Correction Type: Multi-bit ECC
|
||||
Maximum Capacity: 1536 GB
|
||||
Error Information Handle: Not Provided
|
||||
Number Of Devices: 12
|
||||
|
||||
Handle 0x1100, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 1
|
||||
Locator: A1
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1101, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 1
|
||||
Locator: A2
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1102, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 1
|
||||
Locator: A3
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1103, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 1
|
||||
Locator: A4
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1104, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 2
|
||||
Locator: A5
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1105, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 2
|
||||
Locator: A6
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1106, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 2
|
||||
Locator: A7
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1107, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 2
|
||||
Locator: A8
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1108, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 3
|
||||
Locator: B1
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1109, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 3
|
||||
Locator: B2
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x110A, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 3
|
||||
Locator: B3
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x110B, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x1000
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: 3
|
||||
Locator: B4
|
||||
Bank Locator: Not Specified
|
||||
Type: <OUT OF SPEC>
|
||||
Type Detail: Synchronous Registered (Buffered)
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: 002C00B3002C
|
||||
Serial Number: 4242
|
||||
Asset Tag: 00171230
|
||||
Part Number: 18ASF2G72PDZ-2G3B1
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum voltage: 1.200 V
|
||||
Maximum voltage: 1.200 V
|
||||
Configured voltage: 1.200 V
|
||||
|
||||
Handle 0x1300, DMI type 19, 31 bytes
|
||||
Memory Array Mapped Address
|
||||
Starting Address: 0x00000000000
|
||||
Ending Address: 0x0007FFFFFFF
|
||||
Range Size: 2 GB
|
||||
Physical Array Handle: 0x1000
|
||||
Partition Width: 2
|
||||
|
||||
Handle 0x1301, DMI type 19, 31 bytes
|
||||
Memory Array Mapped Address
|
||||
Starting Address: 0x00100000000
|
||||
Ending Address: 0x0307FFFFFFF
|
||||
Range Size: 190 GB
|
||||
Physical Array Handle: 0x1000
|
||||
Partition Width: 2
|
||||
|
||||
Handle 0x2000, DMI type 32, 11 bytes
|
||||
System Boot Information
|
||||
Status: No errors detected
|
||||
|
||||
Handle 0x2600, DMI type 38, 18 bytes
|
||||
IPMI Device Information
|
||||
Interface Type: KCS (Keyboard Control Style)
|
||||
Specification Version: 2.0
|
||||
I2C Slave Address: 0x10
|
||||
NV Storage Device: Not Present
|
||||
Base Address: 0x0000000000000CA8 (I/O)
|
||||
Register Spacing: 32-bit Boundaries
|
||||
Interrupt Polarity: Active High
|
||||
Interrupt Trigger Mode: Edge
|
||||
Interrupt Number: a
|
||||
|
||||
Handle 0x2700, DMI type 39, 22 bytes
|
||||
System Power Supply
|
||||
Location: Not Specified
|
||||
Name: PWR SPLY,1600W,RDNT,DELTA
|
||||
Manufacturer: DELL
|
||||
Serial Number: 4242
|
||||
Asset Tag: Not Specified
|
||||
Model Part Number: 0685W7A00
|
||||
Revision: Not Specified
|
||||
Max Power Capacity: 1600 W
|
||||
Status: Present, Unknown
|
||||
Type: Unknown
|
||||
Input Voltage Range Switching: Unknown
|
||||
Plugged: Yes
|
||||
Hot Replaceable: Yes
|
||||
|
||||
Handle 0x2701, DMI type 39, 22 bytes
|
||||
System Power Supply
|
||||
Location: Not Specified
|
||||
Name: PWR SPLY,1600W,RDNT,DELTA
|
||||
Manufacturer: DELL
|
||||
Serial Number: 4242
|
||||
Asset Tag: Not Specified
|
||||
Model Part Number: 0685W7A00
|
||||
Revision: Not Specified
|
||||
Max Power Capacity: 1600 W
|
||||
Status: Present, Unknown
|
||||
Type: Unknown
|
||||
Input Voltage Range Switching: Unknown
|
||||
Plugged: Yes
|
||||
Hot Replaceable: Yes
|
||||
|
||||
Handle 0x2900, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: Embedded Video
|
||||
Type: Video
|
||||
Status: Enabled
|
||||
Type Instance: 1
|
||||
Bus Address: 0000:0b:00.0
|
||||
|
||||
Handle 0x2901, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: Embedded EHCI USB Controller 1
|
||||
Type: Other
|
||||
Status: Enabled
|
||||
Type Instance: 1
|
||||
Bus Address: 0000:00:1d.0
|
||||
|
||||
Handle 0x2902, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: Embedded EHCI USB Controller 2
|
||||
Type: Other
|
||||
Status: Enabled
|
||||
Type Instance: 2
|
||||
Bus Address: 0000:00:1a.0
|
||||
|
||||
Handle 0xB100, DMI type 177, 12 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
B1 0C 00 B1 00 02 00 00 00 00 00 00
|
||||
|
||||
Handle 0xD000, DMI type 208, 16 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
D0 10 00 D0 02 00 FE 00 B6 06 00 00 00 01 00 00
|
||||
|
||||
Handle 0xD200, DMI type 210, 12 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
D2 0C 00 D2 F8 02 03 03 06 80 04 05
|
||||
|
||||
Handle 0xD800, DMI type 216, 9 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
D8 09 00 D8 01 02 00 F0 03
|
||||
Strings:
|
||||
Matrox
|
||||
{* Content TBD *}
|
||||
|
||||
Handle 0xDE00, DMI type 222, 16 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
DE 10 00 DE 00 40 FF FF 00 00 00 00 00 01 00 00
|
||||
|
||||
Handle 0xE100, DMI type 225, 13 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
E1 0D 00 E1 01 01 00 04 00 02 01 04 00
|
||||
Strings:
|
||||
CPU.Socket.1
|
||||
CPU.Socket.2
|
||||
|
||||
Handle 0xE101, DMI type 225, 53 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
E1 35 01 E1 01 01 00 11 00 02 01 11 00 03 02 11
|
||||
00 04 03 11 00 05 04 11 00 06 05 11 00 07 06 11
|
||||
00 08 07 11 00 09 08 11 00 0A 09 11 00 0B 0A 11
|
||||
00 0C 0B 11 00
|
||||
Strings:
|
||||
DIMM.Socket.A1
|
||||
DIMM.Socket.A2
|
||||
DIMM.Socket.A3
|
||||
DIMM.Socket.A4
|
||||
DIMM.Socket.A5
|
||||
DIMM.Socket.A6
|
||||
DIMM.Socket.A7
|
||||
DIMM.Socket.A8
|
||||
DIMM.Socket.B1
|
||||
DIMM.Socket.B2
|
||||
DIMM.Socket.B3
|
||||
DIMM.Socket.B4
|
||||
|
||||
Handle 0xFEFF, DMI type 127, 4 bytes
|
||||
End Of Table
|
||||
1146
tests/fixtures/dmidecode/Dell_PowerEdge_M630
vendored
Normal file
1146
tests/fixtures/dmidecode/Dell_PowerEdge_M630
vendored
Normal file
File diff suppressed because it is too large
Load diff
1766
tests/fixtures/dmidecode/HP_BL460c_Gen10
vendored
Normal file
1766
tests/fixtures/dmidecode/HP_BL460c_Gen10
vendored
Normal file
File diff suppressed because it is too large
Load diff
1709
tests/fixtures/dmidecode/HP_BL460c_Gen9
vendored
Normal file
1709
tests/fixtures/dmidecode/HP_BL460c_Gen9
vendored
Normal file
File diff suppressed because it is too large
Load diff
1751
tests/fixtures/dmidecode/HP_DL380p_Gen8
vendored
Normal file
1751
tests/fixtures/dmidecode/HP_DL380p_Gen8
vendored
Normal file
File diff suppressed because it is too large
Load diff
1364
tests/fixtures/dmidecode/HP_SL4540_Gen8
vendored
Normal file
1364
tests/fixtures/dmidecode/HP_SL4540_Gen8
vendored
Normal file
File diff suppressed because it is too large
Load diff
526
tests/fixtures/dmidecode/QCT_X10E-9N
vendored
Normal file
526
tests/fixtures/dmidecode/QCT_X10E-9N
vendored
Normal file
|
|
@ -0,0 +1,526 @@
|
|||
# dmidecode 3.0
|
||||
Getting SMBIOS data from sysfs.
|
||||
SMBIOS 3.0 present.
|
||||
37 structures occupying 2615 bytes.
|
||||
Table at 0x8F9C5000.
|
||||
|
||||
Handle 0x0000, DMI type 0, 24 bytes
|
||||
BIOS Information
|
||||
Vendor: American Megatrends Inc.
|
||||
Version: S3E_3B09.02
|
||||
Release Date: 02/23/2018
|
||||
Address: 0xF0000
|
||||
Runtime Size: 64 kB
|
||||
ROM Size: 8192 kB
|
||||
Characteristics:
|
||||
PCI is supported
|
||||
BIOS is upgradeable
|
||||
BIOS shadowing is allowed
|
||||
Boot from CD is supported
|
||||
Selectable boot is supported
|
||||
BIOS ROM is socketed
|
||||
EDD is supported
|
||||
Print screen service is supported (int 5h)
|
||||
Serial services are supported (int 14h)
|
||||
Printer services are supported (int 17h)
|
||||
ACPI is supported
|
||||
USB legacy is supported
|
||||
BIOS boot specification is supported
|
||||
Targeted content distribution is supported
|
||||
UEFI is supported
|
||||
BIOS Revision: 5.11
|
||||
Firmware Revision: 3.20
|
||||
|
||||
Handle 0x0001, DMI type 1, 27 bytes
|
||||
System Information
|
||||
Manufacturer: Quanta Cloud Technology Inc.
|
||||
Product Name: QuantaMicro X10E-9N
|
||||
Version: N/A
|
||||
Serial Number: QTFCQ57140285
|
||||
UUID: E1A3D1C8-0809-E711-B48A-A81E84729878
|
||||
Wake-up Type: Power Switch
|
||||
SKU Number: S3E
|
||||
Family: Default string
|
||||
|
||||
Handle 0x0002, DMI type 2, 15 bytes
|
||||
Base Board Information
|
||||
Manufacturer: Quanta Cloud Technology Inc.
|
||||
Product Name: S3E-MB
|
||||
Version: 31S3EMB0010
|
||||
Serial Number: CQ571000415
|
||||
Asset Tag: N/A
|
||||
Features:
|
||||
Board is a hosting board
|
||||
Board is replaceable
|
||||
Location In Chassis: 4
|
||||
Chassis Handle: 0x0003
|
||||
Type: Motherboard
|
||||
Contained Object Handles: 0
|
||||
|
||||
Handle 0x0003, DMI type 3, 22 bytes
|
||||
Chassis Information
|
||||
Manufacturer: Quanta Cloud Technology Inc.
|
||||
Type: Rack Mount Chassis
|
||||
Lock: Not Present
|
||||
Version: 32S3ECAST00
|
||||
Serial Number: QTFCQ571402FD
|
||||
Asset Tag: N/A
|
||||
Boot-up State: Safe
|
||||
Power Supply State: Safe
|
||||
Thermal State: Safe
|
||||
Security Status: None
|
||||
OEM Information: 0x00000000
|
||||
Height: 3 U
|
||||
Number Of Power Cords: 2
|
||||
Contained Elements: 0
|
||||
SKU Number: Default string
|
||||
|
||||
Handle 0x0021, DMI type 11, 5 bytes
|
||||
OEM Strings
|
||||
String 1: Default string
|
||||
String 2: Default string
|
||||
String 3: Default string
|
||||
String 4: Default string
|
||||
String 5: Default string
|
||||
|
||||
Handle 0x0025, DMI type 38, 18 bytes
|
||||
IPMI Device Information
|
||||
Interface Type: KCS (Keyboard Control Style)
|
||||
Specification Version: 2.0
|
||||
I2C Slave Address: 0x10
|
||||
NV Storage Device: Not Present
|
||||
Base Address: 0x0000000000000CA2 (I/O)
|
||||
Register Spacing: Successive Byte Boundaries
|
||||
|
||||
Handle 0x0034, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: L1 Cache
|
||||
Configuration: Enabled, Not Socketed, Level 1
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 256 kB
|
||||
Maximum Size: 256 kB
|
||||
Supported SRAM Types:
|
||||
Synchronous
|
||||
Installed SRAM Type: Synchronous
|
||||
Speed: Unknown
|
||||
Error Correction Type: Parity
|
||||
System Type: Other
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0035, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: L2 Cache
|
||||
Configuration: Enabled, Not Socketed, Level 2
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 1024 kB
|
||||
Maximum Size: 1024 kB
|
||||
Supported SRAM Types:
|
||||
Synchronous
|
||||
Installed SRAM Type: Synchronous
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 4-way Set-associative
|
||||
|
||||
Handle 0x0036, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: L3 Cache
|
||||
Configuration: Enabled, Not Socketed, Level 3
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 8192 kB
|
||||
Maximum Size: 8192 kB
|
||||
Supported SRAM Types:
|
||||
Synchronous
|
||||
Installed SRAM Type: Synchronous
|
||||
Speed: Unknown
|
||||
Error Correction Type: Multi-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 16-way Set-associative
|
||||
|
||||
Handle 0x0037, DMI type 4, 48 bytes
|
||||
Processor Information
|
||||
Socket Designation: CPU
|
||||
Type: Central Processor
|
||||
Family: Xeon
|
||||
Manufacturer: Intel(R) Corporation
|
||||
ID: E9 06 09 00 FF FB EB BF
|
||||
Signature: Type 0, Family 6, Model 158, Stepping 9
|
||||
Flags:
|
||||
FPU (Floating-point unit on-chip)
|
||||
VME (Virtual mode extension)
|
||||
DE (Debugging extension)
|
||||
PSE (Page size extension)
|
||||
TSC (Time stamp counter)
|
||||
MSR (Model specific registers)
|
||||
PAE (Physical address extension)
|
||||
MCE (Machine check exception)
|
||||
CX8 (CMPXCHG8 instruction supported)
|
||||
APIC (On-chip APIC hardware supported)
|
||||
SEP (Fast system call)
|
||||
MTRR (Memory type range registers)
|
||||
PGE (Page global enable)
|
||||
MCA (Machine check architecture)
|
||||
CMOV (Conditional move instruction supported)
|
||||
PAT (Page attribute table)
|
||||
PSE-36 (36-bit page size extension)
|
||||
CLFSH (CLFLUSH instruction supported)
|
||||
DS (Debug store)
|
||||
ACPI (ACPI supported)
|
||||
MMX (MMX technology supported)
|
||||
FXSR (FXSAVE and FXSTOR instructions supported)
|
||||
SSE (Streaming SIMD extensions)
|
||||
SSE2 (Streaming SIMD extensions 2)
|
||||
SS (Self-snoop)
|
||||
HTT (Multi-threading)
|
||||
TM (Thermal monitor supported)
|
||||
PBE (Pending break enabled)
|
||||
Version: Intel(R) Xeon(R) CPU E3-1240 v6 @ 3.70GHz
|
||||
Voltage: 1.0 V
|
||||
External Clock: 100 MHz
|
||||
Max Speed: 4100 MHz
|
||||
Current Speed: 3700 MHz
|
||||
Status: Populated, Enabled
|
||||
Upgrade: Other
|
||||
L1 Cache Handle: 0x0034
|
||||
L2 Cache Handle: 0x0035
|
||||
L3 Cache Handle: 0x0036
|
||||
Serial Number: To Be Filled By O.E.M.
|
||||
Asset Tag: To Be Filled By O.E.M.
|
||||
Part Number: To Be Filled By O.E.M.
|
||||
Core Count: 4
|
||||
Core Enabled: 4
|
||||
Thread Count: 8
|
||||
Characteristics:
|
||||
64-bit capable
|
||||
Multi-Core
|
||||
Hardware Thread
|
||||
Execute Protection
|
||||
Enhanced Virtualization
|
||||
Power/Performance Control
|
||||
|
||||
Handle 0x0038, DMI type 16, 23 bytes
|
||||
Physical Memory Array
|
||||
Location: System Board Or Motherboard
|
||||
Use: System Memory
|
||||
Error Correction Type: Single-bit ECC
|
||||
Maximum Capacity: 64 GB
|
||||
Error Information Handle: Not Provided
|
||||
Number Of Devices: 4
|
||||
|
||||
Handle 0x0039, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0038
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: No Module Installed
|
||||
Form Factor: Unknown
|
||||
Set: None
|
||||
Locator: DIMM A1
|
||||
Bank Locator: CHANNEL A
|
||||
Type: Unknown
|
||||
Type Detail: None
|
||||
Speed: Unknown
|
||||
Manufacturer: Not Specified
|
||||
Serial Number: Not Specified
|
||||
Asset Tag: Not Specified
|
||||
Part Number: Not Specified
|
||||
Rank: Unknown
|
||||
Configured Clock Speed: Unknown
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x003A, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0038
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: DIMM A0
|
||||
Bank Locator: CHANNEL A
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: 2133 MHz
|
||||
Manufacturer: Samsung
|
||||
Serial Number: 328CBA1D
|
||||
Asset Tag: 9876543210
|
||||
Part Number: M391A2K43BB1-CPB
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum Voltage: 1.2 V
|
||||
Maximum Voltage: 1.2 V
|
||||
Configured Voltage: 1.2 V
|
||||
|
||||
Handle 0x003B, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0038
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: No Module Installed
|
||||
Form Factor: Unknown
|
||||
Set: None
|
||||
Locator: DIMM B1
|
||||
Bank Locator: CHANNEL B
|
||||
Type: Unknown
|
||||
Type Detail: None
|
||||
Speed: Unknown
|
||||
Manufacturer: Not Specified
|
||||
Serial Number: Not Specified
|
||||
Asset Tag: Not Specified
|
||||
Part Number: Not Specified
|
||||
Rank: Unknown
|
||||
Configured Clock Speed: Unknown
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x003C, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0038
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: DIMM B0
|
||||
Bank Locator: CHANNEL B
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: 2133 MHz
|
||||
Manufacturer: Samsung
|
||||
Serial Number: 328CB9DF
|
||||
Asset Tag: 9876543210
|
||||
Part Number: M391A2K43BB1-CPB
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum Voltage: 1.2 V
|
||||
Maximum Voltage: 1.2 V
|
||||
Configured Voltage: 1.2 V
|
||||
|
||||
Handle 0x003D, DMI type 19, 31 bytes
|
||||
Memory Array Mapped Address
|
||||
Starting Address: 0x00000000000
|
||||
Ending Address: 0x007FFFFFFFF
|
||||
Range Size: 32 GB
|
||||
Physical Array Handle: 0x0038
|
||||
Partition Width: 2
|
||||
|
||||
Handle 0x003E, DMI type 221, 26 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
DD 1A 3E 00 03 01 00 04 01 00 08 00 02 00 00 00
|
||||
00 84 00 03 00 01 03 00 00 00
|
||||
Strings:
|
||||
Reference Code - CPU
|
||||
uCode Version
|
||||
TXT ACM version
|
||||
|
||||
Handle 0x003F, DMI type 221, 68 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
DD 44 3F 00 09 01 00 04 01 00 08 00 02 03 FF FF
|
||||
FF FF FF 04 00 FF FF FF 31 00 05 00 FF FF FF 31
|
||||
00 06 00 FF FF FF FF FF 07 00 3E 00 00 00 00 08
|
||||
00 34 00 00 00 00 09 00 3E 00 00 00 00 0A 00 34
|
||||
00 00 00 00
|
||||
Strings:
|
||||
Reference Code - SKL PCH
|
||||
PCH-CRID Status
|
||||
Disabled
|
||||
PCH-CRID Original Value
|
||||
PCH-CRID New Value
|
||||
OPROM - RST - RAID
|
||||
SKL PCH H Bx Hsio Version
|
||||
SKL PCH H Dx Hsio Version
|
||||
SKL PCH LP Bx Hsio Version
|
||||
SKL PCH LP Cx Hsio Version
|
||||
|
||||
Handle 0x0040, DMI type 221, 54 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
DD 36 40 00 07 01 00 04 01 00 08 00 02 00 04 01
|
||||
00 08 00 03 00 04 01 00 00 00 04 05 FF FF FF FF
|
||||
FF 06 00 FF FF FF 05 00 07 00 FF FF FF 05 00 08
|
||||
00 FF FF FF 00 00
|
||||
Strings:
|
||||
Reference Code - SA - System Agent
|
||||
Reference Code - MRC
|
||||
SA - PCIe Version
|
||||
SA-CRID Status
|
||||
Disabled
|
||||
SA-CRID Original Value
|
||||
SA-CRID New Value
|
||||
OPROM - VBIOS
|
||||
|
||||
Handle 0x0041, DMI type 221, 96 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
DD 60 41 00 0D 01 00 00 00 00 00 00 02 00 FF FF
|
||||
FF FF FF 03 04 FF FF FF FF FF 05 06 FF FF FF FF
|
||||
FF 07 08 FF FF FF FF FF 09 00 00 00 00 00 00 0A
|
||||
00 FF FF FF FF FF 0B 00 FF FF 00 00 00 0C 00 FF
|
||||
FF FF FF FF 0D 00 FF FF FF FF FF 0E 00 FF FF FF
|
||||
FF FF 0F 00 FF FF FF FF FF 10 11 01 02 02 03 00
|
||||
Strings:
|
||||
Lan Phy Version
|
||||
Sensor Firmware Version
|
||||
Debug Mode Status
|
||||
Disabled
|
||||
Performance Mode Status
|
||||
Disabled
|
||||
Debug Use USB(Disabled:Serial)
|
||||
Disabled
|
||||
ICC Overclocking Version
|
||||
UNDI Version
|
||||
EC FW Version
|
||||
GOP Version
|
||||
BIOS Guard Version
|
||||
Base EC FW Version
|
||||
EC-EC Protocol Version
|
||||
Royal Park Version
|
||||
BP1.2.2.0_RP03
|
||||
|
||||
Handle 0x0043, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J1:XDP CONN
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0044, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: JP2:CPLD JTAG
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0045, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J7:HDD0
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: SATA
|
||||
|
||||
Handle 0x0046, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: J15:USB CONN_1
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0047, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: J16:USB CONN_0
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0048, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: JP10:SMBUS_HOST
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0049, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J20:TPM CONN
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x004A, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: JP13:SERIAL_A
|
||||
Internal Connector Type: DB-9 male
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Serial Port XT/AT Compatible
|
||||
|
||||
Handle 0x004B, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: Not Specified
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: J22:VGA_Conn
|
||||
External Connector Type: DB-15 female
|
||||
Port Type: Video Port
|
||||
|
||||
Handle 0x004C, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: Mezz Slot(PCIex8 x4)
|
||||
Type: x12 Proprietary
|
||||
Current Usage: In Use
|
||||
Length: Short
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
PME signal is supported
|
||||
SMBus signal is supported
|
||||
Bus Address: 0000:00:01.0
|
||||
|
||||
Handle 0x004D, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: OCP Mezz Slot(PCIex4)
|
||||
Type: x4 Proprietary
|
||||
Current Usage: Available
|
||||
Length: Short
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
PME signal is supported
|
||||
Bus Address: 0000:00:1d.0
|
||||
|
||||
Handle 0x004E, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: Intel(R) C236 chipset SATA Controller
|
||||
Type: SATA Controller
|
||||
Status: Enabled
|
||||
Type Instance: 1
|
||||
Bus Address: 0000:00:17.0
|
||||
|
||||
Handle 0x004F, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: onboard VGA
|
||||
Type: Video
|
||||
Status: Enabled
|
||||
Type Instance: 1
|
||||
Bus Address: 0000:03:00.0
|
||||
|
||||
Handle 0x0050, DMI type 136, 6 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
88 06 50 00 00 00
|
||||
|
||||
Handle 0x0051, DMI type 14, 17 bytes
|
||||
Group Associations
|
||||
Name: Firmware Version Info
|
||||
Items: 4
|
||||
0x003E (<OUT OF SPEC>)
|
||||
0x003F (<OUT OF SPEC>)
|
||||
0x0040 (<OUT OF SPEC>)
|
||||
0x0041 (<OUT OF SPEC>)
|
||||
|
||||
Handle 0x0052, DMI type 13, 22 bytes
|
||||
BIOS Language Information
|
||||
Language Description Format: Long
|
||||
Installable Languages: 1
|
||||
en|US|iso8859-1
|
||||
Currently Installed Language: en|US|iso8859-1
|
||||
|
||||
Handle 0x0053, DMI type 127, 4 bytes
|
||||
End Of Table
|
||||
|
||||
1242
tests/fixtures/dmidecode/SM_SSG-6028R
vendored
Normal file
1242
tests/fixtures/dmidecode/SM_SSG-6028R
vendored
Normal file
File diff suppressed because it is too large
Load diff
957
tests/fixtures/dmidecode/SM_SYS-6018R
vendored
Normal file
957
tests/fixtures/dmidecode/SM_SYS-6018R
vendored
Normal file
|
|
@ -0,0 +1,957 @@
|
|||
# dmidecode 3.0
|
||||
Getting SMBIOS data from sysfs.
|
||||
SMBIOS 3.0.0 present.
|
||||
Table at 0x000EC9B0.
|
||||
|
||||
Handle 0x0000, DMI type 0, 24 bytes
|
||||
BIOS Information
|
||||
Vendor: American Megatrends Inc.
|
||||
Version: 2.0b
|
||||
Release Date: 04/14/2017
|
||||
Address: 0xF0000
|
||||
Runtime Size: 64 kB
|
||||
ROM Size: 16384 kB
|
||||
Characteristics:
|
||||
PCI is supported
|
||||
BIOS is upgradeable
|
||||
BIOS shadowing is allowed
|
||||
Boot from CD is supported
|
||||
Selectable boot is supported
|
||||
BIOS ROM is socketed
|
||||
EDD is supported
|
||||
5.25"/1.2 MB floppy services are supported (int 13h)
|
||||
3.5"/720 kB floppy services are supported (int 13h)
|
||||
3.5"/2.88 MB floppy services are supported (int 13h)
|
||||
Print screen service is supported (int 5h)
|
||||
8042 keyboard services are supported (int 9h)
|
||||
Serial services are supported (int 14h)
|
||||
Printer services are supported (int 17h)
|
||||
ACPI is supported
|
||||
USB legacy is supported
|
||||
BIOS boot specification is supported
|
||||
Targeted content distribution is supported
|
||||
UEFI is supported
|
||||
BIOS Revision: 5.6
|
||||
|
||||
Handle 0x0001, DMI type 1, 27 bytes
|
||||
System Information
|
||||
Manufacturer: Supermicro
|
||||
Product Name: SYS-6018R-TDTPR
|
||||
Version: 0123456789
|
||||
Serial Number: A177950X7709591
|
||||
UUID: 00000000-0000-0000-0000-0CC47A4B18C0
|
||||
Wake-up Type: Power Switch
|
||||
SKU Number: Default string
|
||||
Family: Default string
|
||||
|
||||
Handle 0x0002, DMI type 2, 15 bytes
|
||||
Base Board Information
|
||||
Manufacturer: Supermicro
|
||||
Product Name: X10DRD-LTP
|
||||
Version: 1.00
|
||||
Serial Number: ZM152S007866
|
||||
Asset Tag: Default string
|
||||
Features:
|
||||
Board is a hosting board
|
||||
Board is replaceable
|
||||
Location In Chassis: Default string
|
||||
Chassis Handle: 0x0003
|
||||
Type: Motherboard
|
||||
Contained Object Handles: 0
|
||||
|
||||
Handle 0x0003, DMI type 3, 22 bytes
|
||||
Chassis Information
|
||||
Manufacturer: Supermicro
|
||||
Type: Other
|
||||
Lock: Not Present
|
||||
Version: 0123456789
|
||||
Serial Number: C8150LG15NH0008
|
||||
Asset Tag: Default string
|
||||
Boot-up State: Safe
|
||||
Power Supply State: Safe
|
||||
Thermal State: Safe
|
||||
Security Status: None
|
||||
OEM Information: 0x00000000
|
||||
Height: Unspecified
|
||||
Number Of Power Cords: 1
|
||||
Contained Elements: 0
|
||||
SKU Number: Default string
|
||||
|
||||
Handle 0x0004, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J1A1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: PS2Mouse
|
||||
External Connector Type: PS/2
|
||||
Port Type: Mouse Port
|
||||
|
||||
Handle 0x0005, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J1A1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Keyboard
|
||||
External Connector Type: PS/2
|
||||
Port Type: Keyboard Port
|
||||
|
||||
Handle 0x0006, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J2A1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: TV Out
|
||||
External Connector Type: Mini Centronics Type-14
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0007, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J2A2A
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: COM A
|
||||
External Connector Type: DB-9 male
|
||||
Port Type: Serial Port 16550A Compatible
|
||||
|
||||
Handle 0x0008, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J2A2B
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: Video
|
||||
External Connector Type: DB-15 female
|
||||
Port Type: Video Port
|
||||
|
||||
Handle 0x0009, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J3A1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: USB1
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x000A, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J3A1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: USB2
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x000B, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J3A1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: USB3
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x000C, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9A1 - TPM HDR
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x000D, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9C1 - PCIE DOCKING CONN
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x000E, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J2B3 - CPU FAN
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x000F, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J6C2 - EXT HDMI
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0010, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J3C1 - GMCH FAN
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0011, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J1D1 - ITP
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0012, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9E2 - MDC INTPSR
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0013, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9E4 - MDC INTPSR
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0014, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9E3 - LPC HOT DOCKING
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0015, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9E1 - SCAN MATRIX
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0016, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J9G1 - LPC SIDE BAND
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0017, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J8F1 - UNIFIED
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0018, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J6F1 - LVDS
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x0019, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J2F1 - LAI FAN
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x001A, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J2G1 - GFX VID
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x001B, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: J1G6 - AC JACK
|
||||
Internal Connector Type: Other
|
||||
External Reference Designator: Not Specified
|
||||
External Connector Type: None
|
||||
Port Type: Other
|
||||
|
||||
Handle 0x001C, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: CPU1 SLOT4 PCI-E 3.0 X8
|
||||
Type: x8 PCI Express 3 x8
|
||||
Current Usage: Available
|
||||
Length: Short
|
||||
ID: 4
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
Opening is shared
|
||||
PME signal is supported
|
||||
Bus Address: 0000:05:00.0
|
||||
|
||||
Handle 0x001D, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: CPU1 SLOT5 PCI-E 3.0 X8
|
||||
Type: x8 PCI Express 3 x8
|
||||
Current Usage: Available
|
||||
Length: Short
|
||||
ID: 5
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
Opening is shared
|
||||
PME signal is supported
|
||||
Bus Address: 0000:03:00.0
|
||||
|
||||
Handle 0x001E, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: CPU1 SLOT6 PCI-E 3.0 X8
|
||||
Type: x8 PCI Express 3 x8
|
||||
Current Usage: In Use
|
||||
Length: Short
|
||||
ID: 6
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
Opening is shared
|
||||
PME signal is supported
|
||||
Bus Address: 0000:04:00.0
|
||||
|
||||
Handle 0x001F, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: CPU2 SLOT7 PCI-E 3.0 X8
|
||||
Type: x8 PCI Express 3 x8
|
||||
Current Usage: Available
|
||||
Length: Short
|
||||
ID: 7
|
||||
Characteristics:
|
||||
3.3 V is provided
|
||||
Opening is shared
|
||||
PME signal is supported
|
||||
Bus Address: 0000:ff:00.0
|
||||
|
||||
Handle 0x0020, DMI type 11, 5 bytes
|
||||
OEM Strings
|
||||
String 1: Intel Haswell/Wellsburg/Grantley
|
||||
String 2: Supermicro motherboard-X10 Series
|
||||
|
||||
Handle 0x0021, DMI type 32, 20 bytes
|
||||
System Boot Information
|
||||
Status: No errors detected
|
||||
|
||||
Handle 0x0022, DMI type 39, 22 bytes
|
||||
System Power Supply
|
||||
Power Unit Group: 1
|
||||
Location: PSU1
|
||||
Name: PWS-504P-1R
|
||||
Manufacturer: SUPERMICRO
|
||||
Serial Number: P5041CG52ST0022
|
||||
Asset Tag: N/A
|
||||
Model Part Number: PWS-504P-1R
|
||||
Revision: 1.4
|
||||
Max Power Capacity: 500 W
|
||||
Status: Present, OK
|
||||
Type: Switching
|
||||
Input Voltage Range Switching: Auto-switch
|
||||
Plugged: Yes
|
||||
Hot Replaceable: Yes
|
||||
|
||||
Handle 0x0023, DMI type 39, 22 bytes
|
||||
System Power Supply
|
||||
Power Unit Group: 2
|
||||
Location: PSU2
|
||||
Name: PWS-504P-1R
|
||||
Manufacturer: SUPERMICRO
|
||||
Serial Number: P5041CG52ST0021
|
||||
Asset Tag: N/A
|
||||
Model Part Number: PWS-504P-1R
|
||||
Revision: 1.4
|
||||
Max Power Capacity: 500 W
|
||||
Status: Present, OK
|
||||
Type: Switching
|
||||
Input Voltage Range Switching: Auto-switch
|
||||
Plugged: Yes
|
||||
Hot Replaceable: Yes
|
||||
|
||||
Handle 0x0024, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: ASPEED Video AST2400
|
||||
Type: Video
|
||||
Status: Enabled
|
||||
Type Instance: 1
|
||||
Bus Address: 0000:09:00.0
|
||||
|
||||
Handle 0x0025, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: Intel Ethernet 82599ES/EN SFP+ #1
|
||||
Type: Ethernet
|
||||
Status: Enabled
|
||||
Type Instance: 1
|
||||
Bus Address: 0000:06:00.0
|
||||
|
||||
Handle 0x0026, DMI type 41, 11 bytes
|
||||
Onboard Device
|
||||
Reference Designation: Intel Ethernet 82599ES/EN SFP+ #2
|
||||
Type: Ethernet
|
||||
Status: Enabled
|
||||
Type Instance: 2
|
||||
Bus Address: 0000:06:00.1
|
||||
|
||||
Handle 0x0027, DMI type 38, 18 bytes
|
||||
IPMI Device Information
|
||||
Interface Type: KCS (Keyboard Control Style)
|
||||
Specification Version: 2.0
|
||||
I2C Slave Address: 0x10
|
||||
NV Storage Device: Not Present
|
||||
Base Address: 0x0000000000000CA2 (I/O)
|
||||
Register Spacing: Successive Byte Boundaries
|
||||
|
||||
Handle 0x002A, DMI type 16, 23 bytes
|
||||
Physical Memory Array
|
||||
Location: System Board Or Motherboard
|
||||
Use: System Memory
|
||||
Error Correction Type: Multi-bit ECC
|
||||
Maximum Capacity: 256 GB
|
||||
Error Information Handle: Not Provided
|
||||
Number Of Devices: 4
|
||||
|
||||
Handle 0x002B, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002A
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P1-DIMMA1
|
||||
Bank Locator: P0_Node0_Channel0_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: SK Hynix
|
||||
Serial Number: 2AA5B8E9
|
||||
Asset Tag: P1-DIMMA1_AssetTag (date:17/39)
|
||||
Part Number: HMA42GR7AFR4N-UH
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x002C, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002A
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P1-DIMMB1
|
||||
Bank Locator: P0_Node0_Channel1_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: SK Hynix
|
||||
Serial Number: 2AA5B923
|
||||
Asset Tag: P1-DIMMB1_AssetTag (date:17/39)
|
||||
Part Number: HMA42GR7AFR4N-UH
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x002D, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002A
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: No Module Installed
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P1-DIMMC1
|
||||
Bank Locator: P0_Node0_Channel2_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: Unknown
|
||||
Manufacturer: NO DIMM
|
||||
Serial Number: NO DIMM
|
||||
Asset Tag: NO DIMM
|
||||
Part Number: NO DIMM
|
||||
Rank: Unknown
|
||||
Configured Clock Speed: Unknown
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x002E, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002A
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: No Module Installed
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P1-DIMMD1
|
||||
Bank Locator: P0_Node0_Channel3_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: Unknown
|
||||
Manufacturer: NO DIMM
|
||||
Serial Number: NO DIMM
|
||||
Asset Tag: NO DIMM
|
||||
Part Number: NO DIMM
|
||||
Rank: Unknown
|
||||
Configured Clock Speed: Unknown
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x002F, DMI type 16, 23 bytes
|
||||
Physical Memory Array
|
||||
Location: System Board Or Motherboard
|
||||
Use: System Memory
|
||||
Error Correction Type: Multi-bit ECC
|
||||
Maximum Capacity: 256 GB
|
||||
Error Information Handle: Not Provided
|
||||
Number Of Devices: 4
|
||||
|
||||
Handle 0x0030, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002F
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P2-DIMME1
|
||||
Bank Locator: P1_Node1_Channel0_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: SK Hynix
|
||||
Serial Number: 2AA5B88C
|
||||
Asset Tag: P2-DIMME1_AssetTag (date:17/39)
|
||||
Part Number: HMA42GR7AFR4N-UH
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0031, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002F
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: 72 bits
|
||||
Data Width: 64 bits
|
||||
Size: 16384 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P2-DIMMF1
|
||||
Bank Locator: P1_Node1_Channel1_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: 2400 MHz
|
||||
Manufacturer: SK Hynix
|
||||
Serial Number: 2AA5B86B
|
||||
Asset Tag: P2-DIMMF1_AssetTag (date:17/39)
|
||||
Part Number: HMA42GR7AFR4N-UH
|
||||
Rank: 2
|
||||
Configured Clock Speed: 2133 MHz
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0032, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002F
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: No Module Installed
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P2-DIMMG1
|
||||
Bank Locator: P1_Node1_Channel2_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: Unknown
|
||||
Manufacturer: NO DIMM
|
||||
Serial Number: NO DIMM
|
||||
Asset Tag: NO DIMM
|
||||
Part Number: NO DIMM
|
||||
Rank: Unknown
|
||||
Configured Clock Speed: Unknown
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0033, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x002F
|
||||
Error Information Handle: Not Provided
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: No Module Installed
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: P2-DIMMH1
|
||||
Bank Locator: P1_Node1_Channel3_Dimm0
|
||||
Type: DDR4
|
||||
Type Detail: Synchronous
|
||||
Speed: Unknown
|
||||
Manufacturer: NO DIMM
|
||||
Serial Number: NO DIMM
|
||||
Asset Tag: NO DIMM
|
||||
Part Number: NO DIMM
|
||||
Rank: Unknown
|
||||
Configured Clock Speed: Unknown
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0034, DMI type 19, 31 bytes
|
||||
Memory Array Mapped Address
|
||||
Starting Address: 0x00000000000
|
||||
Ending Address: 0x007FFFFFFFF
|
||||
Range Size: 32 GB
|
||||
Physical Array Handle: 0x002A
|
||||
Partition Width: 2
|
||||
|
||||
Handle 0x0035, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00000000000
|
||||
Ending Address: 0x003FFFFFFFF
|
||||
Range Size: 16 GB
|
||||
Physical Device Handle: 0x002B
|
||||
Memory Array Mapped Address Handle: 0x0034
|
||||
Partition Row Position: 1
|
||||
|
||||
Handle 0x0036, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00400000000
|
||||
Ending Address: 0x007FFFFFFFF
|
||||
Range Size: 16 GB
|
||||
Physical Device Handle: 0x002C
|
||||
Memory Array Mapped Address Handle: 0x0034
|
||||
Partition Row Position: 1
|
||||
|
||||
Handle 0x0037, DMI type 19, 31 bytes
|
||||
Memory Array Mapped Address
|
||||
Starting Address: 0x00800000000
|
||||
Ending Address: 0x00FFFFFFFFF
|
||||
Range Size: 32 GB
|
||||
Physical Array Handle: 0x002F
|
||||
Partition Width: 2
|
||||
|
||||
Handle 0x0038, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00800000000
|
||||
Ending Address: 0x00BFFFFFFFF
|
||||
Range Size: 16 GB
|
||||
Physical Device Handle: 0x0030
|
||||
Memory Array Mapped Address Handle: 0x0037
|
||||
Partition Row Position: 1
|
||||
|
||||
Handle 0x0039, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00C00000000
|
||||
Ending Address: 0x00FFFFFFFFF
|
||||
Range Size: 16 GB
|
||||
Physical Device Handle: 0x0031
|
||||
Memory Array Mapped Address Handle: 0x0037
|
||||
Partition Row Position: 1
|
||||
|
||||
Handle 0x003A, DMI type 15, 73 bytes
|
||||
System Event Log
|
||||
Area Length: 65535 bytes
|
||||
Header Start Offset: 0x0000
|
||||
Header Length: 16 bytes
|
||||
Data Start Offset: 0x0010
|
||||
Access Method: Memory-mapped physical 32-bit address
|
||||
Access Address: 0xFF540000
|
||||
Status: Valid, Not Full
|
||||
Change Token: 0x00000001
|
||||
Header Format: Type 1
|
||||
Supported Log Type Descriptors: 25
|
||||
Descriptor 1: Single-bit ECC memory error
|
||||
Data Format 1: Multiple-event handle
|
||||
Descriptor 2: Multi-bit ECC memory error
|
||||
Data Format 2: Multiple-event handle
|
||||
Descriptor 3: Parity memory error
|
||||
Data Format 3: None
|
||||
Descriptor 4: Bus timeout
|
||||
Data Format 4: None
|
||||
Descriptor 5: I/O channel block
|
||||
Data Format 5: None
|
||||
Descriptor 6: Software NMI
|
||||
Data Format 6: None
|
||||
Descriptor 7: POST memory resize
|
||||
Data Format 7: None
|
||||
Descriptor 8: POST error
|
||||
Data Format 8: POST results bitmap
|
||||
Descriptor 9: PCI parity error
|
||||
Data Format 9: Multiple-event handle
|
||||
Descriptor 10: PCI system error
|
||||
Data Format 10: Multiple-event handle
|
||||
Descriptor 11: CPU failure
|
||||
Data Format 11: None
|
||||
Descriptor 12: EISA failsafe timer timeout
|
||||
Data Format 12: None
|
||||
Descriptor 13: Correctable memory log disabled
|
||||
Data Format 13: None
|
||||
Descriptor 14: Logging disabled
|
||||
Data Format 14: None
|
||||
Descriptor 15: System limit exceeded
|
||||
Data Format 15: None
|
||||
Descriptor 16: Asynchronous hardware timer expired
|
||||
Data Format 16: None
|
||||
Descriptor 17: System configuration information
|
||||
Data Format 17: None
|
||||
Descriptor 18: Hard disk information
|
||||
Data Format 18: None
|
||||
Descriptor 19: System reconfigured
|
||||
Data Format 19: None
|
||||
Descriptor 20: Uncorrectable CPU-complex error
|
||||
Data Format 20: None
|
||||
Descriptor 21: Log area reset/cleared
|
||||
Data Format 21: None
|
||||
Descriptor 22: System boot
|
||||
Data Format 22: None
|
||||
Descriptor 23: End of log
|
||||
Data Format 23: None
|
||||
Descriptor 24: OEM-specific
|
||||
Data Format 24: OEM-specific
|
||||
Descriptor 25: OEM-specific
|
||||
Data Format 25: OEM-specific
|
||||
|
||||
Handle 0x003B, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: CPU Internal L1
|
||||
Configuration: Enabled, Not Socketed, Level 1
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 640 kB
|
||||
Maximum Size: 640 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Parity
|
||||
System Type: Other
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x003C, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: CPU Internal L2
|
||||
Configuration: Enabled, Not Socketed, Level 2
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 2560 kB
|
||||
Maximum Size: 2560 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x003D, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: CPU Internal L3
|
||||
Configuration: Enabled, Not Socketed, Level 3
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 25600 kB
|
||||
Maximum Size: 25600 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 20-way Set-associative
|
||||
|
||||
Handle 0x003E, DMI type 4, 42 bytes
|
||||
Processor Information
|
||||
Socket Designation: CPU1
|
||||
Type: Central Processor
|
||||
Family: Xeon
|
||||
Manufacturer: Intel
|
||||
ID: F1 06 04 00 FF FB EB BF
|
||||
Signature: Type 0, Family 6, Model 79, Stepping 1
|
||||
Flags:
|
||||
FPU (Floating-point unit on-chip)
|
||||
VME (Virtual mode extension)
|
||||
DE (Debugging extension)
|
||||
PSE (Page size extension)
|
||||
TSC (Time stamp counter)
|
||||
MSR (Model specific registers)
|
||||
PAE (Physical address extension)
|
||||
MCE (Machine check exception)
|
||||
CX8 (CMPXCHG8 instruction supported)
|
||||
APIC (On-chip APIC hardware supported)
|
||||
SEP (Fast system call)
|
||||
MTRR (Memory type range registers)
|
||||
PGE (Page global enable)
|
||||
MCA (Machine check architecture)
|
||||
CMOV (Conditional move instruction supported)
|
||||
PAT (Page attribute table)
|
||||
PSE-36 (36-bit page size extension)
|
||||
CLFSH (CLFLUSH instruction supported)
|
||||
DS (Debug store)
|
||||
ACPI (ACPI supported)
|
||||
MMX (MMX technology supported)
|
||||
FXSR (FXSAVE and FXSTOR instructions supported)
|
||||
SSE (Streaming SIMD extensions)
|
||||
SSE2 (Streaming SIMD extensions 2)
|
||||
SS (Self-snoop)
|
||||
HTT (Multi-threading)
|
||||
TM (Thermal monitor supported)
|
||||
PBE (Pending break enabled)
|
||||
Version: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
|
||||
Voltage: 1.8 V
|
||||
External Clock: 100 MHz
|
||||
Max Speed: 4000 MHz
|
||||
Current Speed: 2200 MHz
|
||||
Status: Populated, Enabled
|
||||
Upgrade: Socket LGA2011-3
|
||||
L1 Cache Handle: 0x003B
|
||||
L2 Cache Handle: 0x003C
|
||||
L3 Cache Handle: 0x003D
|
||||
Serial Number: Not Specified
|
||||
Asset Tag: Not Specified
|
||||
Part Number: Not Specified
|
||||
Core Count: 10
|
||||
Core Enabled: 10
|
||||
Thread Count: 20
|
||||
Characteristics:
|
||||
64-bit capable
|
||||
Multi-Core
|
||||
Hardware Thread
|
||||
Execute Protection
|
||||
Enhanced Virtualization
|
||||
Power/Performance Control
|
||||
|
||||
Handle 0x003F, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: CPU Internal L1
|
||||
Configuration: Enabled, Not Socketed, Level 1
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 640 kB
|
||||
Maximum Size: 640 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Parity
|
||||
System Type: Other
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0040, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: CPU Internal L2
|
||||
Configuration: Enabled, Not Socketed, Level 2
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 2560 kB
|
||||
Maximum Size: 2560 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0041, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: CPU Internal L3
|
||||
Configuration: Enabled, Not Socketed, Level 3
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 25600 kB
|
||||
Maximum Size: 25600 kB
|
||||
Supported SRAM Types:
|
||||
Unknown
|
||||
Installed SRAM Type: Unknown
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 20-way Set-associative
|
||||
|
||||
Handle 0x0042, DMI type 4, 42 bytes
|
||||
Processor Information
|
||||
Socket Designation: CPU2
|
||||
Type: Central Processor
|
||||
Family: Xeon
|
||||
Manufacturer: Intel
|
||||
ID: F1 06 04 00 FF FB EB BF
|
||||
Signature: Type 0, Family 6, Model 79, Stepping 1
|
||||
Flags:
|
||||
FPU (Floating-point unit on-chip)
|
||||
VME (Virtual mode extension)
|
||||
DE (Debugging extension)
|
||||
PSE (Page size extension)
|
||||
TSC (Time stamp counter)
|
||||
MSR (Model specific registers)
|
||||
PAE (Physical address extension)
|
||||
MCE (Machine check exception)
|
||||
CX8 (CMPXCHG8 instruction supported)
|
||||
APIC (On-chip APIC hardware supported)
|
||||
SEP (Fast system call)
|
||||
MTRR (Memory type range registers)
|
||||
PGE (Page global enable)
|
||||
MCA (Machine check architecture)
|
||||
CMOV (Conditional move instruction supported)
|
||||
PAT (Page attribute table)
|
||||
PSE-36 (36-bit page size extension)
|
||||
CLFSH (CLFLUSH instruction supported)
|
||||
DS (Debug store)
|
||||
ACPI (ACPI supported)
|
||||
MMX (MMX technology supported)
|
||||
FXSR (FXSAVE and FXSTOR instructions supported)
|
||||
SSE (Streaming SIMD extensions)
|
||||
SSE2 (Streaming SIMD extensions 2)
|
||||
SS (Self-snoop)
|
||||
HTT (Multi-threading)
|
||||
TM (Thermal monitor supported)
|
||||
PBE (Pending break enabled)
|
||||
Version: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
|
||||
Voltage: 1.8 V
|
||||
External Clock: 100 MHz
|
||||
Max Speed: 4000 MHz
|
||||
Current Speed: 2200 MHz
|
||||
Status: Populated, Enabled
|
||||
Upgrade: Socket LGA2011-3
|
||||
L1 Cache Handle: 0x003F
|
||||
L2 Cache Handle: 0x0040
|
||||
L3 Cache Handle: 0x0041
|
||||
Serial Number: Not Specified
|
||||
Asset Tag: Not Specified
|
||||
Part Number: Not Specified
|
||||
Core Count: 10
|
||||
Core Enabled: 10
|
||||
Thread Count: 20
|
||||
Characteristics:
|
||||
64-bit capable
|
||||
Multi-Core
|
||||
Hardware Thread
|
||||
Execute Protection
|
||||
Enhanced Virtualization
|
||||
Power/Performance Control
|
||||
|
||||
Handle 0x0043, DMI type 40, 27 bytes
|
||||
Additional Information 1
|
||||
|
||||
Handle 0x0044, DMI type 40, 27 bytes
|
||||
Additional Information 1
|
||||
|
||||
Handle 0x0045, DMI type 40, 27 bytes
|
||||
Additional Information 1
|
||||
|
||||
Handle 0x0046, DMI type 40, 27 bytes
|
||||
Additional Information 1
|
||||
|
||||
Handle 0x0047, DMI type 127, 4 bytes
|
||||
End Of Table
|
||||
|
||||
571
tests/fixtures/dmidecode/unknown.txt
vendored
Normal file
571
tests/fixtures/dmidecode/unknown.txt
vendored
Normal file
|
|
@ -0,0 +1,571 @@
|
|||
# dmidecode 3.1
|
||||
Getting SMBIOS data from sysfs.
|
||||
SMBIOS 2.8 present.
|
||||
44 structures occupying 2055 bytes.
|
||||
Table at 0x000E4E00.
|
||||
|
||||
Handle 0x0000, DMI type 0, 24 bytes
|
||||
BIOS Information
|
||||
Vendor: Online Labs
|
||||
Version: 00.00.00.0007
|
||||
Release Date: 03/04/2016
|
||||
Address: 0xE0000
|
||||
Runtime Size: 128 kB
|
||||
ROM Size: 6144 kB
|
||||
Characteristics:
|
||||
PCI is supported
|
||||
BIOS is upgradeable
|
||||
BIOS shadowing is allowed
|
||||
Boot from CD is supported
|
||||
Selectable boot is supported
|
||||
EDD is supported
|
||||
Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
|
||||
Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
|
||||
5.25"/360 kB floppy services are supported (int 13h)
|
||||
5.25"/1.2 MB floppy services are supported (int 13h)
|
||||
3.5"/720 kB floppy services are supported (int 13h)
|
||||
3.5"/2.88 MB floppy services are supported (int 13h)
|
||||
8042 keyboard services are supported (int 9h)
|
||||
CGA/mono video services are supported (int 10h)
|
||||
ACPI is supported
|
||||
USB legacy is supported
|
||||
BIOS boot specification is supported
|
||||
Targeted content distribution is supported
|
||||
UEFI is supported
|
||||
BIOS Revision: 0.0
|
||||
|
||||
Handle 0x0001, DMI type 1, 27 bytes
|
||||
System Information
|
||||
Manufacturer: Online Labs
|
||||
Product Name: SR
|
||||
Version: (^_^)
|
||||
Serial Number: 42
|
||||
UUID: 12345678-1234-5678-90AB-CDDEEFAABBCC
|
||||
Wake-up Type: Power Switch
|
||||
SKU Number: (^_^)
|
||||
Family: Avoton
|
||||
|
||||
Handle 0x0002, DMI type 2, 15 bytes
|
||||
Base Board Information
|
||||
Manufacturer: Online Labs
|
||||
Product Name: SR
|
||||
Version: 42
|
||||
Serial Number: 42
|
||||
Asset Tag: 42
|
||||
Features:
|
||||
Board is a hosting board
|
||||
Board is replaceable
|
||||
Location In Chassis: <BAD INDEX>
|
||||
Chassis Handle: 0x0003
|
||||
Type: Motherboard
|
||||
Contained Object Handles: 0
|
||||
|
||||
Handle 0x0003, DMI type 3, 22 bytes
|
||||
Chassis Information
|
||||
Manufacturer: Chassis Manufacturer
|
||||
Type: Desktop
|
||||
Lock: Not Present
|
||||
Version: Chassis Version
|
||||
Serial Number: Chassis Serial Number
|
||||
Asset Tag: Chassis Asset Tag
|
||||
Boot-up State: Safe
|
||||
Power Supply State: Safe
|
||||
Thermal State: Safe
|
||||
Security Status: None
|
||||
OEM Information: 0x00000000
|
||||
Height: Unspecified
|
||||
Number Of Power Cords: 1
|
||||
Contained Elements: 0
|
||||
SKU Number: SKU Number
|
||||
|
||||
Handle 0x0004, DMI type 4, 42 bytes
|
||||
Processor Information
|
||||
Socket Designation: CPU0
|
||||
Type: Central Processor
|
||||
Family: Atom
|
||||
Manufacturer: Intel(R) Corporation
|
||||
ID: D8 06 04 00 FF FB EB BF
|
||||
Signature: Type 0, Family 6, Model 77, Stepping 8
|
||||
Flags:
|
||||
FPU (Floating-point unit on-chip)
|
||||
VME (Virtual mode extension)
|
||||
DE (Debugging extension)
|
||||
PSE (Page size extension)
|
||||
TSC (Time stamp counter)
|
||||
MSR (Model specific registers)
|
||||
PAE (Physical address extension)
|
||||
MCE (Machine check exception)
|
||||
CX8 (CMPXCHG8 instruction supported)
|
||||
APIC (On-chip APIC hardware supported)
|
||||
SEP (Fast system call)
|
||||
MTRR (Memory type range registers)
|
||||
PGE (Page global enable)
|
||||
MCA (Machine check architecture)
|
||||
CMOV (Conditional move instruction supported)
|
||||
PAT (Page attribute table)
|
||||
PSE-36 (36-bit page size extension)
|
||||
CLFSH (CLFLUSH instruction supported)
|
||||
DS (Debug store)
|
||||
ACPI (ACPI supported)
|
||||
MMX (MMX technology supported)
|
||||
FXSR (FXSAVE and FXSTOR instructions supported)
|
||||
SSE (Streaming SIMD extensions)
|
||||
SSE2 (Streaming SIMD extensions 2)
|
||||
SS (Self-snoop)
|
||||
HTT (Multi-threading)
|
||||
TM (Thermal monitor supported)
|
||||
PBE (Pending break enabled)
|
||||
Version: Intel(R) Atom(TM) CPU C2750 @ 2.40GHz
|
||||
Voltage: 1.6 V
|
||||
External Clock: 100 MHz
|
||||
Max Speed: 2400 MHz
|
||||
Current Speed: 2400 MHz
|
||||
Status: Populated, Enabled
|
||||
Upgrade: Socket LGA775
|
||||
L1 Cache Handle: 0x0005
|
||||
L2 Cache Handle: 0x0006
|
||||
L3 Cache Handle: Not Provided
|
||||
Serial Number: Not Specified
|
||||
Asset Tag: UNKNOWN
|
||||
Part Number: Not Specified
|
||||
Core Count: 8
|
||||
Core Enabled: 8
|
||||
Thread Count: 8
|
||||
Characteristics:
|
||||
64-bit capable
|
||||
|
||||
Handle 0x0005, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: L1-Cache
|
||||
Configuration: Enabled, Not Socketed, Level 1
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 448 kB
|
||||
Maximum Size: 448 kB
|
||||
Supported SRAM Types:
|
||||
Synchronous
|
||||
Installed SRAM Type: Synchronous
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Instruction
|
||||
Associativity: 8-way Set-associative
|
||||
|
||||
Handle 0x0006, DMI type 7, 19 bytes
|
||||
Cache Information
|
||||
Socket Designation: L2-Cache
|
||||
Configuration: Enabled, Not Socketed, Level 2
|
||||
Operational Mode: Write Back
|
||||
Location: Internal
|
||||
Installed Size: 4096 kB
|
||||
Maximum Size: 4096 kB
|
||||
Supported SRAM Types:
|
||||
Synchronous
|
||||
Installed SRAM Type: Synchronous
|
||||
Speed: Unknown
|
||||
Error Correction Type: Single-bit ECC
|
||||
System Type: Unified
|
||||
Associativity: 16-way Set-associative
|
||||
|
||||
Handle 0x0007, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: EC5
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: USB
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0008, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: EC6
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: USB
|
||||
External Connector Type: Access Bus (USB)
|
||||
Port Type: USB
|
||||
|
||||
Handle 0x0009, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: LAN1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: 1G Network
|
||||
External Connector Type: RJ-45
|
||||
Port Type: Network Port
|
||||
|
||||
Handle 0x000A, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: LAN1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: 1G Network
|
||||
External Connector Type: RJ-45
|
||||
Port Type: Network Port
|
||||
|
||||
Handle 0x000B, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: 10GLAN1
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: 10G Network
|
||||
External Connector Type: RJ-45
|
||||
Port Type: Network Port
|
||||
|
||||
Handle 0x000C, DMI type 8, 9 bytes
|
||||
Port Connector Information
|
||||
Internal Reference Designator: 10GLAN2
|
||||
Internal Connector Type: None
|
||||
External Reference Designator: 10G Network
|
||||
External Connector Type: RJ-45
|
||||
Port Type: Network Port
|
||||
|
||||
Handle 0x000D, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCI_E_1
|
||||
Type: x8 PCI Express x8
|
||||
Current Usage: Available
|
||||
Length: Other
|
||||
ID: 1
|
||||
Characteristics:
|
||||
PME signal is supported
|
||||
Hot-plug devices are supported
|
||||
Bus Address: 0000:00:01.0
|
||||
|
||||
Handle 0x000E, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCI_E_2
|
||||
Type: x4 PCI Express x4
|
||||
Current Usage: Available
|
||||
Length: Other
|
||||
ID: 2
|
||||
Characteristics:
|
||||
PME signal is supported
|
||||
Hot-plug devices are supported
|
||||
Bus Address: 0000:00:02.0
|
||||
|
||||
Handle 0x000F, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCI_E_3
|
||||
Type: x4 PCI Express x4
|
||||
Current Usage: Available
|
||||
Length: Other
|
||||
ID: 3
|
||||
Characteristics:
|
||||
PME signal is supported
|
||||
Hot-plug devices are supported
|
||||
Bus Address: 0000:04:08.0
|
||||
|
||||
Handle 0x0010, DMI type 9, 17 bytes
|
||||
System Slot Information
|
||||
Designation: PCI_E_4
|
||||
Type: x16 PCI Express x16
|
||||
Current Usage: Available
|
||||
Length: Other
|
||||
ID: 4
|
||||
Characteristics:
|
||||
PME signal is supported
|
||||
Hot-plug devices are supported
|
||||
Bus Address: 0000:04:09.0
|
||||
|
||||
Handle 0x0011, DMI type 11, 5 bytes
|
||||
OEM Strings
|
||||
String 1: OemString1
|
||||
String 2: OemString2
|
||||
String 3: OemString3
|
||||
|
||||
Handle 0x0012, DMI type 12, 5 bytes
|
||||
System Configuration Options
|
||||
Option 1: ConfigOptions1
|
||||
Option 2: ConfigOptions2
|
||||
Option 3: ConfigOptions3
|
||||
|
||||
Handle 0x0013, DMI type 13, 22 bytes
|
||||
BIOS Language Information
|
||||
Language Description Format: Long
|
||||
Installable Languages: 4
|
||||
en|US|iso8859-1,0
|
||||
fr|CA|iso8859-1,0
|
||||
zh|TW|unicode,0
|
||||
ja|JP|unicode,0
|
||||
Currently Installed Language: en|US|iso8859-1,0
|
||||
|
||||
Handle 0x0014, DMI type 15, 29 bytes
|
||||
System Event Log
|
||||
Area Length: 0 bytes
|
||||
Header Start Offset: 0x0000
|
||||
Header Length: 8192 bytes
|
||||
Data Start Offset: 0x2000
|
||||
Access Method: General-purpose non-volatile data functions
|
||||
Access Address: 0x0000
|
||||
Status: Valid, Not Full
|
||||
Change Token: 0x12345678
|
||||
Header Format: OEM-specific
|
||||
Supported Log Type Descriptors: 3
|
||||
Descriptor 1: POST memory resize
|
||||
Data Format 1: None
|
||||
Descriptor 2: POST error
|
||||
Data Format 2: POST results bitmap
|
||||
Descriptor 3: Log area reset/cleared
|
||||
Data Format 3: None
|
||||
|
||||
Handle 0x0015, DMI type 16, 23 bytes
|
||||
Physical Memory Array
|
||||
Location: System Board Or Motherboard
|
||||
Use: System Memory
|
||||
Error Correction Type: None
|
||||
Maximum Capacity: 64 GB
|
||||
Error Information Handle: No Error
|
||||
Number Of Devices: 4
|
||||
|
||||
Handle 0x0016, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0015
|
||||
Error Information Handle: No Error
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: 8192 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: DIMM0
|
||||
Bank Locator: BANK 0
|
||||
Type: DDR3
|
||||
Type Detail: Synchronous Unbuffered (Unregistered)
|
||||
Speed: 1600 MT/s
|
||||
Manufacturer: Micron
|
||||
Serial Number: 23115200
|
||||
Asset Tag: 01
|
||||
Part Number: DVM64453C DATARAM
|
||||
Rank: 2
|
||||
Configured Clock Speed: 1600 MT/s
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0017, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0015
|
||||
Error Information Handle: No Error
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: 8192 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: DIMM0
|
||||
Bank Locator: BANK 1
|
||||
Type: DDR3
|
||||
Type Detail: Synchronous Unbuffered (Unregistered)
|
||||
Speed: 1600 MT/s
|
||||
Manufacturer: Micron
|
||||
Serial Number: 00001639
|
||||
Asset Tag: 02
|
||||
Part Number: DVM64453C DATARAM
|
||||
Rank: 2
|
||||
Configured Clock Speed: 1600 MT/s
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0018, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0015
|
||||
Error Information Handle: No Error
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: 8192 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: DIMM1
|
||||
Bank Locator: BANK 0
|
||||
Type: DDR3
|
||||
Type Detail: Synchronous Unbuffered (Unregistered)
|
||||
Speed: 1600 MT/s
|
||||
Manufacturer: Micron
|
||||
Serial Number: 23115200
|
||||
Asset Tag: 03
|
||||
Part Number: DVM64453C DATARAM
|
||||
Rank: 2
|
||||
Configured Clock Speed: 1600 MT/s
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x0019, DMI type 17, 40 bytes
|
||||
Memory Device
|
||||
Array Handle: 0x0015
|
||||
Error Information Handle: No Error
|
||||
Total Width: Unknown
|
||||
Data Width: Unknown
|
||||
Size: 8192 MB
|
||||
Form Factor: DIMM
|
||||
Set: None
|
||||
Locator: DIMM1
|
||||
Bank Locator: BANK 1
|
||||
Type: DDR3
|
||||
Type Detail: Synchronous Unbuffered (Unregistered)
|
||||
Speed: 1600 MT/s
|
||||
Manufacturer: Micron
|
||||
Serial Number: 23115200
|
||||
Asset Tag: 04
|
||||
Part Number: DVM64453C DATARAM
|
||||
Rank: 2
|
||||
Configured Clock Speed: 1600 MT/s
|
||||
Minimum Voltage: Unknown
|
||||
Maximum Voltage: Unknown
|
||||
Configured Voltage: Unknown
|
||||
|
||||
Handle 0x001A, DMI type 19, 31 bytes
|
||||
Memory Array Mapped Address
|
||||
Starting Address: 0x00000000000
|
||||
Ending Address: 0x007FFFFFFFF
|
||||
Range Size: 32 GB
|
||||
Physical Array Handle: 0x0015
|
||||
Partition Width: 4
|
||||
|
||||
Handle 0x001B, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00000000000
|
||||
Ending Address: 0x001FFFFFFFF
|
||||
Range Size: 8 GB
|
||||
Physical Device Handle: 0x0016
|
||||
Memory Array Mapped Address Handle: 0x0015
|
||||
Partition Row Position: Unknown
|
||||
|
||||
Handle 0x001C, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00200000000
|
||||
Ending Address: 0x003FFFFFFFF
|
||||
Range Size: 8 GB
|
||||
Physical Device Handle: 0x0017
|
||||
Memory Array Mapped Address Handle: 0x0015
|
||||
Partition Row Position: Unknown
|
||||
|
||||
Handle 0x001D, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00400000000
|
||||
Ending Address: 0x005FFFFFFFF
|
||||
Range Size: 8 GB
|
||||
Physical Device Handle: 0x0018
|
||||
Memory Array Mapped Address Handle: 0x0015
|
||||
Partition Row Position: Unknown
|
||||
|
||||
Handle 0x001E, DMI type 20, 35 bytes
|
||||
Memory Device Mapped Address
|
||||
Starting Address: 0x00600000000
|
||||
Ending Address: 0x007FFFFFFFF
|
||||
Range Size: 8 GB
|
||||
Physical Device Handle: 0x0019
|
||||
Memory Array Mapped Address Handle: 0x0015
|
||||
Partition Row Position: Unknown
|
||||
|
||||
Handle 0x001F, DMI type 21, 7 bytes
|
||||
Built-in Pointing Device
|
||||
Type: Touch Pad
|
||||
Interface: PS/2
|
||||
Buttons: 4
|
||||
|
||||
Handle 0x0020, DMI type 22, 26 bytes
|
||||
Portable Battery
|
||||
Location: Fake
|
||||
Manufacturer: -Virtual Battery 0-
|
||||
Manufacture Date: 08/08/2010
|
||||
Serial Number: Battery 0
|
||||
Name: CRB Battery 0
|
||||
Chemistry: Zinc Air
|
||||
Design Capacity: Unknown
|
||||
Design Voltage: Unknown
|
||||
SBDS Version: LithiumPolymer
|
||||
Maximum Error: Unknown
|
||||
OEM-specific Information: 0x00000000
|
||||
|
||||
Handle 0x0021, DMI type 26, 24 bytes
|
||||
Voltage Probe
|
||||
Description: Voltage Probe Description
|
||||
Location: Unknown
|
||||
Status: Unknown
|
||||
Maximum Value: Unknown
|
||||
Minimum Value: Unknown
|
||||
Resolution: Unknown
|
||||
Tolerance: Unknown
|
||||
Accuracy: Unknown
|
||||
OEM-specific Information: 0x00008000
|
||||
Nominal Value: 0.000 V
|
||||
|
||||
Handle 0x0022, DMI type 27, 15 bytes
|
||||
Cooling Device
|
||||
Temperature Probe Handle: 0x0023
|
||||
Type: Fan
|
||||
Status: OK
|
||||
OEM-specific Information: 0x00000000
|
||||
Nominal Speed: 8192 rpm
|
||||
Description: Cooling Device Description
|
||||
|
||||
Handle 0x0023, DMI type 28, 24 bytes
|
||||
Temperature Probe
|
||||
Description: Temperature Probe Description
|
||||
Location: Unknown
|
||||
Status: Unknown
|
||||
Maximum Value: Unknown
|
||||
Minimum Value: Unknown
|
||||
Resolution: Unknown
|
||||
Tolerance: Unknown
|
||||
Accuracy: Unknown
|
||||
OEM-specific Information: 0x00008000
|
||||
Nominal Value: 0.0 deg C
|
||||
|
||||
Handle 0x0024, DMI type 32, 11 bytes
|
||||
System Boot Information
|
||||
Status: No errors detected
|
||||
|
||||
Handle 0x0025, DMI type 39, 22 bytes
|
||||
System Power Supply
|
||||
Location: OEM Define 0
|
||||
Name: OEM Define 1
|
||||
Manufacturer: OEM Define 2
|
||||
Serial Number: OEM Define 3
|
||||
Asset Tag: OEM Define 4
|
||||
Model Part Number: OEM Define 5
|
||||
Revision: OEM Define 6
|
||||
Max Power Capacity: 75 W
|
||||
Status: Not Present
|
||||
Type: Regulator
|
||||
Input Voltage Range Switching: Auto-switch
|
||||
Plugged: No
|
||||
Hot Replaceable: No
|
||||
|
||||
Handle 0x0026, DMI type 40, 17 bytes
|
||||
Additional Information 1
|
||||
Referenced Handle: 0x000c
|
||||
Referenced Offset: 0x05
|
||||
String: PCIExpressx16
|
||||
Value: 0xaa
|
||||
Additional Information 2
|
||||
Referenced Handle: 0x0000
|
||||
Referenced Offset: 0x05
|
||||
String: Compiler Version: VC 9.0
|
||||
Value: 0x00
|
||||
|
||||
Handle 0x0027, DMI type 128, 8 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
80 08 27 00 55 AA 55 AA
|
||||
Strings:
|
||||
Oem Type 128 Test 1
|
||||
Oem Type 128 Test 2
|
||||
|
||||
Handle 0x0028, DMI type 129, 8 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
81 08 28 00 01 01 02 01
|
||||
Strings:
|
||||
Insyde_ASF_001
|
||||
Insyde_ASF_002
|
||||
|
||||
Handle 0x0029, DMI type 130, 20 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
82 14 29 00 24 41 4D 54 01 01 01 01 01 A5 1F 02
|
||||
00 00 00 00
|
||||
|
||||
Handle 0x002A, DMI type 136, 6 bytes
|
||||
OEM-specific Type
|
||||
Header and Data:
|
||||
88 06 2A 00 FF FF
|
||||
|
||||
Handle 0xFEFF, DMI type 127, 4 bytes
|
||||
End Of Table
|
||||
|
||||
16
tests/fixtures/inventory/nvme.json
vendored
Normal file
16
tests/fixtures/inventory/nvme.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"Devices" : [
|
||||
{
|
||||
"DevicePath" : "/dev/nvme0n1",
|
||||
"Firmware" : "10604103",
|
||||
"Index" : 0,
|
||||
"ModelNumber" : "KXG60ZNV1T02 NVMe TOSHIBA 1024GB",
|
||||
"ProductName" : "Non-Volatile memory controller: Toshiba America Info Systems Device 0x011a",
|
||||
"SerialNumber" : "19FA109SK07N",
|
||||
"UsedBytes" : 1024209543168,
|
||||
"MaximumLBA" : 2000409264,
|
||||
"PhysicalSize" : 1024209543168,
|
||||
"SectorSize" : 512
|
||||
}
|
||||
]
|
||||
}
|
||||
56
tests/fixtures/lldp/cumulus.txt
vendored
Normal file
56
tests/fixtures/lldp/cumulus.txt
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
lldp.eno1.via=LLDP
|
||||
lldp.eno1.rid=4
|
||||
lldp.eno1.age=35 days, 08:24:00
|
||||
lldp.eno1.chassis.mac=e4:f0:04:b6:47:32
|
||||
lldp.eno1.chassis.name=toto-chassis.dc42
|
||||
lldp.eno1.chassis.descr=Cumulus Linux version 3.7.3 running on Dell EMC S4100
|
||||
lldp.eno1.chassis.ttl=120
|
||||
lldp.eno1.chassis.mgmt-ip=10.160.20.18
|
||||
lldp.eno1.chassis.mgmt-ip=fe80::e6f0:4ff:feb6:4732
|
||||
lldp.eno1.chassis.Bridge.enabled=on
|
||||
lldp.eno1.chassis.Router.enabled=on
|
||||
lldp.eno1.port.ifname=swp46
|
||||
lldp.eno1.port.descr=BXVWNR2:lom2
|
||||
lldp.eno1.port.auto-negotiation.supported=yes
|
||||
lldp.eno1.port.auto-negotiation.enabled=no
|
||||
lldp.eno1.port.auto-negotiation.current=10GigBaseLR - R fiber over 1310 nm optics
|
||||
lldp.eno1.lldp-med.device-type=Network Connectivity Device
|
||||
lldp.eno1.lldp-med.Capabilities.available=yes
|
||||
lldp.eno1.lldp-med.Policy.available=yes
|
||||
lldp.eno1.lldp-med.Location.available=yes
|
||||
lldp.eno1.lldp-med.MDI/PSE.available=yes
|
||||
lldp.eno1.lldp-med.MDI/PD.available=yes
|
||||
lldp.eno1.lldp-med.Inventory.available=yes
|
||||
lldp.eno1.lldp-med.inventory.software=3.7.3
|
||||
lldp.eno1.lldp-med.inventory.firmware=5.6.5
|
||||
lldp.eno1.lldp-med.inventory.serial=To be filled by O.E.M.
|
||||
lldp.eno1.lldp-med.inventory.manufacturer=Dell EMC
|
||||
lldp.eno1.lldp-med.inventory.model=S4100
|
||||
lldp.eno2d1.via=LLDP
|
||||
lldp.eno2d1.rid=3
|
||||
lldp.eno2d1.age=35 days, 08:30:52
|
||||
lldp.eno2d1.chassis.mac=e4:f0:04:b6:4e:32
|
||||
lldp.eno1.chassis.name=toto-chassis.dc42
|
||||
lldp.eno2d1.chassis.descr=Cumulus Linux version 3.7.5 running on Dell EMC S4100
|
||||
lldp.eno2d1.chassis.ttl=120
|
||||
lldp.eno2d1.chassis.mgmt-ip=10.160.20.17
|
||||
lldp.eno2d1.chassis.mgmt-ip=fe80::e6f0:4ff:feb6:4e32
|
||||
lldp.eno2d1.chassis.Bridge.enabled=on
|
||||
lldp.eno2d1.chassis.Router.enabled=on
|
||||
lldp.eno2d1.port.ifname=swp46
|
||||
lldp.eno2d1.port.descr=BXVWNR2:lom1
|
||||
lldp.eno2d1.port.auto-negotiation.supported=yes
|
||||
lldp.eno2d1.port.auto-negotiation.enabled=no
|
||||
lldp.eno2d1.port.auto-negotiation.current=10GigBaseLR - R fiber over 1310 nm optics
|
||||
lldp.eno2d1.lldp-med.device-type=Network Connectivity Device
|
||||
lldp.eno2d1.lldp-med.Capabilities.available=yes
|
||||
lldp.eno2d1.lldp-med.Policy.available=yes
|
||||
lldp.eno2d1.lldp-med.Location.available=yes
|
||||
lldp.eno2d1.lldp-med.MDI/PSE.available=yes
|
||||
lldp.eno2d1.lldp-med.MDI/PD.available=yes
|
||||
lldp.eno2d1.lldp-med.Inventory.available=yes
|
||||
lldp.eno2d1.lldp-med.inventory.software=3.7.5
|
||||
lldp.eno2d1.lldp-med.inventory.firmware=5.6.5
|
||||
lldp.eno2d1.lldp-med.inventory.serial=To be filled by O.E.M.
|
||||
lldp.eno2d1.lldp-med.inventory.manufacturer=Dell EMC
|
||||
lldp.eno2d1.lldp-med.inventory.model=S4100
|
||||
8
tests/fixtures/lldp/dedibox1.txt
vendored
Normal file
8
tests/fixtures/lldp/dedibox1.txt
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
lldp.enp1s0f0.via=LLDP
|
||||
lldp.enp1s0f0.rid=1
|
||||
lldp.enp1s0f0.age=145 days, 00:00:39
|
||||
lldp.enp1s0f0.chassis.mac=00:07:cb:0b:6c:d7
|
||||
lldp.enp1s0f0.chassis.name=s120-f3-2.itx4
|
||||
lldp.enp1s0f0.chassis.mgmt-ip=10.48.16.15
|
||||
lldp.enp1s0f0.port.ifname=RJ-9
|
||||
lldp.enp1s0f0.port.ttl=120
|
||||
25
tests/fixtures/lldp/dedibox2.txt
vendored
Normal file
25
tests/fixtures/lldp/dedibox2.txt
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
lldp.eno1.via=LLDP
|
||||
lldp.eno1.rid=1
|
||||
lldp.eno1.age=1 day, 06:17:13
|
||||
lldp.eno1.chassis.mac=38:20:56:67:90:80
|
||||
lldp.eno1.chassis.name=s35-b12.dc3
|
||||
lldp.eno1.chassis.descr=Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.0(2a)EX5, RELEASE SOFTWARE (fc3)
|
||||
Technical Support: http://www.cisco.com/techsupport
|
||||
Copyright (c) 1986-2015 by Cisco Systems, Inc.
|
||||
Compiled Mon 16-Feb-15 08:16 by prod_rel_team
|
||||
lldp.eno1.chassis.mgmt-ip=10.43.31.35
|
||||
lldp.eno1.chassis.Bridge.enabled=on
|
||||
lldp.eno1.chassis.Router.enabled=off
|
||||
lldp.eno1.port.ifname=Gi1/0/29
|
||||
lldp.eno1.port.descr=GigabitEthernet1/0/29
|
||||
lldp.eno1.port.auto-negotiation.supported=yes
|
||||
lldp.eno1.port.auto-negotiation.enabled=yes
|
||||
lldp.eno1.port.auto-negotiation.10Base-T.hd=yes
|
||||
lldp.eno1.port.auto-negotiation.10Base-T.fd=yes
|
||||
lldp.eno1.port.auto-negotiation.100Base-TX.hd=yes
|
||||
lldp.eno1.port.auto-negotiation.100Base-TX.fd=yes
|
||||
lldp.eno1.port.auto-negotiation.1000Base-T.hd=no
|
||||
lldp.eno1.port.auto-negotiation.1000Base-T.fd=yes
|
||||
lldp.eno1.port.auto-negotiation.current=1000BaseTFD - Four-pair Category 5 UTP, full duplex mode
|
||||
lldp.eno1.vlan.vlan-id=140
|
||||
lldp.eno1.vlan.pvid=yes
|
||||
38
tests/fixtures/lldp/qfx.txt
vendored
Normal file
38
tests/fixtures/lldp/qfx.txt
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
lldp.eth0.via=LLDP
|
||||
lldp.eth0.rid=1
|
||||
lldp.eth0.age=163 days, 23:03:53
|
||||
lldp.eth0.chassis.mac=40:a6:77:7a:72:00
|
||||
lldp.eth0.chassis.name=sw-filer-f06.dc42
|
||||
lldp.eth0.chassis.descr=Juniper Networks, Inc. qfx5100-48s-6q Ethernet Switch, kernel JUNOS 14.1X53-D43.7, Build date: 2017-04-28 02:22:48 UTC Copyright (c) 1996-2017 Juniper Networks, Inc.
|
||||
lldp.eth0.chassis.mgmt-ip=10.192.192.116
|
||||
lldp.eth0.chassis.Bridge.enabled=on
|
||||
lldp.eth0.chassis.Router.enabled=on
|
||||
lldp.eth0.port.local=512
|
||||
lldp.eth0.port.descr=xe-0/0/1
|
||||
lldp.eth0.port.mfs=1514
|
||||
lldp.eth0.vlan.vlan-id=296
|
||||
lldp.eth0.vlan.pvid=yes
|
||||
lldp.eth0.vlan=vlan-296
|
||||
lldp.eth0.unknown-tlvs.unknown-tlv.oui=00,90,69
|
||||
lldp.eth0.unknown-tlvs.unknown-tlv.subtype=1
|
||||
lldp.eth0.unknown-tlvs.unknown-tlv.len=12
|
||||
lldp.eth0.unknown-tlvs.unknown-tlv=56,46,33,37,31,35,30,33,30,31,36,34
|
||||
lldp.eth1.via=LLDP
|
||||
lldp.eth1.rid=2
|
||||
lldp.eth1.age=163 days, 23:03:51
|
||||
lldp.eth1.chassis.mac=40:a6:77:7c:fb:20
|
||||
lldp.eth1.chassis.name=sw-filer-f05.dc42
|
||||
lldp.eth1.chassis.descr=Juniper Networks, Inc. qfx5100-48s-6q Ethernet Switch, kernel JUNOS 17.3R3-S3.3, Build date: 2019-01-10 19:17:42 UTC Copyright (c) 1996-2019 Juniper Networks, Inc.
|
||||
lldp.eth1.chassis.mgmt-ip=10.192.192.115
|
||||
lldp.eth1.chassis.Bridge.enabled=on
|
||||
lldp.eth1.chassis.Router.enabled=on
|
||||
lldp.eth1.port.local=512
|
||||
lldp.eth1.port.descr=xe-0/0/1
|
||||
lldp.eth1.port.mfs=1514
|
||||
lldp.eth1.vlan.vlan-id=296
|
||||
lldp.eth1.vlan.pvid=yes
|
||||
lldp.eth1.vlan=vlan-296
|
||||
lldp.eth1.unknown-tlvs.unknown-tlv.oui=00,90,69
|
||||
lldp.eth1.unknown-tlvs.unknown-tlv.subtype=1
|
||||
lldp.eth1.unknown-tlvs.unknown-tlv.len=12
|
||||
lldp.eth1.unknown-tlvs.unknown-tlv=56,46,33,37,31,35,30,33,30,30,34,35
|
||||
16
tests/fixtures/netbox_agent.conf1.ok
vendored
Normal file
16
tests/fixtures/netbox_agent.conf1.ok
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
netbox:
|
||||
url: 'https://netbox.company.com'
|
||||
token: xx
|
||||
|
||||
datacenter_location:
|
||||
driver: "cmd:cat /etc/qualification | tr [A-Z] [a-z]"
|
||||
regex: "datacenter: (?P<datacenter>[A-Za-z0-9]+)"
|
||||
|
||||
rack_location:
|
||||
driver: 'cmd:lldpctl'
|
||||
regex: 'SysName:[ ]+[A-Za-z]+-[A-Za-z]+-([A-Za-z0-9]+)'
|
||||
|
||||
network:
|
||||
ignore_interfaces: "(dummy.*|docker.*)"
|
||||
ignore_ips: (127\.0\.0\..*)
|
||||
lldp: true
|
||||
20
tests/network.py
Normal file
20
tests/network.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from netbox_agent.lldp import LLDP
|
||||
from tests.conftest import parametrize_with_fixtures
|
||||
|
||||
|
||||
@parametrize_with_fixtures(
|
||||
'lldp/', only_filenames=[
|
||||
'dedibox1.txt',
|
||||
])
|
||||
def test_lldp_parse_with_port_desc(fixture):
|
||||
lldp = LLDP(fixture)
|
||||
assert lldp.get_switch_port('enp1s0f0') == 'RJ-9'
|
||||
|
||||
|
||||
@parametrize_with_fixtures(
|
||||
'lldp/', only_filenames=[
|
||||
'qfx.txt',
|
||||
])
|
||||
def test_lldp_parse_without_ifname(fixture):
|
||||
lldp = LLDP(fixture)
|
||||
assert lldp.get_switch_port('eth0') == 'xe-0/0/1'
|
||||
43
tests/server.py
Normal file
43
tests/server.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
from netbox_agent.dmidecode import parse
|
||||
from netbox_agent.server import ServerBase
|
||||
from tests.conftest import parametrize_with_fixtures
|
||||
|
||||
|
||||
@parametrize_with_fixtures('dmidecode/')
|
||||
def test_init(fixture):
|
||||
dmi = parse(fixture)
|
||||
server = ServerBase(dmi)
|
||||
assert server
|
||||
|
||||
|
||||
@parametrize_with_fixtures(
|
||||
'dmidecode/', only_filenames=[
|
||||
'HP_SL4540_Gen8',
|
||||
'HP_BL460c_Gen9',
|
||||
'HP_DL380p_Gen8',
|
||||
'HP_SL4540_Gen8'
|
||||
])
|
||||
def test_hp_service_tag(fixture):
|
||||
dmi = parse(fixture)
|
||||
server = ServerBase(dmi)
|
||||
assert server.get_service_tag() == '4242'
|
||||
|
||||
|
||||
@parametrize_with_fixtures(
|
||||
'dmidecode/', only_filenames=[
|
||||
'unknown.txt'
|
||||
])
|
||||
def test_generic_host_service_tag(fixture):
|
||||
dmi = parse(fixture)
|
||||
server = ServerBase(dmi)
|
||||
assert server.get_service_tag() == '42'
|
||||
|
||||
|
||||
@parametrize_with_fixtures(
|
||||
'dmidecode/', only_filenames=[
|
||||
'unknown.txt'
|
||||
])
|
||||
def test_generic_host_product_name(fixture):
|
||||
dmi = parse(fixture)
|
||||
server = ServerBase(dmi)
|
||||
assert server.get_product_name() == 'SR'
|
||||
40
tox.ini
40
tox.ini
|
|
@ -2,38 +2,16 @@
|
|||
# These are the default environments that will be run
|
||||
# when ``tox`` is run without arguments.
|
||||
envlist =
|
||||
py35
|
||||
py36
|
||||
py37
|
||||
coverage
|
||||
mypy
|
||||
pep8
|
||||
docs
|
||||
pytest
|
||||
flake8
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[flake8]
|
||||
# Use the more relaxed max line length permitted in PEP8.
|
||||
max-line-length = 99
|
||||
|
||||
# Enforce the Google Python style for grouping and sorting imports:
|
||||
# https://github.com/google/styleguide/blob/gh-pages/pyguide.md#313-imports-formatting
|
||||
import-order-style = google
|
||||
|
||||
# Inform flake8-import-order plugin that `fact` should be treated as a local package name.
|
||||
application-import-names = netbox_agent
|
||||
|
||||
[testenv]
|
||||
# This is required in order to get UTF-8 output inside of the subprocesses
|
||||
# that our tests use.
|
||||
setenv = LC_CTYPE = en_US.UTF-8
|
||||
# Pass Display down to have it for the tests available
|
||||
passenv = DISPLAY TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
||||
whitelist_externals=convert
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
deps = -r{toxinidir}/dev-requirements.txt
|
||||
whitelist_externals = bash
|
||||
|
||||
[testenv:pep8]
|
||||
deps =
|
||||
flake8
|
||||
pep8-naming
|
||||
commands = flake8 {toxinidir}/netbox_agent {toxinidir}/tests
|
||||
[testenv:pytest]
|
||||
commands = bash tests.sh
|
||||
|
||||
[testenv:flake8]
|
||||
commands = flake8
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue