Giuseppe Lavagetto has uploaded a new change for review.
https://gerrit.wikimedia.org/r/217244
Change subject: driver: allow specifying driver-specific options.
......................................................................
driver: allow specifying driver-specific options.
Change-Id: Ifc8aa1965c163347948380f3fb7f9f7e5c6c5904
---
M conftool/configuration.py
M conftool/drivers/etcd.py
2 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/software/conftool
refs/changes/44/217244/1
diff --git a/conftool/configuration.py b/conftool/configuration.py
index c3fede6..26340c6 100644
--- a/conftool/configuration.py
+++ b/conftool/configuration.py
@@ -20,6 +20,7 @@
'api_version',
'pools_path',
'services_path',
+ 'driver_options'
])
@@ -30,7 +31,8 @@
namespace='/conftool',
api_version='v1',
pools_path='pools',
- services_path='services'
+ services_path='services',
+ driver_options={}
):
if pools_path.startswith('/'):
raise ValueError("pools_path must be a relative path.")
@@ -42,4 +44,5 @@
namespace=namespace,
api_version=api_version,
pools_path=pools_path,
- services_path=services_path)
+ services_path=services_path,
+ driver_options=driver_options)
diff --git a/conftool/drivers/etcd.py b/conftool/drivers/etcd.py
index b686c3a..8ef9b48 100644
--- a/conftool/drivers/etcd.py
+++ b/conftool/drivers/etcd.py
@@ -15,7 +15,8 @@
proto = urlparse.urlparse(config.hosts[0]).scheme
self.client = etcd.Client(host=tuple(host_list),
protocol=proto,
- allow_reconnect=True)
+ allow_reconnect=True,
+ **config.driver_options)
super(Driver, self).__init__(config)
@drivers.wrap_exception(etcd.EtcdException)
--
To view, visit https://gerrit.wikimedia.org/r/217244
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc8aa1965c163347948380f3fb7f9f7e5c6c5904
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits