Fix the ceilometerlient log curl request incorrectly

Have installed ceilometer on Ubuntu 12.04 (LTS) and added the keystone endpoint
with the url (publicurl,internalurl and
adminurl)like:http://192.168.83.7:8777/refer to the "OpenStack
Installation Guide for Ubuntu 12.04 (LTS)". When using  "ceilometer
--debug meter-list",the ceilometerclient log
request url with a double slash after 8777.

Change-Id: I467704b1fe1d38fe0f0e928bd6f6efe3d8925845
Closes-bug: #1262498
This commit is contained in:
ls1175
2013-12-20 10:40:22 +08:00
parent d663570b77
commit 994ceae9a9

View File

@@ -107,7 +107,7 @@ class HTTPClient(object):
if 'body' in kwargs:
curl.append('-d \'%s\'' % kwargs['body'])
curl.append('%s%s' % (self.endpoint, url))
curl.append('%s/%s' % (self.endpoint.rstrip('/'), url.lstrip('/')))
LOG.debug(' '.join(curl))
@staticmethod