Daniel Verkamp 85f316b183 scripts/rpc.py: pass named args to nbd.py
Change-Id: I4703c813d80b805c7b747fc5ee8bc91ef3e20717
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405506
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>
2018-03-30 16:48:47 -04:00

19 lines
486 B
Python
Executable File

def start_nbd_disk(client, bdev_name, nbd_device):
params = {
'bdev_name': bdev_name,
'nbd_device': nbd_device
}
return client.call('start_nbd_disk', params)
def stop_nbd_disk(client, nbd_device):
params = {'nbd_device': nbd_device}
return client.call('stop_nbd_disk', params)
def get_nbd_disks(client, nbd_device=None):
params = {}
if nbd_device:
params['nbd_device'] = nbd_device
return client.call('get_nbd_disks', params)