Skip to content

Commit

Permalink
Merge pull request #10 from bmc-toolbox/productnames
Browse files Browse the repository at this point in the history
Update method formatting product names
  • Loading branch information
joelrebel authored Jul 17, 2023
2 parents 93ff001 + bf79704 commit 5eb9915
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,30 @@ func VendorFromString(s string) string {
}

// Return a normalized product name given a product name
//
// nolint:gocyclo // This list is expected to be long.
func FormatProductName(s string) string {
switch s {
case "PowerEdge R6515":
return "r6515"
case "PowerEdge R640":
return "r640"
case "PowerEdge R6415":
return "r6415"
case "PowerEdge R750":
return "r750"
case "PowerEdge C6320":
return "c6320"
case "SYS-5019C-MR-PH004", "SYS-5019C-MR":
return "x11scm-f"
case "SYS-5039MS-H12TRF":
return "x11sse-f"
case "SYS-510T-MR-EI018", "SYS-510T-MR1-EI018":
return "x12sth-sys"
case "SSG-6029P-E1CR12L-PH004":
return "x11dph-t"
case "SSG-110P-NTR10", "SSG-110P-NTR10-EI018":
return "x12spo-ntf"
default:
return s
}
Expand Down

0 comments on commit 5eb9915

Please sign in to comment.