summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Probes.py
diff options
context:
space:
mode:
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)