(appGUID string, withObfuscatedValues bool)
| 73 | } |
| 74 | |
| 75 | func (actor Actor) getProcessSummariesForApp(appGUID string, withObfuscatedValues bool) (ProcessSummaries, Warnings, error) { |
| 76 | log.WithFields(log.Fields{ |
| 77 | "appGUID": appGUID, |
| 78 | "withObfuscatedValues": withObfuscatedValues, |
| 79 | }).Info("retrieving process information") |
| 80 | |
| 81 | ccv3Processes, warnings, err := actor.CloudControllerClient.GetApplicationProcesses(appGUID) |
| 82 | allWarnings := Warnings(warnings) |
| 83 | if err != nil { |
| 84 | return nil, allWarnings, err |
| 85 | } |
| 86 | |
| 87 | var processSummaries ProcessSummaries |
| 88 | for _, ccv3Process := range ccv3Processes { |
| 89 | process := resources.Process(ccv3Process) |
| 90 | if withObfuscatedValues { |
| 91 | fullProcess, warnings, err := actor.GetProcess(ccv3Process.GUID) |
| 92 | allWarnings = append(allWarnings, warnings...) |
| 93 | if err != nil { |
| 94 | return nil, allWarnings, err |
| 95 | } |
| 96 | process = fullProcess |
| 97 | } |
| 98 | |
| 99 | processSummary, warnings, err := actor.getProcessSummary(process) |
| 100 | allWarnings = append(allWarnings, warnings...) |
| 101 | if err != nil { |
| 102 | return nil, allWarnings, err |
| 103 | } |
| 104 | |
| 105 | processSummaries = append(processSummaries, processSummary) |
| 106 | } |
| 107 | processSummaries.Sort() |
| 108 | |
| 109 | return processSummaries, allWarnings, nil |
| 110 | } |
| 111 | |
| 112 | func (actor Actor) getProcessSummary(process resources.Process) (ProcessSummary, Warnings, error) { |
| 113 | sidecars, warnings, err := actor.CloudControllerClient.GetProcessSidecars(process.GUID) |
no test coverage detected