Hardware Inventory¶
The inventory-dmi and inventory-components tasks in task-library match a machine's Gohai data
against rule maps and add a Profile for each matching rule. A content pack uses this mechanism to
attach vendor or component tooling to the machines that need it. The operator view is in
Early Inventory.
| Chassis | Component | |
|---|---|---|
| Task | inventory-dmi |
inventory-components |
| Shipped rules | inventory/dmi |
inventory/components |
| Site rules | inventory/dmi-site |
inventory/components-site |
| Results | inventory/dmi-data |
inventory/components-data |
| Default Profile | hw-dmi-<key> |
hw-comp-<key> |
| Applied to | Physical machines | Physical and virtual machines |
Rule Fields¶
All match expressions are case-insensitive jq regular expressions. Every expression in a rule must match. An expression that is tested against several values matches if any one of them matches.
Chassis rules (inventory/dmi):
Manufacturer: system, chassis, and baseboard manufacturer, and BIOS vendor.Product: product name, version, SKU, family, and baseboard product.Chassis: chassis type, such asRackMountChassis.Hypervisor: empty on physical hardware.Serial: system serial number.Fallback: matches only a physical machine that no rule withContentmatched. The shippedodmrule uses this.
Component rules (inventory/components):
Vendor: vendor ID and name.Component: device ID, device name, class name, and subclass name.Subsystem: subsystem vendor and device IDs and names. Use this field to identify OEM cards.Class: six-digit PCI class code. For example,^0104matches RAID controllers.Driver: bound kernel driver.
Both rule types:
Profile: overrides the default Profile name.Content: the content pack that supplies the tooling, recorded in the results.Description: a short summary.
IDs are lowercase hex without a 0x prefix. A rule with no match expressions is skipped. To see
the values that chassis rules were matched against, read inventory/dmi-data .Chassis.
Shipping a Tooling Profile¶
A rule only adds its Profile if that Profile exists, so a content pack enables a rule by shipping the
Profile. For example, dell-support ships hw-dmi-dell:
Name: hw-dmi-dell
Description: Dell system tooling
Params:
hardware-tools-install-tasks:
- dell-dsu-setup
- dell-install-omsa
Rules are independent and additive. A ProLiant Gen10 matches both hp and hpe-gen10, and a Dell
PERC matches both raid-controller and dell-perc. When two Profiles set the same Param, make the
rules mutually exclusive, because the Profile order on the machine determines which value wins. For
example, cisco and cisco-ucsxe match disjoint product patterns.
Example Profiles to read:
dell-support:hw-dmi-dellhpe-support:hw-dmi-hpsupermicro-support:hw-dmi-supermicrocisco-support:hw-dmi-cisco-ucsxeodm-support:hw-dmi-odm
Adding Rules¶
To add a rule that RackN ships, add it to the default of inventory/dmi or inventory/components
in task-library. For a site rule, set the -site Param, either globally or in a Profile:
inventory/dmi-site:
acme-gpu:
Manufacturer: "supermicro"
Product: "sys-421ge"
Profile: "acme-gpu-node"
odm: null # disable the shipped fallback rule
To test a rule without a full discovery run, append the task to the task list of a machine that is idle in Sledgehammer:
drpcli machines tasks add <machine-uuid> inventory-dmi
drpcli machines get <machine-uuid> param inventory/dmi-data | jq '.Matched'
The job log lists each rule as matched (+++) or not matched (---), along with the Profiles that
were added or removed.
Migrating from hw-<manufacturer>-base¶
The deprecated inventory-minimal task added one hw-<manufacturer>-base Profile, derived from
DMI.System.Manufacturer. Chassis rules do not add these Profiles. To migrate, rename the Profile
to hw-dmi-<key>, or keep the existing name by setting Profile: on the rule.