rpc: pass params as **kwargs in virtio_blk_create_transport
This will make it possible for out-of-tree virtio-blk transports to pass their own, transport-specific, set of options. Change-Id: Ic37b7fb09ca74a744c006d032638d02cc3350471 Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12816 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d39963a9da
commit
e661c8e824
@ -1,4 +1,5 @@
|
||||
from .helpers import deprecated_alias
|
||||
from .cmd_parser import *
|
||||
|
||||
|
||||
def vhost_controller_set_coalescing(client, ctrlr, delay_base_us, iops_threshold):
|
||||
@ -16,12 +17,14 @@ def vhost_controller_set_coalescing(client, ctrlr, delay_base_us, iops_threshold
|
||||
return client.call('vhost_controller_set_coalescing', params)
|
||||
|
||||
|
||||
def virtio_blk_create_transport(client, name):
|
||||
def virtio_blk_create_transport(client, **params):
|
||||
"""Create virtio blk transport.
|
||||
Args:
|
||||
name: transport name
|
||||
"""
|
||||
params = {'name': name}
|
||||
strip_globals(params)
|
||||
remove_null(params)
|
||||
|
||||
return client.call('virtio_blk_create_transport', params)
|
||||
|
||||
|
||||
|
@ -2412,8 +2412,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
p.set_defaults(func=vhost_controller_set_coalescing)
|
||||
|
||||
def virtio_blk_create_transport(args):
|
||||
rpc.vhost.virtio_blk_create_transport(args.client,
|
||||
name=args.name)
|
||||
rpc.vhost.virtio_blk_create_transport(**vars(args))
|
||||
|
||||
p = subparsers.add_parser('virtio_blk_create_transport',
|
||||
help='Create virtio blk transport')
|
||||
|
Loading…
Reference in New Issue
Block a user