scripts/rpc.py: fix construct_aio_bdev block_size param

Block size is supposed to be optional, but it was missing the nargs
setting that makes positional parameters actually optional.

Change-Id: I8324caa956d8eaecd3ce207c9296151512b6ebea
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411942
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2018-05-21 13:28:47 -07:00 committed by Jim Harris
parent 4a534344ee
commit b5f3213864

View File

@ -135,7 +135,7 @@ if __name__ == "__main__":
help='Add a bdev with aio backend')
p.add_argument('filename', help='Path to device or file (ex: /dev/sda)')
p.add_argument('name', help='Block device name')
p.add_argument('block_size', help='Block size for this bdev', type=int, default=argparse.SUPPRESS)
p.add_argument('block_size', help='Block size for this bdev', type=int, nargs='?', default=0)
p.set_defaults(func=construct_aio_bdev)
@call_cmd