Comment 1 for bug 1377080

Revision history for this message
Alexander Makarov (amakarov) wrote :

Here is the case reproduced on a cloud deployed by devstack:

CLI commands:

$ export OS_USERNAME=admin
$ export OS_PASSWORD=qwe123
$ export OS_TENANT_NAME=admin
$ export OS_AUTH_URL=http://localhost:5000/v2.0

$ keystone service-create --name=nova --type=compute --description="Second Openstack Compute Service";
$ keystone endpoint-create --region RegionTwo --service-id=73be0c7f663e4823bb93600dc71a3b23 --publicurl='http://172.16.0.30:9292' --internalurl='http://192.168.0.194:9292' --adminurl='http://192.168.0.194:9292'

Python code:

import keystoneclient.v3.client as ksclient

client = ksclient.Client(
            endpoint="http://172.18.10.122:5000/v3")

client.authenticate(
    auth_url="http://172.18.10.122:5000/v3",
    username="admin",
    password="qwe123",
    tenant_name="admin")

heat_url = client.service_catalog.url_for(
    service_type='compute',
    region_name="RegionOne",
    endpoint_type='publicURL')

print heat_url

And the output:

Traceback (most recent call last):
  File "/home/alexander/PycharmProjects/python-keystoneclient/triage.py", line 17, in <module>
    endpoint_type='publicURL')
  File "/home/alexander/PycharmProjects/python-keystoneclient/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/home/alexander/PycharmProjects/python-keystoneclient/keystoneclient/service_catalog.py", line 232, in url_for
    raise exceptions.EndpointNotFound(msg)
keystoneclient.openstack.common.apiclient.exceptions.EndpointNotFound: publicURL endpoint for compute service in RegionOne region not found