Style fixes for ganeti-*
authorMichael Hanselmann <hansmi@google.com>
Tue, 25 Aug 2009 15:51:57 +0000 (17:51 +0200)
committerMichael Hanselmann <hansmi@google.com>
Tue, 25 Aug 2009 16:00:07 +0000 (18:00 +0200)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

daemons/ganeti-confd
daemons/ganeti-masterd
daemons/ganeti-noded
daemons/ganeti-rapi

index df026da..d86cb68 100755 (executable)
@@ -182,8 +182,8 @@ class ConfdInotifyEventHandler(pyinotify.ProcessEvent):
     logging.error("Received unhandled inotify event: %s" % event)
 
 
-def CheckCONFD(options, args):
-  """Initial checks whether to run exit with a failure
+def CheckConfd(options, args):
+  """Initial checks whether to run exit with a failure.
 
   """
   # TODO: collapse HMAC daemons handling in daemons GenericMain, when we'll
@@ -195,8 +195,8 @@ def CheckCONFD(options, args):
   ssconf.CheckMasterCandidate(options.debug)
 
 
-def ExecCONFD(options, args):
-  """Main CONFD function, executed with pidfile held
+def ExecConfd(options, args):
+  """Main confd function, executed with PID file held
 
   """
   mainloop = daemon.Mainloop()
@@ -228,8 +228,8 @@ def main():
   dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
   dirs.append((constants.LOG_OS_DIR, 0750))
   dirs.append((constants.LOCK_DIR, 1777))
-  daemon.GenericMain(constants.CONFD, parser, dirs, CheckCONFD, ExecCONFD)
+  daemon.GenericMain(constants.CONFD, parser, dirs, CheckConfd, ExecConfd)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
   main()
index d2da39e..8e5eca3 100755 (executable)
@@ -440,8 +440,9 @@ def CheckAgreement():
 
   return result
 
-def CheckMASTERD(options, args):
-  """Initial checks whether to run or exit with a failure
+
+def CheckMasterd(options, args):
+  """Initial checks whether to run or exit with a failure.
 
   """
   rpc.Init()
@@ -465,8 +466,8 @@ def CheckMASTERD(options, args):
     rpc.Shutdown()
 
 
-def ExecMASTERD(options, args):
-  """Main MASTERD function, executed with the pidfile held.
+def ExecMasterd (options, args):
+  """Main master daemon function, executed with the PID file held.
 
   """
   # This is safe to do as the pid file guarantees against
@@ -512,7 +513,8 @@ def main():
           (constants.SOCKET_DIR, constants.SOCKET_DIR_MODE),
          ]
   daemon.GenericMain(constants.MASTERD, parser, dirs,
-                     CheckMASTERD, ExecMASTERD)
+                     CheckMasterd, ExecMasterd)
+
 
 if __name__ == "__main__":
   main()
index 3e3d6a0..c752817 100755 (executable)
@@ -780,8 +780,8 @@ class NodeHttpServer(http.server.HttpServer):
     return backend.ValidateHVParams(hvname, hvparams)
 
 
-def ExecNODED(options, args):
-  """Main NODED function, executed with the pidfile held.
+def ExecNoded(options, args):
+  """Main node daemon function, executed with the PID file held.
 
   """
   global queue_lock
@@ -817,7 +817,7 @@ def main():
   dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
   dirs.append((constants.LOG_OS_DIR, 0750))
   dirs.append((constants.LOCK_DIR, 1777))
-  daemon.GenericMain(constants.NODED, parser, dirs, None, ExecNODED)
+  daemon.GenericMain(constants.NODED, parser, dirs, None, ExecNoded)
 
 
 if __name__ == '__main__':
index 3208b54..fc5bf12 100755 (executable)
@@ -177,8 +177,8 @@ class RemoteApiHttpServer(http.auth.HttpServerRequestAuthentication,
     return result
 
 
-def CheckRAPI(options, args):
-  """Initial checks whether to run or exit with a failure
+def CheckRapi(options, args):
+  """Initial checks whether to run or exit with a failure.
 
   """
   if len(args) != 0:
@@ -189,8 +189,8 @@ def CheckRAPI(options, args):
   ssconf.CheckMaster(options.debug)
 
 
-def ExecRAPI(options, args):
-  """Main RAPI function, executed with the pidfile held.
+def ExecRapi(options, args):
+  """Main remote API function, executed with the PID file held.
 
   """
   # Read SSL certificate
@@ -221,8 +221,8 @@ def main():
 
   dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
   dirs.append((constants.LOG_OS_DIR, 0750))
-  daemon.GenericMain(constants.RAPI, parser, dirs, CheckRAPI, ExecRAPI)
+  daemon.GenericMain(constants.RAPI, parser, dirs, CheckRapi, ExecRapi)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
   main()