diff options
| author | Zuul <zuul@review.opendev.org> | 2022-09-05 16:37:55 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2022-09-05 16:37:55 +0000 |
| commit | cb0392ca6b91999c093f458da01c17bd4e4820f8 (patch) | |
| tree | ce24f18b76f4188a064fee9a464581fbd9594818 /tooz/drivers/etcd3gw.py | |
| parent | 00972f3b09f57d1c715facacf3dd945c0608ebac (diff) | |
| parent | b64623daeb9e0f94fd5322a1c7e47403f187e7ed (diff) | |
| download | tooz-cb0392ca6b91999c093f458da01c17bd4e4820f8.tar.gz | |
Merge "Support etcd3gw api version"3.1.0
Diffstat (limited to 'tooz/drivers/etcd3gw.py')
| -rw-r--r-- | tooz/drivers/etcd3gw.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tooz/drivers/etcd3gw.py b/tooz/drivers/etcd3gw.py index d426b74..b1ad633 100644 --- a/tooz/drivers/etcd3gw.py +++ b/tooz/drivers/etcd3gw.py @@ -180,6 +180,7 @@ class Etcd3Driver(coordination.CoordinationDriverWithExecutor): ================== ======= Name Default ================== ======= + api_version v3alpha ca_cert None cert_key None cert_cert None @@ -198,6 +199,9 @@ class Etcd3Driver(coordination.CoordinationDriverWithExecutor): #: Default port used if none provided (4001 or 2379 are the common ones). DEFAULT_PORT = 2379 + #: Default api version if none provided + DEFAULT_API_VERSION = "v3alpha" + GROUP_PREFIX = b"tooz/groups/" def __init__(self, member_id, parsed_url, options): @@ -210,12 +214,14 @@ class Etcd3Driver(coordination.CoordinationDriverWithExecutor): cert_key = options.get('cert_key') cert_cert = options.get('cert_cert') timeout = int(options.get('timeout', self.DEFAULT_TIMEOUT)) + api_version = options.get("api_version", self.DEFAULT_API_VERSION) self.client = etcd3gw.client(host=host, port=port, protocol=protocol, ca_cert=ca_cert, cert_key=cert_key, cert_cert=cert_cert, + api_path="/" + api_version + "/", timeout=timeout) self.lock_timeout = int(options.get('lock_timeout', timeout)) self.membership_timeout = int(options.get( |
