summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2008-10-24 13:34:45 -0400
committerAdrian Likins <alikins@redhat.com>2008-10-24 13:34:45 -0400
commite22199a3c8d1cb9e54d8179ffd0e9ad4a34f8947 (patch)
treef40e5cfed1ca26d303fbcabcdcf00bd0b05865b7 /func
parentc6137343761f3bf5e51bf3c732d768fc0f13e608 (diff)
downloadfunc-e22199a3c8d1cb9e54d8179ffd0e9ad4a34f8947.tar.gz
func-e22199a3c8d1cb9e54d8179ffd0e9ad4a34f8947.tar.xz
func-e22199a3c8d1cb9e54d8179ffd0e9ad4a34f8947.zip
add some test cases for per module configuation.
This stuff doesnt really seem to work at this point, but pushing so other folks can take a look at it. It doesn't break anything else.
Diffstat (limited to 'func')
-rw-r--r--func/commonconfig.py5
-rw-r--r--func/minion/modules/test.py5
2 files changed, 9 insertions, 1 deletions
diff --git a/func/commonconfig.py b/func/commonconfig.py
index 9eaaa88..06d06a2 100644
--- a/func/commonconfig.py
+++ b/func/commonconfig.py
@@ -14,10 +14,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
"""
-from certmaster.config import BaseConfig, BoolOption, Option
+from certmaster.config import BaseConfig, BoolOption, Option, IntOption
class FuncdConfig(BaseConfig):
log_level = Option('INFO')
acl_dir = Option('/etc/func/minion-acl.d')
certmaster_overrides_acls = BoolOption(True)
+
+ listen_addr = Option('')
+ listen_port = IntOption('51234')
diff --git a/func/minion/modules/test.py b/func/minion/modules/test.py
index efcfde6..4548a84 100644
--- a/func/minion/modules/test.py
+++ b/func/minion/modules/test.py
@@ -59,6 +59,11 @@ class Test(func_module.FuncModule):
self.save_config()
return self.options
+ def config_get(self, key_name):
+ return getattr(self.options, key_name)
+
+ def config_get_test(self):
+ return self.options.anothersection.testvalue
def register_method_args(self):
"""