Skip to content

inventory/dmi

Chassis recognition rules

Map of chassis keys to recognition rules. The inventory-dmi task evaluates each rule against the machine's Gohai DMI data and records the matches in inventory/dmi-data. Site rules belong in inventory/dmi-site, which is merged over this map by key.

This is the chassis counterpart to inventory/components, which matches PCI devices. Where the component rules answer which card tooling applies, these answer what the machine is, which is what baselines and vendor content packs key on.

Rules are matched against a record built from DMI. Manufacturer and Product collect values from more than one place, and an expression matches when it matches any one of them:

  • Manufacturer - System.Manufacturer, the first Chassis.Manufacturer, the first Baseboards.Manufacturer and BIOS.Vendor.
  • Product - System.ProductName, System.Version, System.SKUNumber, System.Family and the first Baseboards.ProductName.
  • Chassis - the first Chassis.Type, such as RackMountChassis.
  • Hypervisor - DMI.Hypervisor, empty on physical hardware.
  • Serial - System.SerialNumber.

Each rule also supports:

  • Profile - Profile to add when the rule matches. Defaults to hw-dmi-<key>.
  • Content - content pack that supports the chassis. Recorded in inventory/dmi-data for downstream selection.
  • Description - human readable summary.
  • Fallback - when true, the rule matches only a physical machine that no tier 1 rule (one with Content) matched, in addition to any expressions it has. A fallback rule may have no expressions.

Profiles are only applied to physical machines. Virtual machines and containers record their matches in inventory/dmi-data without receiving a Profile.

All expressions are case insensitive and evaluated with jq test; every expression in a rule must hold. A rule with no expressions is skipped.

Rules are independent and additive, so a ProLiant DL360 Gen10 matches both the hp vendor rule and the hpe-gen10 generation rule and receives both Profiles. Matching the reported strings with regular expressions rather than exact equality is deliberate: a PowerEdge R650 and a PowerEdge R630 both match poweredge without either being enumerated, which is what the case statements in older content could not do.

When two Profiles set the same Params, the rules must be made mutually exclusive, since Profile order on the machine decides which value wins. The cisco rule matches the CIMC managed C, B and S series Products and cisco-ucsxe matches UCS XE Products, so no system receives both.

Objects that Reference inventory/dmi

Objects used by inventory/dmi

Not used in current content packs