| 70 | } |
| 71 | |
| 72 | func (a *action) executeInSession(operationID string, mtaClient mtaclient.MtaClientOperations) ExecutionStatus { |
| 73 | if a.verbosityLevel == VerbosityLevelVERBOSE { |
| 74 | ui.Say("Executing action %q on operation %s...", a.actionID, terminal.EntityNameColor(operationID)) |
| 75 | } |
| 76 | _, err := mtaClient.ExecuteAction(operationID, a.actionID) |
| 77 | if err != nil { |
| 78 | ui.Failed("Could not execute action %q on operation %s: %s", a.actionID, terminal.EntityNameColor(operationID), err) |
| 79 | return Failure |
| 80 | } |
| 81 | if a.verbosityLevel == VerbosityLevelVERBOSE { |
| 82 | ui.Ok() |
| 83 | } |
| 84 | return Success |
| 85 | } |
| 86 | |
| 87 | type monitoringAction struct { |
| 88 | action |