Skip to content

Commit

Permalink
Add ability to detect iX CI VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
Qubad786 committed Apr 23, 2024
1 parent 09791b8 commit d56d72d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ixhardware/chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"TRUENAS-R", # freenas certified replacement
"FREENAS-MINI", # minis tagged with legacy information
)
TRUENAS_QEMU = "IXKVM"
TRUENAS_UNKNOWN = "TRUENAS-UNKNOWN"


Expand All @@ -29,4 +30,9 @@ def get_chassis_hardware(dmi: DMIInfo):
# last resort
return "TRUENAS-X"

if dmi.system_product_name == "qemu" and dmi.system_serial_number.startswith(
"ha"
) and dmi.system_serial_number.endswith(("_c1", "_c2")):
return TRUENAS_QEMU

return TRUENAS_UNKNOWN

0 comments on commit d56d72d

Please sign in to comment.