diff --git a/python/spdk/rpc/vhost.py b/python/spdk/rpc/vhost.py index 3dc7cbe19..d36c05b16 100644 --- a/python/spdk/rpc/vhost.py +++ b/python/spdk/rpc/vhost.py @@ -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) diff --git a/scripts/rpc.py b/scripts/rpc.py index c35b1a556..13c369d1d 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -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')