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

Method displaySharingInfo

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

Source from the content-addressed store, hash-verified

151}
152
153func (cmd ServiceCommand) displaySharingInfo(serviceInstanceWithDetails v7action.ServiceInstanceDetails) {
154 cmd.UI.DisplayText("Showing sharing info:")
155
156 if serviceInstanceWithDetails.SharedStatus.IsSharedFromOriginalSpace {
157 cmd.UI.DisplayTextWithFlavor(indent+"This service instance is shared from space {{.Space}} of org {{.Org}}.", map[string]interface{}{
158 "Space": serviceInstanceWithDetails.SpaceName,
159 "Org": serviceInstanceWithDetails.OrganizationName,
160 })
161 cmd.UI.DisplayNewline()
162 return
163 }
164
165 if serviceInstanceWithDetails.SharedStatus.IsSharedToOtherSpaces {
166 cmd.UI.DisplayText(indent + "Shared with spaces:")
167 cmd.displaySharedTo(serviceInstanceWithDetails)
168 cmd.UI.DisplayNewline()
169 } else {
170 cmd.UI.DisplayText(indent + "This service instance is not currently being shared.")
171 cmd.UI.DisplayNewline()
172 }
173
174 if serviceInstanceWithDetails.SharedStatus.FeatureFlagIsDisabled || serviceInstanceWithDetails.SharedStatus.OfferingDisablesSharing {
175 if serviceInstanceWithDetails.SharedStatus.FeatureFlagIsDisabled {
176 cmd.UI.DisplayText(indent + `The "service_instance_sharing" feature flag is disabled for this Cloud Foundry platform.`)
177 }
178
179 if serviceInstanceWithDetails.SharedStatus.OfferingDisablesSharing {
180 cmd.UI.DisplayText(indent + "Service instance sharing is disabled for this service offering.")
181 }
182 cmd.UI.DisplayNewline()
183 }
184}
185
186func (cmd ServiceCommand) displayLastOperation(serviceInstanceWithDetails v7action.ServiceInstanceDetails) {
187 cmd.UI.DisplayText("Showing status of last operation:")

Callers 1

Calls 4

displaySharedToMethod · 0.95
DisplayTextMethod · 0.65
DisplayTextWithFlavorMethod · 0.65
DisplayNewlineMethod · 0.65

Tested by

no test coverage detected