Revision 0436da49

b/lib/build/rpc_definitions.py
343 343

  
344 344
CALLS = {
345 345
  "RpcClientDefault": (_IMPEXP_CALLS + _X509_CALLS + _OS_CALLS + _NODE_CALLS +
346
    _FILE_STORAGE_CALLS),
346
    _FILE_STORAGE_CALLS + _MISC_CALLS),
347 347
  }
b/lib/rpc.py
634 634
    """
635 635
    return self._MultiNodeCall(node_list, "bdev_sizes", [devices])
636 636

  
637
  @_RpcTimeout(_TMO_URGENT)
638
  def call_lv_list(self, node_list, vg_name):
639
    """Gets the logical volumes present in a given volume group.
640

  
641
    This is a multi-node call.
642

  
643
    """
644
    return self._MultiNodeCall(node_list, "lv_list", [vg_name])
645

  
646
  @_RpcTimeout(_TMO_URGENT)
647
  def call_vg_list(self, node_list):
648
    """Gets the volume group list.
649

  
650
    This is a multi-node call.
651

  
652
    """
653
    return self._MultiNodeCall(node_list, "vg_list", [])
654

  
655 637
  @_RpcTimeout(_TMO_NORMAL)
656 638
  def call_storage_list(self, node_list, su_name, su_args, name, fields):
657 639
    """Get list of storage units.
......
682 664
    return self._SingleNodeCall(node, "storage_execute",
683 665
                                [su_name, su_args, name, op])
684 666

  
685
  @_RpcTimeout(_TMO_URGENT)
686
  def call_bridges_exist(self, node, bridges_list):
687
    """Checks if a node has all the bridges given.
688

  
689
    This method checks if all bridges given in the bridges_list are
690
    present on the remote node, so that an instance that uses interfaces
691
    on those bridges can be started.
692

  
693
    This is a single-node call.
694

  
695
    """
696
    return self._SingleNodeCall(node, "bridges_exist", [bridges_list])
697

  
698 667
  @_RpcTimeout(_TMO_NORMAL)
699 668
  def call_instance_start(self, node, instance, hvp, bep, startup_paused):
700 669
    """Starts an instance.
......
920 889
    """
921 890
    return self._MultiNodeCall(node_list, "instance_list", [hypervisor_list])
922 891

  
923
  @_RpcTimeout(_TMO_NORMAL)
924
  def call_etc_hosts_modify(self, node, mode, name, ip):
925
    """Modify hosts file with name
926

  
927
    @type node: string
928
    @param node: The node to call
929
    @type mode: string
930
    @param mode: The mode to operate. Currently "add" or "remove"
931
    @type name: string
932
    @param name: The host name to be modified
933
    @type ip: string
934
    @param ip: The ip of the entry (just valid if mode is "add")
935

  
936
    """
937
    return self._SingleNodeCall(node, "etc_hosts_modify", [mode, name, ip])
938

  
939 892
  @classmethod
940 893
  @_RpcTimeout(_TMO_FAST)
941 894
  def call_node_start_master_daemons(cls, node, no_voting):
......
1245 1198
    return cls._StaticMultiNodeCall(node_list, "write_ssconf_files", [values])
1246 1199

  
1247 1200
  @_RpcTimeout(_TMO_NORMAL)
1248
  def call_run_oob(self, node, oob_program, command, remote_node, timeout):
1249
    """Runs OOB.
1250

  
1251
    This is a single-node call.
1252

  
1253
    """
1254
    return self._SingleNodeCall(node, "run_oob", [oob_program, command,
1255
                                                  remote_node, timeout])
1256

  
1257
  @_RpcTimeout(_TMO_NORMAL)
1258
  def call_hooks_runner(self, node_list, hpath, phase, env):
1259
    """Call the hooks runner.
1260

  
1261
    Args:
1262
      - op: the OpCode instance
1263
      - env: a dictionary with the environment
1264

  
1265
    This is a multi-node call.
1266

  
1267
    """
1268
    params = [hpath, phase, env]
1269
    return self._MultiNodeCall(node_list, "hooks_runner", params)
1270

  
1271
  @_RpcTimeout(_TMO_NORMAL)
1272
  def call_iallocator_runner(self, node, name, idata):
1273
    """Call an iallocator on a remote node
1274

  
1275
    Args:
1276
      - name: the iallocator name
1277
      - input: the json-encoded input string
1278

  
1279
    This is a single-node call.
1280

  
1281
    """
1282
    return self._SingleNodeCall(node, "iallocator_runner", [name, idata])
1283

  
1284
  @_RpcTimeout(_TMO_NORMAL)
1285 1201
  def call_blockdev_grow(self, node, cf_bdev, amount, dryrun):
1286 1202
    """Request a snapshot of the given block device.
1287 1203

  
......
1326 1242
    return cls._StaticSingleNodeCall(node, "node_leave_cluster",
1327 1243
                                     [modify_ssh_setup])
1328 1244

  
1329
  @_RpcTimeout(None)
1330
  def call_test_delay(self, node_list, duration):
1245
  def call_test_delay(self, node_list, duration, read_timeout=None):
1331 1246
    """Sleep for a fixed time on given node(s).
1332 1247

  
1333 1248
    This is a multi-node call.
1334 1249

  
1335 1250
    """
1336
    return self._MultiNodeCall(node_list, "test_delay", [duration],
1337
                               read_timeout=int(duration + 5))
1251
    assert read_timeout is None
1252
    return self.call_test_delay(node_list, duration,
1253
                                read_timeout=int(duration + 5))
1338 1254

  
1339 1255
  @classmethod
1340 1256
  @_RpcTimeout(_TMO_URGENT)

Also available in: Unified diff