Here is one sample keystone default_catalog.templates which defines some services. In fact I think for SQL, we need use keystone client to add them into SQL DB.


# config for TemplatedCatalog, using camelCase because I don't want to do
# translations for keystone compat
catalog.RegionOne.identity.publicURL = http://controlnode:$(public_port)s/v2.0
catalog.RegionOne.identity.adminURL = http://controlnode:$(admin_port)s/v2.0
catalog.RegionOne.identity.internalURL = http://controlnode:$(public_port)s/v2.0
catalog.RegionOne.identity.name = Identity Service

# fake compute service for now to help novaclient tests work
catalog.RegionOne.compute.publicURL = http://controlnode:$(compute_port)s/v1.1/$(tenant_id)s
catalog.RegionOne.compute.adminURL = http://controlnode:$(compute_port)s/v1.1/$(tenant_id)s
catalog.RegionOne.compute.internalURL = http://controlnode:$(compute_port)s/v1.1/$(tenant_id)s
catalog.RegionOne.compute.name = Compute Service

catalog.RegionOne.volume.publicURL = http://controlnode:8776/v1/$(tenant_id)s
catalog.RegionOne.volume.adminURL = http://controlnode:8776/v1/$(tenant_id)s
catalog.RegionOne.volume.internalURL = http://controlnode:8776/v1/$(tenant_id)s
catalog.RegionOne.volume.name = Volume Service

catalog.RegionOne.ec2.publicURL = http://controlnode:8773/services/Cloud
catalog.RegionOne.ec2.adminURL = http://controlnode:8773/services/Admin
catalog.RegionOne.ec2.internalURL = http://controlnode:8773/services/Cloud
catalog.RegionOne.ec2.name = EC2 Service

catalog.RegionOne.image.publicURL = http://controlnode:9292/v1
catalog.RegionOne.image.adminURL = http://controlnode:9292/v1
catalog.RegionOne.image.internalURL = http://controlnode:9292/v1
catalog.RegionOne.image.name = Image Service

-----openstack-bounces+gongysh=cn.ibm....@lists.launchpad.net wrote: -----

To: Pete Zaitcev <zait...@redhat.com>
From: Anne Gentle <a...@openstack.org>
Sent by: openstack-bounces+gongysh=cn.ibm....@lists.launchpad.net
Date: 04/13/2012 12:33PM
Cc: Openstack Mail List <openstack@lists.launchpad.net>
Subject: Re: [Openstack] Endpoints problems

Thanks all!

And thanks for not saying "It's a Python Thing You Wouldn't Understand." :)

Yeah I do want a definitive answer but it's always good for me to learn to read code.

Then again, things like replace('$(', '%(') make me go hmm...

One last clarification, this $(tenant_id)s should be used for both nova and volume endpoints, right?

Thanks,

Anne


On Thu, Apr 12, 2012 at 5:44 PM, Pete Zaitcev <zait...@redhat.com> wrote:
On Thu, 12 Apr 2012 15:28:21 -0500
Anne Gentle <a...@openstack.org> 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.

-- Pete

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to