Commit 6c948699 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Style fixes for ganeti-*


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent bcb1a39e
......@@ -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()
......@@ -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()
......@@ -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__':
......
......@@ -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()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment