>        CreateServerOptions options = new CreateServerOptions();
> -      ServerCreated server = serverApi.create(hostName, 
> imageIdForZone(regionId), flavorRefForZone(regionId), options);
> +      if (availabilityZoneId != null) {
> +          options = options.availabilityZone(availabilityZoneId);
> +      }

I don't understand. This is a unit test. Ummmmm....are you suggesting we unit 
test a unit test?

Also, treating the availabilityZoneId like this is just a refactoring from the 
way it was previously done. There were two methods that were exactly the same 
except for availabilityZoneId so I just refactored them into one method. And 
there's less duplicate code now (at the expense of adding the condition above). 
If the refactoring is a problem, I can just split it out into two methods again.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/355/files#r12109107

Reply via email to