Commit 4522a96d authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rpc: Convert OS-related calls


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 54498047
......@@ -342,5 +342,5 @@ _MISC_CALLS = [
]
CALLS = {
"RpcClientDefault": (_IMPEXP_CALLS + _X509_CALLS),
"RpcClientDefault": (_IMPEXP_CALLS + _X509_CALLS + _OS_CALLS),
}
......@@ -1295,37 +1295,6 @@ class RpcRunner(_generated_rpc.RpcClientDefault):
return self._SingleNodeCall(node, "run_oob", [oob_program, command,
remote_node, timeout])
@_RpcTimeout(_TMO_FAST)
def call_os_diagnose(self, node_list):
"""Request a diagnose of OS definitions.
This is a multi-node call.
"""
return self._MultiNodeCall(node_list, "os_diagnose", [])
@_RpcTimeout(_TMO_FAST)
def call_os_get(self, node, name):
"""Returns an OS definition.
This is a single-node call.
"""
result = self._SingleNodeCall(node, "os_get", [name])
if not result.fail_msg and isinstance(result.payload, dict):
result.payload = objects.OS.FromDict(result.payload)
return result
@_RpcTimeout(_TMO_FAST)
def call_os_validate(self, nodes, required, name, checks, params):
"""Run a validation routine for a given OS.
This is a multi-node call.
"""
return self._MultiNodeCall(nodes, "os_validate",
[required, name, checks, params])
@_RpcTimeout(_TMO_NORMAL)
def call_hooks_runner(self, node_list, hpath, phase, env):
"""Call the hooks runner.
......
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