The error handler approach is OK.

Regarding the cache, the `apply` method will be actually called every time you 
call the `getExtensionApiForZone` method, so the cache might help saving some 
requests.

The `ZoneToEndpoint` already uses a cache. The supplier it delegates to is 
cached (and configured 
[here](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/location/config/LocationModule.java#L174-L182)).
 In this case, you could declare the cache in the 
[GlanceHttpApiModule](https://github.com/jclouds/jclouds-labs-openstack/blob/master/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/config/GlanceHttpApiModule.java).

Sounds good?

Nice job, btw! Next is to properly update the unit tests. As you'll see, the 
existing "expect" unit tests define a set of `request/response` pairs. They 
have to be modified to include this "version negotiation" in the request flow, 
in the form of a mocked request/response pair.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/82#issuecomment-37755874

Reply via email to