Revision a303027b
b/lib/rpc_defs.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
367 | 367 |
("info", None, None), |
368 | 368 |
("exclusive_storage", None, None), |
369 | 369 |
], None, None, "Request creation of a given block device"), |
370 |
("blockdev_image", SINGLE, None, constants.RPC_TMO_SLOW, [ |
|
371 |
("bdev", ED_SINGLE_DISK_DICT_DP, None), |
|
372 |
("image", None, None), |
|
373 |
("size", None, None), |
|
374 |
], None, None, |
|
375 |
"Request to dump an image with given size onto a block device"), |
|
370 | 376 |
("blockdev_wipe", SINGLE, None, constants.RPC_TMO_SLOW, [ |
371 | 377 |
("bdev", ED_SINGLE_DISK_DICT_DP, None), |
372 | 378 |
("offset", None, None), |
b/lib/server/noded.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011, 2012 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011, 2012, 2014 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
224 | 224 |
return backend.BlockdevPauseResumeSync(disks, pause) |
225 | 225 |
|
226 | 226 |
@staticmethod |
227 |
def perspective_blockdev_image(params): |
|
228 |
"""Image a block device. |
|
229 |
|
|
230 |
""" |
|
231 |
bdev_s, image, size = params |
|
232 |
bdev = objects.Disk.FromDict(bdev_s) |
|
233 |
return backend.BlockdevImage(bdev, image, size) |
|
234 |
|
|
235 |
@staticmethod |
|
227 | 236 |
def perspective_blockdev_wipe(params): |
228 | 237 |
"""Wipe a block device. |
229 | 238 |
|
Also available in: Unified diff