Revision 6c948699 daemons/ganeti-rapi
b/daemons/ganeti-rapi | ||
---|---|---|
177 | 177 |
return result |
178 | 178 |
|
179 | 179 |
|
180 |
def CheckRAPI(options, args):
|
|
181 |
"""Initial checks whether to run or exit with a failure |
|
180 |
def CheckRapi(options, args):
|
|
181 |
"""Initial checks whether to run or exit with a failure.
|
|
182 | 182 |
|
183 | 183 |
""" |
184 | 184 |
if len(args) != 0: |
... | ... | |
189 | 189 |
ssconf.CheckMaster(options.debug) |
190 | 190 |
|
191 | 191 |
|
192 |
def ExecRAPI(options, args):
|
|
193 |
"""Main RAPI function, executed with the pidfile held.
|
|
192 |
def ExecRapi(options, args):
|
|
193 |
"""Main remote API function, executed with the PID file held.
|
|
194 | 194 |
|
195 | 195 |
""" |
196 | 196 |
# Read SSL certificate |
... | ... | |
221 | 221 |
|
222 | 222 |
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS] |
223 | 223 |
dirs.append((constants.LOG_OS_DIR, 0750)) |
224 |
daemon.GenericMain(constants.RAPI, parser, dirs, CheckRAPI, ExecRAPI)
|
|
224 |
daemon.GenericMain(constants.RAPI, parser, dirs, CheckRapi, ExecRapi)
|
|
225 | 225 |
|
226 | 226 |
|
227 |
if __name__ == '__main__':
|
|
227 |
if __name__ == "__main__":
|
|
228 | 228 |
main() |
Also available in: Unified diff