Build different etcd client depending protocol
etcd should not looking for TLS certificates when http protocol is used. Change-Id: I91122cc56bf1f11be1700d09ff03cdff15badf91 Story: 2005935 Task: 34281
This commit is contained in:
parent
49830445c9
commit
adba9605ac
|
@ -24,12 +24,17 @@ def get_client(conf=None):
|
||||||
conf = conf or CONF
|
conf = conf or CONF
|
||||||
|
|
||||||
if not CLIENT:
|
if not CLIENT:
|
||||||
CLIENT = etcd3gw.client(host=conf.etcd.host,
|
if conf.etcd.protocol == "https":
|
||||||
port=conf.etcd.port,
|
CLIENT = etcd3gw.client(host=conf.etcd.host,
|
||||||
protocol=conf.etcd.protocol,
|
port=conf.etcd.port,
|
||||||
ca_cert=conf.etcd.ca_cert,
|
protocol=conf.etcd.protocol,
|
||||||
cert_cert=conf.etcd.cert_file,
|
ca_cert=conf.etcd.ca_cert,
|
||||||
cert_key=conf.etcd.cert_key)
|
cert_cert=conf.etcd.cert_file,
|
||||||
|
cert_key=conf.etcd.cert_key)
|
||||||
|
else:
|
||||||
|
CLIENT = etcd3gw.client(host=conf.etcd.host,
|
||||||
|
port=conf.etcd.port,
|
||||||
|
protocol=conf.etcd.protocol)
|
||||||
|
|
||||||
return CLIENT
|
return CLIENT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue