Split client out of the args object and pass it as the first parameter to all RPC methods instead. This is a step toward decoupling the rpc/*.py interface from the argparse front end. Change-Id: Ib030862e0c79112e5c9acdde295d68983126a987 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/405502 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
477 B
Python
Executable File
19 lines
477 B
Python
Executable File
def start_nbd_disk(client, args):
|
|
params = {
|
|
'bdev_name': args.bdev_name,
|
|
'nbd_device': args.nbd_device
|
|
}
|
|
return client.call('start_nbd_disk', params)
|
|
|
|
|
|
def stop_nbd_disk(client, args):
|
|
params = {'nbd_device': args.nbd_device}
|
|
return client.call('stop_nbd_disk', params)
|
|
|
|
|
|
def get_nbd_disks(client, args):
|
|
params = {}
|
|
if args.nbd_device:
|
|
params['nbd_device'] = args.nbd_device
|
|
return client.call('get_nbd_disks', params)
|