[openstack-dev] Does it make sense to have self links to things that don't exist?

Matt Riedemann mriedem at linux.vnet.ibm.com
Thu Oct 20 20:24:37 UTC 2016


I reported this bug against glance for the /v2 links being wrong in the 
version discovery list:

https://bugs.launchpad.net/glance/+bug/1632742

It was closed basically saying yes the link doesn't exist (not 
implemented for glance v2), but there was no guarantee it would exist, 
so meh.

Reading:

http://developer.openstack.org/api-guide/compute/links_and_references.html

"For convenience, resources contain links to themselves. This allows a 
client to easily obtain rather than construct resource URIs. The 
following types of link relations are associated with resources:

     - A self link contains a versioned link to the resource. Use these 
links when the link is followed immediately."

It's not convenient, IMO, to provide a link to something that doesn't 
exist. That's just frustrating from the API user point of view.

So is this fine?

Should it be implemented?

Or should the docs say, the link might not exist?

Or should the link to the non-existent handler just be removed?

-- 

Thanks,

Matt Riedemann




More information about the OpenStack-dev mailing list