[openstack-dev] Ugly Hack to deal with multiple versions

Christopher Yeoh cbkyeoh at gmail.com
Mon Feb 3 23:40:55 UTC 2014


On Tue, Feb 4, 2014 at 6:20 AM, Adam Young <ayoung at redhat.com> wrote:

> We have to support old clients.
> Old clients expect that the URL that comes back for the service catalog
> has the version in it.
> Old clients don't do version negotiation.
>
> Thus, we need an approach to not-break old clients while we politely
> encourage the rest of the world to move to later APIs.
>
>
> I know Keystone has this problem.  I've heard that some of the other
> services do as well.  Here is what I propose.  It is ugly, but it is a
> transition plan, and can be disabled once the old clients are deprecated:
>
> HACK:  In a new client, look at the URL.  If it ends with /v2.0, chop it
> off and us the substring up to that point.
>
>
+1 to this. I agree its ugly, but I think its the least-worst solution.
Nova certainly has this problem with the url including the version suffix
in the service catalog.

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140204/f364765b/attachment.html>


More information about the OpenStack-dev mailing list