From: Steven Hardy Date: Thu, 7 Mar 2013 12:08:08 +0000 (+0000) Subject: heat common : BaseClient respect host argument X-Git-Tag: 2014.1~792^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=15389b38a11bbb9ef49beb136cd3ebfe00cc8628;p=openstack-build%2Fheat-build.git heat common : BaseClient respect host argument Currently the BaseClient class ignores any host argument and overwrites it with the host from the keystone catalog URL, we should respect the host parameter if it is passed, but make it optional ref bug 1102101 Change-Id: I371e3b70a7bd207a177625c3e6855d8504678f1b --- diff --git a/heat/common/client.py b/heat/common/client.py index de6dd037..fd99ad5f 100644 --- a/heat/common/client.py +++ b/heat/common/client.py @@ -171,7 +171,7 @@ class BaseClient(object): httplib.TEMPORARY_REDIRECT, ) - def __init__(self, host, port=None, use_ssl=False, auth_tok=None, + def __init__(self, host=None, port=None, use_ssl=False, auth_tok=None, creds=None, doc_root=None, key_file=None, cert_file=None, ca_file=None, insecure=False, configure_via_auth=True, service_type=None): @@ -307,7 +307,8 @@ class BaseClient(object): """ parsed = urlparse.urlparse(url) self.use_ssl = parsed.scheme == 'https' - self.host = parsed.hostname + if self.host is None: + self.host = parsed.hostname self.port = parsed.port or 80 self.doc_root = parsed.path