commit c3fed6be24202f188f93f8bd5d2d6eb97a848155
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Tue Nov 20 15:06:01 2012 +0100
Config: controller log dir
This patch moves the option 'path' in section 'log' to section
'environment' and renames the option to 'log_dir'. The section
'log' is
removed as it only contained one option.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
lnst-ctl | 2 +-
lnst-ctl.conf | 3 +--
lnst/Common/Config.py | 14 ++++++--------
3 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index af9badb..5608c01 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -136,7 +136,7 @@ def main():
packet_capture = True
- Logs(debug, log_folder=config.get_option('log', 'path'))
+ Logs(debug, log_folder=config.get_option('environment', 'log_dir'))
if not args:
logging.error("No action command passed")
diff --git a/lnst-ctl.conf b/lnst-ctl.conf
index cb4ee11..389434c 100644
--- a/lnst-ctl.conf
+++ b/lnst-ctl.conf
@@ -4,5 +4,4 @@ rpcport = 9999
machine_pool_dirs =
test_tool_dirs = ./test_tools
test_module_dirs = ./test_modules
-[log]
-path = ./Logs
+log_dir = ./Logs
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 61e7354..d49a2d9 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -40,14 +40,6 @@ class Config():
raise ConfigError(msg)
def controller_scheme(self):
- self.options['log'] = dict()
- self.options['log']['path'] = {\
- "value" : os.path.abspath(os.path.join(
- os.path.dirname(sys.argv[0]), './Logs')),
- "additive" : False,
- "action" : self.optionPath,
- "name" : "path"}
-
self.options['environment'] = dict()
self.options['environment']['mac_pool_range'] = {\
"value" : ['52:54:01:00:00:01',
'52:54:01:FF:FF:FF'],
@@ -74,6 +66,12 @@ class Config():
"additive" : True,
"action" : self.optionDirList,
"name" : "test_module_dirs"}
+ self.options['environment']['log_dir'] = {\
+ "value" : os.path.abspath(os.path.join(
+ os.path.dirname(sys.argv[0]), './Logs')),
+ "additive" : False,
+ "action" : self.optionPath,
+ "name" : "log_dir"}
def slave_scheme(self):
self.options['cache'] = dict()
Show replies by date