Skip to content

Commit

Permalink
Merge pull request #14 from bmc-toolbox/component-types
Browse files Browse the repository at this point in the history
ComponentTypes() returns the list of supported component types
  • Loading branch information
joelrebel authored Apr 26, 2024
2 parents a56a09c + 01bb4ba commit c9882db
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 c9882db

Please sign in to comment.