summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Probes.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-08 15:35:23 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-09 10:26:31 -0400
commit48dea2ea0ce93b80484abac6875da4fdf5a20ce7 (patch)
treeee90f7fb0c593420a6c87801cd5aa4083a6568a9 /src/lib/Bcfg2/Server/Plugins/Probes.py
parentb228b295546aa82d2dfe588e3e52817e392ddb6a (diff)
downloadbcfg2-48dea2ea0ce93b80484abac6875da4fdf5a20ce7.tar.gz
bcfg2-48dea2ea0ce93b80484abac6875da4fdf5a20ce7.tar.bz2
bcfg2-48dea2ea0ce93b80484abac6875da4fdf5a20ce7.zip
testsuite: fixed unit tests for server plugins
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Probes.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Probes.py15
1 files changed, 8 insertions, 7 deletions
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)