MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / NormalizeInventorySource

Function NormalizeInventorySource

internal/plugins/ansible/inventory.go:313–322  ·  view source on GitHub ↗

NormalizeInventorySource validates and canonicalizes an inventory source.

(source string)

Source from the content-addressed store, hash-verified

311
312// NormalizeInventorySource validates and canonicalizes an inventory source.
313func 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.
325func NormalizeInventoryFormat(format string) string {

Callers 2

writeTempInventoryResultFunction · 0.85

Calls

no outgoing calls

Tested by 1