Revision 3ee53f1f daemons/ganeti-rapi
b/daemons/ganeti-rapi | ||
---|---|---|
280 | 280 |
options.ssl_params = None |
281 | 281 |
|
282 | 282 |
|
283 |
def ExecRapi(options, _dummy1, _dummy2):
|
|
284 |
"""Main remote API function, executed with the PID file held.
|
|
283 |
def PrepRapi(options, _):
|
|
284 |
"""Prep remote API function, executed with the PID file held.
|
|
285 | 285 |
|
286 | 286 |
""" |
287 | 287 |
|
... | ... | |
301 | 301 |
# pylint: disable-msg=E1101 |
302 | 302 |
# it seems pylint doesn't see the second parent class there |
303 | 303 |
server.Start() |
304 |
return (mainloop, server) |
|
305 |
|
|
306 |
def ExecRapi(options, args, prep_data): # pylint: disable-msg=W0613 |
|
307 |
"""Main remote API function, executed with the PID file held. |
|
308 |
|
|
309 |
""" |
|
310 |
(mainloop, server) = prep_data |
|
304 | 311 |
try: |
305 | 312 |
mainloop.Run() |
306 | 313 |
finally: |
... | ... | |
315 | 322 |
usage="%prog [-f] [-d] [-p port] [-b ADDRESS]", |
316 | 323 |
version="%%prog (ganeti) %s" % constants.RELEASE_VERSION) |
317 | 324 |
|
318 |
daemon.GenericMain(constants.RAPI, parser, CheckRapi, None, ExecRapi,
|
|
325 |
daemon.GenericMain(constants.RAPI, parser, CheckRapi, PrepRapi, ExecRapi,
|
|
319 | 326 |
default_ssl_cert=constants.RAPI_CERT_FILE, |
320 | 327 |
default_ssl_key=constants.RAPI_CERT_FILE) |
321 | 328 |
|
Also available in: Unified diff