MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / getWorkerPoolAsJson

Function getWorkerPoolAsJson

pkg/cmd/workerpool/view/view.go:94–106  ·  view source on GitHub ↗
(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool)

Source from the content-addressed store, hash-verified

92}
93
94func getWorkerPoolAsJson(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool) WorkerPoolAsJson {
95 workers, _ := getWorkers(opts, workerPool)
96 workerStats := calculateWorkerStats(workers)
97
98 return WorkerPoolAsJson{
99 Id: workerPool.GetID(),
100 Name: workerPool.GetName(),
101 WorkerPoolType: string(workerPool.GetWorkerPoolType()),
102 IsDefault: workerPool.GetIsDefault(),
103 Workers: workerStats,
104 WebUrl: util.GenerateWebURL(opts.Host, workerPool.GetSpaceID(), fmt.Sprintf("infrastructure/workerpools/%s", workerPool.GetID())),
105 }
106}
107
108func getWorkerPoolAsTableRow(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool) []string {
109 workers, _ := getWorkers(opts, workerPool)

Callers 1

ViewRunFunction · 0.85

Calls 4

GenerateWebURLFunction · 0.92
getWorkersFunction · 0.85
calculateWorkerStatsFunction · 0.85
GetNameMethod · 0.65

Tested by

no test coverage detected