Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Blade to FORM_FACTOR list and document SMBIOS spec URL #771

Merged
merged 1 commit into from
Aug 2, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/setup
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,15 @@ class LinuxHardware(Hardware):
'bios_date': '/sys/devices/virtual/dmi/id/bios_date',
'bios_version': '/sys/devices/virtual/dmi/id/bios_version' }
# From smolt and DMI spec
# See http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.0.pdf
FORM_FACTOR = [ "Unknown", "Other", "Unknown", "Desktop",
"Low Profile Desktop", "Pizza Box", "Mini Tower", "Tower",
"Portable", "Laptop", "Notebook", "Hand Held", "Docking Station",
"All In One", "Sub Notebook", "Space-saving", "Lunch Box",
"Main Server Chassis", "Expansion Chassis", "Sub Chassis",
"Bus Expansion Chassis", "Peripheral Chassis", "RAID Chassis",
"Rack Mount Chassis", "Sealed-case PC", "Multi-system",
"CompactPCI", "AdvancedTCA" ]
"CompactPCI", "AdvancedTCA", "Blade" ]

def __init__(self):
Hardware.__init__(self)
Expand Down Expand Up @@ -250,7 +251,6 @@ class LinuxHardware(Hardware):
data = get_file_content(path)
if data is not None:
if key == 'form_factor':

try:
self.facts['form_factor'] = LinuxHardware.FORM_FACTOR[int(data)]
except IndexError, e:
Expand Down