Skip to content

Commit 01bb4ba

Browse files
committed
ComponentTypes() returns the list of supported component types
1 parent a56a09c commit 01bb4ba

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

constants.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const (
2727

2828
// Generic component slugs
2929
// Slugs are set on Device types to identify the type of component
30+
//
31+
// note: Enlist any new component types in the method further below.
3032
SlugBackplaneExpander = "Backplane-Expander"
3133
SlugChassis = "Chassis"
3234
SlugTPM = "TPM"
@@ -64,6 +66,33 @@ const (
6466
SlugRAIDImplHardware = "hardware"
6567
)
6668

69+
func ComponentTypes() []string {
70+
return []string{
71+
SlugBackplaneExpander,
72+
SlugChassis,
73+
SlugTPM,
74+
SlugGPU,
75+
SlugCPU,
76+
SlugPhysicalMem,
77+
SlugStorageController,
78+
SlugStorageControllers,
79+
SlugBMC,
80+
SlugBIOS,
81+
SlugDrive,
82+
SlugDrives,
83+
SlugDriveTypePCIeNVMEeSSD,
84+
SlugDriveTypeSATASSD,
85+
SlugDriveTypeSATAHDD,
86+
SlugNIC,
87+
SlugNICs,
88+
SlugPSU,
89+
SlugPSUs,
90+
SlugCPLD,
91+
SlugEnclosure,
92+
SlugMainboard,
93+
}
94+
}
95+
6796
// FormatVendorName compares the given strings to identify and returned a known
6897
// vendor name. When a match is not found, the string is returned as is.
6998
//

0 commit comments

Comments
 (0)