summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-05-20 11:18:23 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-05-20 11:18:23 -0400
commit152aab6994694419aabf4817737bc130257205eb (patch)
tree8ed7b1eb67bce5b89a20bc080cb7048b6ed35e5e /src/lib/Bcfg2/Server/Plugins/GroupLogic.py
parent10d60b35ce384d4b73fd63939aa65b07e9032a12 (diff)
downloadbcfg2-152aab6994694419aabf4817737bc130257205eb.tar.gz
bcfg2-152aab6994694419aabf4817737bc130257205eb.tar.bz2
bcfg2-152aab6994694419aabf4817737bc130257205eb.zip
GroupLogic: Updated for new module-level setup object
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/GroupLogic.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/GroupLogic.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
index 59d0fa561..aa336ff23 100644
--- a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
+++ b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
@@ -4,25 +4,17 @@ template to dynamically set additional groups for clients. """
import os
import lxml.etree
import Bcfg2.Server.Plugin
-from Bcfg2.Server.Plugins.Bundler import BundleFile
-class GroupLogicConfig(BundleFile):
+class GroupLogicConfig(Bcfg2.Server.Plugin.StructFile):
""" Representation of the GroupLogic groups.xml file """
create = lxml.etree.Element("GroupLogic",
nsmap=dict(py="http://genshi.edgewall.org/"))
- def __init__(self, name, fam):
- BundleFile.__init__(self, name,
- Bcfg2.Server.Plugin.Specificity(), None)
- self.fam = fam
- self.should_monitor = True
- self.fam.AddMonitor(self.name, self)
-
def _match(self, item, metadata):
if item.tag == 'Group' and not len(item.getchildren()):
return [item]
- return BundleFile._match(self, item, metadata)
+ return Bcfg2.Server.Plugin.StructFile._match(self, item, metadata)
class GroupLogic(Bcfg2.Server.Plugin.Plugin,
@@ -35,7 +27,7 @@ class GroupLogic(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
Bcfg2.Server.Plugin.Connector.__init__(self)
self.config = GroupLogicConfig(os.path.join(self.data, "groups.xml"),
- core.fam)
+ should_monitor=True)
def get_additional_groups(self, metadata):
return [el.get("name")