From dbf003ac6f39279cf1685d82b70d50a798d8b445 Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Thu, 27 Nov 2014 07:20:12 +0800 Subject: [PATCH] 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 --- ceilometerclient/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ceilometerclient/client.py b/ceilometerclient/client.py index 8762a980..620fe54b 100644 --- a/ceilometerclient/client.py +++ b/ceilometerclient/client.py @@ -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