(operationType string, state string, isUserProvidedService bool)
| 152 | } |
| 153 | |
| 154 | func InstanceStateToStatus(operationType string, state string, isUserProvidedService bool) string { |
| 155 | if isUserProvidedService { |
| 156 | return "" |
| 157 | } |
| 158 | |
| 159 | switch state { |
| 160 | case "in progress": |
| 161 | return T("{{.OperationType}} in progress", map[string]interface{}{"OperationType": operationType}) |
| 162 | case "failed": |
| 163 | return T("{{.OperationType}} failed", map[string]interface{}{"OperationType": operationType}) |
| 164 | case "succeeded": |
| 165 | return T("{{.OperationType}} succeeded", map[string]interface{}{"OperationType": operationType}) |
| 166 | default: |
| 167 | return "" |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | func (cmd *ShowService) populatePluginModel(serviceInstance models.ServiceInstance) { |
| 172 | cmd.pluginModel.Name = serviceInstance.Name |
no outgoing calls
no test coverage detected