The modules in scripts/rpc/*.py should be a generic, reusable library; the printing should be done by the command-line frontend (rpc.py) instead of the library code. Change-Id: Ibeb022a3591f0a140fc43104d8dcf17d7041e48b Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/404426 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
19 lines
468 B
Python
Executable File
19 lines
468 B
Python
Executable File
def start_nbd_disk(args):
|
|
params = {
|
|
'bdev_name': args.bdev_name,
|
|
'nbd_device': args.nbd_device
|
|
}
|
|
return args.client.call('start_nbd_disk', params)
|
|
|
|
|
|
def stop_nbd_disk(args):
|
|
params = {'nbd_device': args.nbd_device}
|
|
return args.client.call('stop_nbd_disk', params)
|
|
|
|
|
|
def get_nbd_disks(args):
|
|
params = {}
|
|
if args.nbd_device:
|
|
params['nbd_device'] = args.nbd_device
|
|
return args.client.call('get_nbd_disks', params)
|