Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hwinfo/host/dmidecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class DmidecodeParser(CommandParser):
r'System\ Information\n(.)*\n\tProduct\ Name:\ (?P<system_product_name>.*)\n',
r'System\ Information\n(.)*\n(.)*\n(.)*\n\tSerial\ Number:\ (?P<system_serial_number>.*)\n',
r'System\ Information\n(.)*\n(.)*\n(.)*\n(.)*\n\tUUID:\ (?P<system_uuid>.*)\n',
# Chassis Info
r'Chassis\ Information\n(.)*\n\tType:\ (?P<chassis_type>.*)\n',
]


4 changes: 4 additions & 0 deletions hwinfo/host/tests/test_dmidecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class DmidecodeParserTests(unittest.TestCase):
'system_product_name': 'PowerEdge R310',
'system_serial_number': 'GZ7BS4J',
'system_uuid': '4C4C4544-005A-3710-8042-C7C04F53344A',
'chassis_type': 'Rack Mount Chassis',
}


Expand Down Expand Up @@ -50,3 +51,6 @@ def test_dmidecode_system_serial_number(self):

def test_dmidecode_system_uuid(self):
return self._assert_equal('system_uuid')

def test_dmidecode_chassis_type(self):
return self._assert_equal('chassis_type')