Commit 9c007da8 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Add RPC calls for pause/resume sync of devices

Signed-off-by: default avatarRené Nussbaumer <>
Reviewed-by: default avatarIustin Pop <>
parent 5119c79e
......@@ -988,6 +988,16 @@ class RpcRunner(object):
return self._SingleNodeCall(node, "blockdev_rename",
[(d.ToDict(), uid) for d, uid in devlist])
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])
def call_blockdev_assemble(self, node, disk, owner, on_primary):
"""Request assembling of a given block device.
......@@ -183,6 +183,15 @@ class NodeHttpServer(http.server.HttpServer):
raise ValueError("can't unserialize data!")
return backend.BlockdevCreate(bdev, size, owner, on_primary, info)
def perspective_blockdev_pause_resume_sync(params):
"""Pause/resume sync of a block device.
disks_s, pause = params
disks = [objects.Disk.FromDict(bdev_s) for bdev_s in disks_s]
return backend.BlockdevPauseResumeSync(disks, pause)
def perspective_blockdev_wipe(params):
"""Wipe a block device.
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