summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Rules.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Rules.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Rules.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Rules.py b/src/lib/Bcfg2/Server/Plugins/Rules.py
index 904876794..21862c5db 100644
--- a/src/lib/Bcfg2/Server/Plugins/Rules.py
+++ b/src/lib/Bcfg2/Server/Plugins/Rules.py
@@ -6,7 +6,6 @@ import Bcfg2.Server.Plugin
class Rules(Bcfg2.Server.Plugin.PrioDir):
"""This is a generator that handles service assignments."""
- name = 'Rules'
__author__ = 'bcfg-dev@mcs.anl.gov'
def __init__(self, core, datastore):
@@ -19,15 +18,14 @@ class Rules(Bcfg2.Server.Plugin.PrioDir):
self.Entries[entry.tag].keys())
return False
- def HandleEntry(self, entry, metadata):
- return self.BindEntry(entry, metadata)
-
def BindEntry(self, entry, metadata):
attrs = self.get_attrs(entry, metadata)
for key, val in list(attrs.items()):
if key not in entry.attrib:
entry.attrib[key] = val
+ HandleEntry = BindEntry
+
def _matches(self, entry, metadata, rules):
if Bcfg2.Server.Plugin.PrioDir._matches(self, entry, metadata, rules):
return True
@@ -48,6 +46,7 @@ class Rules(Bcfg2.Server.Plugin.PrioDir):
return True
return False
+ @property
def _regex_enabled(self):
""" Return True if rules regexes are enabled, False otherwise """
return self.core.setup.cfp.getboolean("rules", "regex", default=False)