private List<CloudServiceBinding> getServiceBindings(CloudControllerClient client, CloudServiceExtended service) { CloudServiceInstance serviceInstance = client.getServiceInstance(service.getName()); return serviceInstance.getBindings(); }
private List<CloudServiceBinding> getServiceBindings(CloudControllerClient client, CloudServiceExtended service) { CloudServiceInstance serviceInstance = client.getServiceInstance(service.getName()); return serviceInstance.getBindings(); }
private Map<String, ServiceOperationType> deleteServices(CloudControllerClient client, List<String> serviceNames) { Map<String, ServiceOperationType> triggeredServiceOperations = new HashMap<>(); for (String serviceName : serviceNames) { try { prepareServicesToDelete(client, serviceName); deleteService(client, serviceName); triggeredServiceOperations.put(serviceName, ServiceOperationType.DELETE); } catch (CloudOperationException | CloudException e) { processException(e, client.getServiceInstance(serviceName), serviceName); } } return triggeredServiceOperations; }
private Map<String, ServiceOperationType> deleteServices(CloudControllerClient client, List<String> serviceNames) { Map<String, ServiceOperationType> triggeredServiceOperations = new HashMap<>(); for (String serviceName : serviceNames) { try { prepareServicesToDelete(client, serviceName); deleteService(client, serviceName); triggeredServiceOperations.put(serviceName, ServiceOperationType.DELETE); } catch (CloudOperationException | CloudException e) { processException(e, client.getServiceInstance(serviceName), serviceName); } } return triggeredServiceOperations; }
private void unbindService(CloudControllerClient client, String serviceName) { CloudServiceInstance serviceInstance = client.getServiceInstance(serviceName); List<CloudServiceBinding> bindings = serviceInstance.getBindings(); if (bindings.isEmpty()) { return; } logBindings(bindings); for (CloudServiceBinding binding : bindings) { CloudApplication application = StepsUtil.getBoundApplication(client.getApplications(), binding.getAppGuid()); getStepLogger().info(Messages.UNBINDING_APP_FROM_SERVICE, application.getName(), serviceName); client.unbindService(application.getName(), serviceName); } }
private void unbindService(CloudControllerClient client, String serviceName) { CloudServiceInstance serviceInstance = client.getServiceInstance(serviceName); List<CloudServiceBinding> bindings = serviceInstance.getBindings(); if (bindings.isEmpty()) { return; } logBindings(bindings); for (CloudServiceBinding binding : bindings) { CloudApplication application = StepsUtil.getBoundApplication(client.getApplications(), binding.getAppGuid()); getStepLogger().info(Messages.UNBINDING_APP_FROM_SERVICE, application.getName(), serviceName); client.unbindService(application.getName(), serviceName); } }
continue; List<CloudServiceBinding> existingServiceBindings = client.getServiceInstance(serviceName) .getBindings(); CloudServiceBinding existingBindingForApplication = getServiceBindingsForApplication(existingApp, existingServiceBindings);
continue; List<CloudServiceBinding> existingServiceBindings = client.getServiceInstance(serviceName) .getBindings(); CloudServiceBinding existingBindingForApplication = getServiceBindingsForApplication(existingApp, existingServiceBindings);
CloudServiceInstance existingServiceInstance = client.getServiceInstance(service.getName(), false); if (existingServiceInstance != null && shouldUpdateCredentials(service, existingServiceInstance.getCredentials())) { getStepLogger().debug("Service parameters should be updated");
CloudServiceInstance existingServiceInstance = client.getServiceInstance(service.getName(), false); if (existingServiceInstance != null && shouldUpdateCredentials(service, existingServiceInstance.getCredentials())) { getStepLogger().debug("Service parameters should be updated");