[openstack-dev] [Nova] Questions on glance alternative link
Chen CH Ji
jichenjc at cn.ibm.com
Thu Oct 9 09:24:24 UTC 2014
Hi
in nova/api/openstack/compute/views/images.py, there is a
function returns alternate links which contains project_id
However, I didn't see any info in glance API V2 spec
Can any one help me on :
1) what's the purpose of alternate link? can I remove the project_id? maybe
backward compatible issue?
2) if #1 's answer is negative, should we add a image api under nova/image/
to also generate a link with project_id?
Thanks
def _get_alternate_link(self, request, identifier):
"""Create an alternate link for a specific image id."""
glance_url = glance.generate_glance_url()
glance_url = self._update_glance_link_prefix(glance_url)
return '/'.join([glance_url,
request.environ["nova.context"].project_id, <---
this is the line which add project_id
self._collection_name,
str(identifier)])
Best Regards!
Kevin (Chen) Ji 纪 晨
Engineer, zVM Development, CSTL
Notes: Chen CH Ji/China/IBM at IBMCN Internet: jichenjc at cn.ibm.com
Phone: +86-10-82454158
Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian District,
Beijing 100193, PRC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141009/4e61991d/attachment.html>
More information about the OpenStack-dev
mailing list