Commit 200de241 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rpc: Add support for generated RPC wrappers

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 033684dd
......@@ -48,6 +48,9 @@ from ganeti import ssconf
from ganeti import runtime
from ganeti import compat
# Special module generated at build time
from ganeti import _generated_rpc
# pylint has a bug here, doesn't see this import
import ganeti.http.client # pylint: disable=W0611
......@@ -449,7 +452,7 @@ def _EncodeImportExportIO(ieio, ieioargs):
return ieioargs
class RpcRunner(object):
class RpcRunner(_generated_rpc.RpcClientDefault):
"""RPC runner class.
......@@ -460,6 +463,8 @@ class RpcRunner(object):
@param context: Ganeti context
self._cfg = context.cfg
self._proc = _RpcProcessor(compat.partial(_NodeConfigResolver,
......@@ -510,6 +515,12 @@ class RpcRunner(object):
body = serializer.DumpJson(args, indent=False)
return self._proc(node_list, procedure, body, read_timeout=read_timeout)
def _Call(self, node_list, procedure, timeout, args):
"""Entry point for automatically generated RPC wrappers.
return self._MultiNodeCall(node_list, procedure, args, read_timeout=timeout)
def _StaticMultiNodeCall(node_list, procedure, args,
address_list=None, read_timeout=None):
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