diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-08 15:35:23 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-09 10:26:31 -0400 |
commit | 48dea2ea0ce93b80484abac6875da4fdf5a20ce7 (patch) | |
tree | ee90f7fb0c593420a6c87801cd5aa4083a6568a9 /src | |
parent | b228b295546aa82d2dfe588e3e52817e392ddb6a (diff) | |
download | bcfg2-48dea2ea0ce93b80484abac6875da4fdf5a20ce7.tar.gz bcfg2-48dea2ea0ce93b80484abac6875da4fdf5a20ce7.tar.bz2 bcfg2-48dea2ea0ce93b80484abac6875da4fdf5a20ce7.zip |
testsuite: fixed unit tests for server plugins
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py | 2 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Probes.py | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py index 50de498e6..c08d3ec44 100644 --- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py +++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py @@ -22,7 +22,7 @@ class CfgAuthorizedKeysGenerator(CfgGenerator, StructFile): __basenames__ = ['authorizedkeys.xml', 'authorized_keys.xml'] def __init__(self, fname): - CfgGenerator.__init__(self, fname, None, None) + CfgGenerator.__init__(self, fname, None) StructFile.__init__(self, fname) self.cache = dict() self.core = CFG.core diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py index 0d264a5a6..ad9e5a88d 100644 --- a/src/lib/Bcfg2/Server/Plugins/Probes.py +++ b/src/lib/Bcfg2/Server/Plugins/Probes.py @@ -14,11 +14,11 @@ from Bcfg2.Server.Statistics import track_statistics HAS_DJANGO = False ProbesDataModel = None -ProbesGroupModel = None +ProbesGroupsModel = None def load_django_models(): - global ProbesDataModel, ProbesGroupModel, HAS_DJANGO + global ProbesDataModel, ProbesGroupsModel, HAS_DJANGO try: from django.db import models HAS_DJANGO = True @@ -128,11 +128,6 @@ class ProbeSet(Bcfg2.Server.Plugin.EntrySet): bangline = re.compile(r'^#!\s*(?P<interpreter>.*)$') basename_is_regex = True - options = [ - Bcfg2.Options.BooleanOption( - cf=('probes', 'use_database'), dest="probes_db", - help="Use database capabilities of the Probes plugin")] - def __init__(self, path, plugin_name): self.plugin_name = plugin_name Bcfg2.Server.Plugin.EntrySet.__init__(self, r'[0-9A-Za-z_\-]+', path, @@ -201,6 +196,12 @@ class Probes(Bcfg2.Server.Plugin.Probing, """ A plugin to gather information from a client machine """ __author__ = 'bcfg-dev@mcs.anl.gov' + options = [ + Bcfg2.Options.BooleanOption( + cf=('probes', 'use_database'), dest="probes_db", + help="Use database capabilities of the Probes plugin")] + options_parsed_hook = load_django_models + def __init__(self, core, datastore): Bcfg2.Server.Plugin.Probing.__init__(self) Bcfg2.Server.Plugin.Caching.__init__(self) |