remove config and options parameters from start function as nobody uses them
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Mon, 28 Jun 2010 17:34:58 +0000 (17:34 +0000)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Mon, 28 Jun 2010 17:34:58 +0000 (17:34 +0000)
13 files changed:
conf_files.py
net.py
nodemanager.py
plugins/codemux.py
plugins/drl.py
plugins/omf_resctl.py
plugins/rawdisk.py
plugins/reservation.py
plugins/sliverauth.py
plugins/specialaccounts.py
plugins/vsys.py
plugins/vsys_privs.py
slivermanager.py

index a858a03..c16639f 100644 (file)
@@ -89,7 +89,7 @@ class conf_files:
             logger.log_missing_data("conf_files.run_once",'conf_files')
 
 
-def start(options, config): pass
+def start(): pass
 
 def GetSlivers(data, config = None, plc = None):
     logger.log("conf_files: Running.")
diff --git a/net.py b/net.py
index b67acf4..de3360b 100644 (file)
--- a/net.py
+++ b/net.py
@@ -17,7 +17,7 @@ priority=1
 
 dev_default = tools.get_default_if()
 
-def start(options, conf):
+def start():
     logger.log("net: plugin starting up...")
 
 def GetSlivers(data, config, plc):
@@ -156,6 +156,3 @@ def InitNAT(plc, data):
                         fields['source'] = "0.0.0.0/0"
                     ipt.add_pf(fields)
     ipt.commit()
-
-def start(options, config):
-    pass
index 899bd64..162d1fd 100755 (executable)
@@ -199,7 +199,7 @@ If this is not the case, please remove the pid file %s. -- exiting""" % (other_p
                 try:
                     m = __import__(module)
                     logger.verbose("nodemanager: triggering %s.start"%m.__name__)
-                    m.start(self.options, config)
+                    m.start()
                     self.loaded_modules.append(m)
                 except ImportError, err:
                     print "Warning while loading module %s:" % module, err
index 2c532b8..02a8336 100644 (file)
@@ -10,7 +10,7 @@ from config import Config
 
 CODEMUXCONF="/etc/codemux/codemux.conf"
 
-def start(options, conf):
+def start():
     logger.log("codemux: plugin starting up...")
 
 def GetSlivers(data, config, plc = None):
index e66a575..0e33833 100644 (file)
@@ -18,7 +18,7 @@ drl = """<?xml version="1.0" encoding="UTF-8"?>
     </machine>
 </drl>"""
 
-def start(options, conf):
+def start():
     logger.log('drl plugin starting up...')
 
 
index 87629aa..4fd2e8e 100644 (file)
@@ -17,7 +17,7 @@ import logger
 
 priority = 50
 
-def start(options, conf):
+def start():
     logger.log("omf_resctl: plugin starting up...")
 
 def GetSlivers(data, conf = None, plc = None):
index 34dce8b..b6f4708 100644 (file)
@@ -21,7 +21,7 @@ import re
 import logger
 import tools
 
-def start(options, config):
+def start():
     logger.log("rawdisk: plugin starting up...")
 
 def get_unused_devices():
index 6b19691..985f45e 100644 (file)
@@ -30,8 +30,8 @@ def Singleton (klass,*args,**kwds):
         klass._instance=klass(*args,**kwds)
     return klass._instance
 
-def start(options, conf):
-    return Singleton(reservation).start(options,conf)
+def start():
+    return Singleton(reservation).start()
 
 def GetSlivers(data, conf = None, plc = None):
     return Singleton(reservation).GetSlivers(data, conf, plc)
@@ -49,7 +49,7 @@ class reservation:
         self.timers = {}
 
     ####################
-    def start(self,options,conf):
+    def start(self):
         logger.log("reservation: plugin performing dummy start...")
 
     # this method is entirely about making sure that we have events scheduled
index 6e3d25f..9ff2f38 100644 (file)
@@ -24,7 +24,7 @@ import socket
 import logger
 import tools
 
-def start(options, conf):
+def start():
     logger.log("sliverauth: (dummy) plugin starting up...")
 
 def GetSlivers(data, config, plc):
index 14a9cc9..f3af8bc 100644 (file)
@@ -25,7 +25,7 @@ import tools
 # right after conf_files
 priority = 3
 
-def start(options, conf):
+def start():
     logger.log("specialaccounts: plugin starting up...")
 
 def GetSlivers(data, conf = None, plc = None):
index e6c4b12..6d0ad6c 100644 (file)
@@ -9,7 +9,7 @@ import os
 VSYSCONF="/etc/vsys.conf"
 VSYSBKEND="/vsys"
 
-def start(options, conf):
+def start():
     logger.log("vsys: plugin starting up...")
 
 def GetSlivers(data, config=None, plc=None):
index dea3b44..af2b739 100755 (executable)
@@ -12,7 +12,7 @@ import os
 
 VSYS_PRIV_DIR = "/etc/planetlab/vsys-attributes"
 
-def start(options, conf):
+def start():
     logger.log("vsys_privs: plugin starting")
     if (not os.path.exists(VSYS_PRIV_DIR)):
         os.makedirs(VSYS_PRIV_DIR)
index 8be8bca..8f1ae3e 100644 (file)
@@ -197,7 +197,7 @@ def GetSlivers(data, config = None, plc=None, fullupdate=True):
 def deliver_ticket(data):
     return GetSlivers(data, fullupdate=False)
 
-def start(options, config):
+def start():
     for resname, default_amount in sliver_vs.DEFAULT_ALLOCATION.iteritems():
         DEFAULT_ALLOCATION[resname]=default_amount