diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-30 11:35:46 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-17 10:44:14 -0500 |
commit | 45c7bbf24ae3c6530f33ebb33c062818ad44816d (patch) | |
tree | d39fbacaae2d712fdf250a9bce19f9737392539e /src/lib/Bcfg2/Server/Plugins/NagiosGen.py | |
parent | a6b269011b2f1e84c650239065e56778591f087e (diff) | |
download | bcfg2-45c7bbf24ae3c6530f33ebb33c062818ad44816d.tar.gz bcfg2-45c7bbf24ae3c6530f33ebb33c062818ad44816d.tar.bz2 bcfg2-45c7bbf24ae3c6530f33ebb33c062818ad44816d.zip |
added a module-level FAM object to avoid passing it as an argument a billion times
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/NagiosGen.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/NagiosGen.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/NagiosGen.py b/src/lib/Bcfg2/Server/Plugins/NagiosGen.py index baea5fe23..fc06be455 100644 --- a/src/lib/Bcfg2/Server/Plugins/NagiosGen.py +++ b/src/lib/Bcfg2/Server/Plugins/NagiosGen.py @@ -17,14 +17,14 @@ class NagiosGenConfig(Bcfg2.Server.Plugin.StructFile): encryption = False - def __init__(self, filename, fam): + def __init__(self, filename): # create config.xml if missing if not os.path.exists(filename): LOGGER.warning("NagiosGen: %s missing. " "Creating empty one for you." % filename) open(filename, "w").write("<NagiosGen/>") - Bcfg2.Server.Plugin.StructFile.__init__(self, filename, fam=fam, + Bcfg2.Server.Plugin.StructFile.__init__(self, filename, should_monitor=True) @@ -38,8 +38,7 @@ class NagiosGen(Bcfg2.Server.Plugin.Plugin, def __init__(self, core, datastore): Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore) Bcfg2.Server.Plugin.Generator.__init__(self) - self.config = NagiosGenConfig(os.path.join(self.data, 'config.xml'), - core.fam) + self.config = NagiosGenConfig(os.path.join(self.data, 'config.xml')) self.Entries = {'Path': {'/etc/nagiosgen.status': self.createhostconfig, '/etc/nagios/nagiosgen.cfg': self.createserverconfig}} |