MCPcopy
hub / github.com/cloudfoundry/cli / InstanceStateToStatus

Function InstanceStateToStatus

cf/commands/service/service.go:154–169  ·  view source on GitHub ↗
(operationType string, state string, isUserProvidedService bool)

Source from the content-addressed store, hash-verified

152}
153
154func 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
171func (cmd *ShowService) populatePluginModel(serviceInstance models.ServiceInstance) {
172 cmd.pluginModel.Name = serviceInstance.Name

Callers 3

service_test.goFile · 0.92
ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected