> @@ -56,6 +58,9 @@ public void setup() {
>        super.setup();
>        zone = Iterables.getLast(api.getConfiguredZones(), "nova");
>        volumeOption = api.getVolumeExtensionForZone(zone);
> +
> +      Optional<? extends AvailabilityZoneAPI> availabilityZoneApi = 
> api.getAvailabilityZoneApi(zone);
> +      availabilityZone = availabilityZoneApi.isPresent() ? 
> Iterables.getLast(availabilityZoneApi.get().list()).getName() : zone;

No assumptions about number of availability zones, for instance HP Cloud has 
az1, az2, and az3.  The getLast() is used everywhere in openstack extensions 
live tests so this is just keeping it consistent. I saw a code comment 
somewhere that Adrian was using this convention to avoid using a default AZ 
which is usually the first I suppose.  

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

Reply via email to