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

Method displayUpgrades

command/v7/service_command.go:205–225  ·  view source on GitHub ↗
(serviceInstanceWithDetails v7action.ServiceInstanceDetails)

Source from the content-addressed store, hash-verified

203}
204
205func (cmd ServiceCommand) displayUpgrades(serviceInstanceWithDetails v7action.ServiceInstanceDetails) {
206 cmd.UI.DisplayText("Showing upgrade status:")
207
208 switch serviceInstanceWithDetails.UpgradeStatus.State {
209 case v7action.ServiceInstanceUpgradeAvailable:
210 cmd.UI.DisplayText(indent + "There is an upgrade available for this service.")
211 cmd.UI.DisplayNewline()
212 cmd.UI.DisplayText(indent+"Upgrade description: {{.Description}}", map[string]interface{}{
213 "Description": serviceInstanceWithDetails.UpgradeStatus.Description,
214 })
215 cmd.UI.DisplayText(indent+"TIP: You can upgrade using 'cf upgrade-service {{.InstanceName}}'", map[string]interface{}{
216 "InstanceName": serviceInstanceWithDetails.Name,
217 })
218 case v7action.ServiceInstanceUpgradeNotAvailable:
219 cmd.UI.DisplayText(indent + "There is no upgrade available for this service.")
220 default:
221 cmd.UI.DisplayText(indent + "Upgrades are not supported by this broker.")
222 }
223
224 cmd.UI.DisplayNewline()
225}
226
227func (cmd ServiceCommand) displaySharedTo(serviceInstanceWithDetails v7action.ServiceInstanceDetails) {
228 table := [][]string{{"org", "space", "bindings"}}

Callers 1

Calls 2

DisplayTextMethod · 0.65
DisplayNewlineMethod · 0.65

Tested by

no test coverage detected