[openstack-dev] [neutron] How to look up a project name from Neutron server code?

Neil Jerram neil at tigera.io
Tue Jul 17 07:36:56 UTC 2018


Can someone help me with how to look up a project name (aka tenant name)
for a known project/tenant ID, from code (specifically a mechanism driver)
running in the Neutron server?

I believe that means I need to make a GET REST call as here:
https://developer.openstack.org/api-ref/identity/v3/index.html#projects.
But I don't yet understand how a piece of Neutron server code can ensure
that it has the right credentials to do that.  If someone happens to have
actual code for doing this, I'm sure that would be very helpful.

(I'm aware that whenever the Neutron server processes an API request, the
project name for the project that generated that request is added into the
request context.  That is great when my code is running in an API request
context.  But there are other times when the code isn't in a request
context and still needs to map from a project ID to project name; hence the
question here.)

Many thanks,
     Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180717/c87a0bee/attachment.html>


More information about the OpenStack-dev mailing list