Commit 271b7cf9 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Adding RPC call for blockdev_wipe

Signed-off-by: default avatarRené Nussbaumer <>
Reviewed-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent da63bb4e
......@@ -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_wipe(params):
"""Wipe a block device.
bdev_s, offset, size = params
bdev = objects.Disk.FromDict(bdev_s)
return backend.BlockdevWipe(bdev, offset, size)
def perspective_blockdev_remove(params):
"""Remove a block device.
......@@ -953,6 +953,16 @@ class RpcRunner(object):
return self._SingleNodeCall(node, "blockdev_create",
[bdev.ToDict(), size, owner, on_primary, info])
def call_blockdev_wipe(self, node, bdev, offset, size):
"""Request wipe at given offset with given size of a block device.
This is a single-node call.
return self._SingleNodeCall(node, "blockdev_wipe",
[bdev.ToDict(), offset, size])
def call_blockdev_remove(self, node, bdev):
"""Request removal of a given 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