MCPcopy Index your code
hub / github.com/cloudfoundry/cli / updateManagedServiceInstance

Method updateManagedServiceInstance

actor/v7action/service_instance.go:334–350  ·  view source on GitHub ↗
(serviceInstance resources.ServiceInstance, newServicePlanGUID string, params UpdateManagedServiceInstanceParams)

Source from the content-addressed store, hash-verified

332}
333
334func (actor Actor) updateManagedServiceInstance(serviceInstance resources.ServiceInstance, newServicePlanGUID string, params UpdateManagedServiceInstanceParams) (ccv3.JobURL, ccv3.Warnings, error) {
335 if newServicePlanGUID == serviceInstance.ServicePlanGUID {
336 newServicePlanGUID = ""
337 }
338
339 update := resources.ServiceInstance{
340 ServicePlanGUID: newServicePlanGUID,
341 Tags: params.Tags,
342 Parameters: params.Parameters,
343 }
344
345 if update.ServicePlanGUID == "" && !update.Tags.IsSet && !update.Parameters.IsSet {
346 return "", nil, actionerror.ServiceInstanceUpdateIsNoop{}
347 }
348
349 return actor.CloudControllerClient.UpdateServiceInstance(serviceInstance.GUID, update)
350}
351
352func assertServiceInstanceType(requiredType resources.ServiceInstanceType, instance resources.ServiceInstance) error {
353 if instance.Type != requiredType {

Callers 1

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 1

UpdateServiceInstanceMethod · 0.65

Tested by

no test coverage detected