Add tooz_connection config option to database
Add this option to support tooz driver.
When using MySQL as tooz driver, this config can be like:
`tooz_connection = "mysql://staffeln:password@localhost:3306/staffeln"`
diff --git a/staffeln/common/lock.py b/staffeln/common/lock.py
index a8d8a52..dcecfef 100644
--- a/staffeln/common/lock.py
+++ b/staffeln/common/lock.py
@@ -7,7 +7,7 @@
class LockManager(object):
def __init__(self, node_id=None):
- self.db_url = CONF.database.connection
+ self.db_url = CONF.database.tooz_connection
self.node_id = uuidutils.generate_uuid() if node_id is None else node_id
# get_coordinator(backend_url, member_id)
self.coordinator = coordination.get_coordinator(self.db_url, node_id)
diff --git a/staffeln/conf/database.py b/staffeln/conf/database.py
index 761aa15..e06bf75 100644
--- a/staffeln/conf/database.py
+++ b/staffeln/conf/database.py
@@ -15,6 +15,7 @@
SQL_OPTS = [
cfg.StrOpt("mysql_engine", default="InnoDB", help=_("MySQL engine to use.")),
+ cfg.StrOpt("tooz_connection", default="", help=_("Tooz MySQL connection URL.")),
]