> + HostedServiceGetDetailedResponse serviceResponse =
> client.getHostedServiceApi().getHostedServiceWithDeployments(hostedService.getServiceName());
> + if (!serviceResponse.getDeployments().isEmpty()) {
> + HostedServiceGetDetailedResponse.Deployment deployment =
> serviceResponse.getDeployments().get(0);
> + for (Role role : deployment.getRoles()) {
> + VirtualMachine virtualMachine =
> serviceResponseToVirtualMachine.apply(serviceResponse);
> + virtualMachine.setRole(role);
> + virtualMachines.add(virtualMachine);
> + }
> + }
> +// addDeploymentIfExists(deployments,
> hostedService.getServiceName(), DeploymentSlot.Staging);
> +// addDeploymentIfExists(deployments,
> hostedService.getServiceName(), DeploymentSlot.Production);
> + }
> + return virtualMachines;
> + }
> +
> + private void addDeploymentIfExists(List<VirtualMachine> virtualMachines,
> String serviceName, DeploymentSlot deploymentSlot) {
Remove if unused.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/132/files#r24749254