Skip to content

Commit

Permalink
ComponentTypes() returns the list of supported component types
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed Apr 23, 2024
1 parent a56a09c commit 01bb4ba
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.
//
Expand Down

0 comments on commit 01bb4ba

Please sign in to comment.