Description of problem: The cachemanagement API is hardcoded to use v1: https://github.com/openstack/glance/blob/master/glance/api/middleware/cache_manage.py#L36 whereas if the v2 API is enabled, but not v1, this is problematic as clients would want to use v2 across the board. Steps to Reproduce: 1. Install Glance 2. Disable v1 in *-paste.ini files 3. Call any url related to the cache middleware. Actual results: $ curl -H "X-Auth-Token: $tok" http://10.130.50.34:9292/v1/cached_images | python -m json.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 119 100 119 0 0 25142 0 --:--:-- --:--:-- --:--:-- 29750 { "versions": [ { "id": "v2.0", "links": [ { "href": "http://10.130.50.34:9292/v2/", "rel": "self" } ], "status": "CURRENT" } ] } Expected results: It should return the list of cached_images (if cache is enabled)
John, why isn't this a duplicate of multi-locations?
(In reply to Ayal Baron from comment #3) > John, why isn't this a duplicate of multi-locations? Ayal, That is an interesting question and one that I have pushed on upstream. Idealling a cached location would be 'just another location' in the list of locations. However the way that glance was architected leaves this quite futuristic. In the short term the cache will have to continue sit on top.
There are many changes happening in Glance's API versioning and that includes glance-cache. I'm going to close this as UPSTREAM and recommend tracking it there.