← Back to team overview

openstack team mailing list archive

Re: Endpoints problems

 

So looking at the code.. both templated and sql backends seem to support the variable substitution.

And if i am reading the code correctly they support both of the following variable declarations:

%(tennant_id)s
$(tennant_id)s

since it appears the code replaces "$(" with "%("

--shep
On Apr 12, 2012, at 9:33 PM, Lorin Hochstein wrote:


On Apr 12, 2012, at 6:44 PM, Pete Zaitcev wrote:

On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <anne@xxxxxxxxxxxxx<mailto:anne@xxxxxxxxxxxxx>> wrote:

keystone --token 012345SECRET99TOKEN012345 --endpoint
http://192.168.206.130:35357/v2.0 endpoint-create \
[....]
                      --internalurl
http://192.168.206.130:8774/v2/$(tenant_id)s

I haven't fixed this yet because I'm not sure if the $(tenant_id)s is
literal or which tenant_id specifically to use (the Service tenant for the
adminurl possibly)?

The expression "$(tenant_id)s" is really contained inside the pattern
in the database. It is substituded with a specific tennant ID when
an application makes its request. The weird syntax is inherited from
Python, where one can use constructs like %s or %(key)s.

My understanding (based on somebody's previous answer in the mailing list, or possibly one of the IRC channels) was that you could only do this with the template backend, and when you were using the database backend you had to explicitly add endpoints for each tenant that needed to talk to the API.

Can you confirm that you can use the $(tenant_id)s syntax when the backend is set using the following keystone.conf entry:

[catalog]
driver = keystone.catalog.backends.sql.Catalog


Take care,

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com<https://www.nimbisservices.com/>




_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Follow ups

References