Support os-endpoint-type

Ceilometerclient will always get publicURL even though we specify
endpoint type via arguments, it is because we call kesytone session
with wrong keyword argument, which should be interface rather than
endpoint_type.

see: https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/auth/identity/base.py

Change-Id: Ic2b03bd900d913c7efd22c9b91dfaa79e0cdd4bc
Closes-Bug: #1396493
This commit is contained in:
ZhiQiang Fan
2014-11-27 07:20:12 +08:00
parent d8c15a967b
commit dbf003ac6f

View File

@@ -133,7 +133,7 @@ def _get_endpoint(ks_session, **kwargs):
service_type = kwargs.get('service_type') or 'metering'
endpoint = ks_session.get_endpoint(service_type=service_type,
endpoint_type=endpoint_type,
interface=endpoint_type,
region_name=kwargs.get('region_name'))
return endpoint
@@ -174,7 +174,8 @@ class AuthPlugin(auth.BaseAuthPlugin):
'cacert': self.opts.get('cacert'),
'cert': self.opts.get('cert'),
'key': self.opts.get('key'),
'insecure': self.opts.get('insecure')
'insecure': self.opts.get('insecure'),
'endpoint_type': self.opts.get('endpoint_type'),
}
# retrieve session