Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComponentTypes() returns the list of supported component types #14

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading