diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded index b68a8faf0fdf4ed98ecbc80a62d164d39b09498a..115c51b4851a123e392f4ac6faae709488bebe77 100755 --- a/daemons/ganeti-noded +++ b/daemons/ganeti-noded @@ -211,6 +211,15 @@ class ServerObject(BaseHTTPServer.BaseHTTPRequestHandler): cfbd = objects.Disk.FromDict(params[0]) return backend.SnapshotBlockDevice(cfbd) + @staticmethod + def perspective_blockdev_grow(params): + """Grow a stack of devices. + + """ + cfbd = objects.Disk.FromDict(params[0]) + amount = params[1] + return backend.GrowBlockDevice(cfbd, amount) + # export/import -------------------------- @staticmethod diff --git a/lib/rpc.py b/lib/rpc.py index 8b5e5baac8925deefbd2013752a2705b7b728cfb..335d8885bec500581f1624e0146f095851256360 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -607,6 +607,18 @@ def call_iallocator_runner(node, name, idata): return result +def call_blockdev_grow(node, cf_bdev, amount): + """Request a snapshot of the given block device. + + This is a single-node call. + + """ + c = Client("blockdev_grow", [cf_bdev.ToDict(), amount]) + c.connect(node) + c.run() + return c.getresult().get(node, False) + + def call_blockdev_snapshot(node, cf_bdev): """Request a snapshot of the given block device.