NormalizeInventorySource validates and canonicalizes an inventory source.
(source string)
| 311 | |
| 312 | // NormalizeInventorySource validates and canonicalizes an inventory source. |
| 313 | func NormalizeInventorySource(source string) string { |
| 314 | switch strings.ToLower(strings.TrimSpace(source)) { |
| 315 | case InventorySourceProxmox: |
| 316 | return InventorySourceProxmox |
| 317 | case InventorySourcePvetui: |
| 318 | return InventorySourcePvetui |
| 319 | default: |
| 320 | return InventorySourcePvetui |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | // NormalizeInventoryFormat validates and canonicalizes inventory format. |
| 325 | func NormalizeInventoryFormat(format string) string { |
no outgoing calls