(serviceInstance resources.ServiceInstance, newServicePlanGUID string, params UpdateManagedServiceInstanceParams)
| 332 | } |
| 333 | |
| 334 | func (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 | |
| 352 | func assertServiceInstanceType(requiredType resources.ServiceInstanceType, instance resources.ServiceInstance) error { |
| 353 | if instance.Type != requiredType { |
no test coverage detected