diff --git a/constants.go b/constants.go index 572df70..443aeb8 100644 --- a/constants.go +++ b/constants.go @@ -27,6 +27,8 @@ const ( // Generic component slugs // Slugs are set on Device types to identify the type of component + // + // note: Enlist any new component types in the method further below. SlugBackplaneExpander = "Backplane-Expander" SlugChassis = "Chassis" SlugTPM = "TPM" @@ -64,6 +66,33 @@ const ( SlugRAIDImplHardware = "hardware" ) +func ComponentTypes() []string { + return []string{ + SlugBackplaneExpander, + SlugChassis, + SlugTPM, + SlugGPU, + SlugCPU, + SlugPhysicalMem, + SlugStorageController, + SlugStorageControllers, + SlugBMC, + SlugBIOS, + SlugDrive, + SlugDrives, + SlugDriveTypePCIeNVMEeSSD, + SlugDriveTypeSATASSD, + SlugDriveTypeSATAHDD, + SlugNIC, + SlugNICs, + SlugPSU, + SlugPSUs, + SlugCPLD, + SlugEnclosure, + SlugMainboard, + } +} + // FormatVendorName compares the given strings to identify and returned a known // vendor name. When a match is not found, the string is returned as is. //