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

Function printInstallResult

internal/cli/community_scripts.go:415–432  ·  view source on GitHub ↗
(cmd *cobra.Command, out communityScriptInstallOutput)

Source from the content-addressed store, hash-verified

413}
414
415func printInstallResult(cmd *cobra.Command, out communityScriptInstallOutput) error {
416 if getOutputFormat(cmd) == outputTable {
417 printTable([]string{"FIELD", "VALUE"}, [][]string{
418 {"Node", out.Node},
419 {"Host", out.Host},
420 {"SSH User", out.SSHUser},
421 {"Script", out.Script.Slug},
422 {"Non-interactive", fmt.Sprintf("%t", out.NonInteractive)},
423 {"Overrides", formatCommunityScriptEnv(out.Env)},
424 {"Created Guests", formatGuestOutputs(out.CreatedGuests)},
425 {"Warnings", strings.Join(out.Warnings, "; ")},
426 {"Exit Code", fmt.Sprintf("%d", out.ExitCode)},
427 })
428 return nil
429 }
430
431 return printJSON(out)
432}
433
434func printCommunityScriptPlanTable(plan communityScriptPlanOutput) {
435 printTable([]string{"FIELD", "VALUE"}, [][]string{

Callers 1

Calls 5

getOutputFormatFunction · 0.85
printTableFunction · 0.85
formatCommunityScriptEnvFunction · 0.85
formatGuestOutputsFunction · 0.85
printJSONFunction · 0.85

Tested by

no test coverage detected