X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nm.py;h=c4760fcc6ec848a7c7c37981120ce6a6b97254a5;hb=f211fe036f17f4758df731fc6d8dbf3d64ca96ac;hp=6e56501e5b8c3dcfcacdbae881ddb138f4a6cedb;hpb=e3eb033d2d04d2705d3222e6560725bb5945084a;p=nodemanager.git diff --git a/nm.py b/nm.py index 6e56501..c4760fc 100644 --- a/nm.py +++ b/nm.py @@ -14,7 +14,7 @@ import logger import tools from config import Config -from plcapi import PLCAPI +from plcapi import PLCAPI savedargv = sys.argv[:] @@ -31,9 +31,13 @@ modules = [] def GetSlivers(plc): data = plc.GetSlivers() + # net needs access to API for i2 nodes. for module in modules: - callback = getattr(module, 'GetSlivers') - callback(data) + if module.__name__ == 'net': + module.GetSlivers(plc, data) + else: + callback = getattr(module, 'GetSlivers') + callback(data) def run(): try: @@ -51,7 +55,7 @@ def run(): print "Warning while writing PID file:", err # Load and start modules - for module in ['net', 'proper', 'conf_files', 'sm']: + for module in ['net', 'proper', 'conf_files', 'sm', 'bwmon']: try: m = __import__(module) m.start(options, config)