uncloud-mravi/uncloud/hack/hackcloud/db.py

18 lines
617 B
Python
Raw Normal View History

2020-01-13 11:14:30 +00:00
import etcd3
if __name__ == '__main__':
endpoints = [ "https://etcd1.ungleich.ch:2379",
"!https://etcd2.ungleich.ch:2379",
"https://etcd3.ungleich.ch:2379" ]
clients = []
for endpoint in endpoints:
client = etcd3.client(host=endpoint,
ca_cert="/home/nico/vcs/ungleich-dot-cdist/files/etcd/ca.pem",
cert_cert="/home/nico/vcs/ungleich-dot-cdist/files/etcd/nico.pem",
cert_key="/home/nico/vcs/ungleich-dot-cdist/files/etcd/nico-key.pem")
clients.append(client)