#
#
-# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
[(d.ToDict(), uid) for d, uid in devlist])
@_RpcTimeout(_TMO_NORMAL)
- def call_blockdev_assemble(self, node, disk, owner, on_primary):
+ def call_blockdev_pause_resume_sync(self, node, disks, pause):
+ """Request a pause/resume of given block device.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "blockdev_pause_resume_sync",
+ [[bdev.ToDict() for bdev in disks], pause])
+
+ @_RpcTimeout(_TMO_NORMAL)
+ def call_blockdev_assemble(self, node, disk, owner, on_primary, idx):
"""Request assembling of a given block device.
This is a single-node call.
"""
return self._SingleNodeCall(node, "blockdev_assemble",
- [disk.ToDict(), owner, on_primary])
+ [disk.ToDict(), owner, on_primary, idx])
@_RpcTimeout(_TMO_NORMAL)
def call_blockdev_shutdown(self, node, disk):
return self._SingleNodeCall(node, "blockdev_close", params)
@_RpcTimeout(_TMO_NORMAL)
- def call_blockdev_getsizes(self, node, disks):
+ def call_blockdev_getsize(self, node, disks):
"""Returns the size of the given disks.
This is a single-node call.
[old_file_storage_dir, new_file_storage_dir])
@classmethod
- @_RpcTimeout(_TMO_FAST)
+ @_RpcTimeout(_TMO_URGENT)
def call_jobqueue_update(cls, node_list, address_list, file_name, content):
"""Update job queue.
return cls._StaticSingleNodeCall(node, "jobqueue_purge", [])
@classmethod
- @_RpcTimeout(_TMO_FAST)
+ @_RpcTimeout(_TMO_URGENT)
def call_jobqueue_rename(cls, node_list, address_list, rename):
"""Rename a job queue file.