Revision 68959ca5
b/lib/build/rpc_definitions.py | ||
---|---|---|
364 | 364 |
("test_delay", MULTI, None, [ |
365 | 365 |
("duration", None, None), |
366 | 366 |
], None, "Sleep for a fixed time on given node(s)"), |
367 |
("hypervisor_validate_params", MULTI, TMO_NORMAL, [ |
|
368 |
("hvname", None, "Hypervisor name"), |
|
369 |
("hvfull", None, "Parameters to be validated"), |
|
370 |
], None, "Validate hypervisor params"), |
|
367 | 371 |
] |
368 | 372 |
|
369 | 373 |
CALLS = { |
b/lib/cmdlib.py | ||
---|---|---|
8223 | 8223 |
|
8224 | 8224 |
""" |
8225 | 8225 |
nodenames = _FilterVmNodes(lu, nodenames) |
8226 |
hvinfo = lu.rpc.call_hypervisor_validate_params(nodenames, |
|
8227 |
hvname, |
|
8228 |
hvparams) |
|
8226 |
|
|
8227 |
cluster = lu.cfg.GetClusterInfo() |
|
8228 |
hvfull = objects.FillDict(cluster.hvparams.get(hvname, {}), hvparams) |
|
8229 |
|
|
8230 |
hvinfo = lu.rpc.call_hypervisor_validate_params(nodenames, hvname, hvfull) |
|
8229 | 8231 |
for node in nodenames: |
8230 | 8232 |
info = hvinfo[node] |
8231 | 8233 |
if info.offline: |
b/lib/rpc.py | ||
---|---|---|
691 | 691 |
return self.call_test_delay(node_list, duration, |
692 | 692 |
read_timeout=int(duration + 5)) |
693 | 693 |
|
694 |
@_RpcTimeout(_TMO_NORMAL) |
|
695 |
def call_hypervisor_validate_params(self, node_list, hvname, hvparams): |
|
696 |
"""Validate the hypervisor params. |
|
697 |
|
|
698 |
This is a multi-node call. |
|
699 |
|
|
700 |
@type node_list: list |
|
701 |
@param node_list: the list of nodes to query |
|
702 |
@type hvname: string |
|
703 |
@param hvname: the hypervisor name |
|
704 |
@type hvparams: dict |
|
705 |
@param hvparams: the hypervisor parameters to be validated |
|
706 |
|
|
707 |
""" |
|
708 |
cluster = self._cfg.GetClusterInfo() |
|
709 |
hv_full = objects.FillDict(cluster.hvparams.get(hvname, {}), hvparams) |
|
710 |
return self._MultiNodeCall(node_list, "hypervisor_validate_params", |
|
711 |
[hvname, hv_full]) |
|
712 |
|
|
713 | 694 |
|
714 | 695 |
class JobQueueRunner(_generated_rpc.RpcClientJobQueue): |
715 | 696 |
"""RPC wrappers for job queue. |
Also available in: Unified diff