It is also allows user to enable/disable the federation feature by the
command line:
kimchid --federation=[on|off]
The default value is: off which means the federation feature will be
disabled
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/kimchi.conf.in | 4 ++++
src/kimchi/config.py.in | 1 +
src/kimchid.in | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/src/kimchi.conf.in b/src/kimchi.conf.in
index ed0270d..2be1a0e 100644
--- a/src/kimchi.conf.in
+++ b/src/kimchi.conf.in
@@ -26,6 +26,10 @@
# Running environment of the server
#environment = production
+# Federation feature: register Kimchi server on openSLP and discover peers
+# at the same network
+#federation = off
+
[logging]
# Log directory
#log_dir = @localstatedir@/log/kimchi
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
index fca32ee..d403827 100644
--- a/src/kimchi/config.py.in
+++ b/src/kimchi/config.py.in
@@ -254,6 +254,7 @@ def _get_config():
config.set("server", "ssl_cert", "")
config.set("server", "ssl_key", "")
config.set("server", "environment", "production")
+ config.set("server", "federation", "off")
config.add_section("logging")
config.set("logging", "log_dir", paths.log_dir)
config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
diff --git a/src/kimchid.in b/src/kimchid.in
index fc889a3..3ed087f 100644
--- a/src/kimchid.in
+++ b/src/kimchid.in
@@ -46,6 +46,7 @@ def main(options):
ssl_port = config.config.get("server", "ssl_port")
cherrypy_port = config.config.get("server", "cherrypy_port")
runningEnv = config.config.get("server", "environment")
+ federation = config.config.get("server", "federation")
logDir = config.config.get("logging", "log_dir")
logLevel = config.config.get("logging", "log_level")
@@ -68,6 +69,9 @@ def main(options):
help="Error log file")
parser.add_option('--environment', default=runningEnv,
help="Running environment of kimchi server")
+ parser.add_option('--federation', default=federation,
+ help="Register and discover Kimchi peers at the same "
+ "network using openSLP")
parser.add_option('--test', action='store_true',
help="Run server in mock model")
(options, args) = parser.parse_args()
--
1.9.3