scripts/rpc.py: fix missing argument for bdev_ftl_unload

There is an error:
./scripts/rpc.py bdev_ftl_unload -b ftl0
Traceback (most recent call last):
  File "./scripts/rpc.py", line 3290, in <module>
    call_rpc_func(args)
  File "./scripts/rpc.py", line 3191, in call_rpc_func
    args.func(args)
  File "./scripts/rpc.py", line 2124, in bdev_ftl_unload
    print_dict(rpc.bdev.bdev_ftl_unload(args.client, name=args.name))
TypeError: bdev_ftl_unload() missing 1 required positional argument: 'fast_shutdown'

Change-Id: I3adf213d5aa8b97dee9a1e1b2db74a162fc0b760
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16177
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
This commit is contained in:
Hailiang Wang 2023-01-09 09:33:08 -05:00 committed by Tomasz Zawadzki
parent 935721bb1e
commit cec20de824
2 changed files with 3 additions and 2 deletions

View File

@ -1460,7 +1460,8 @@ def bdev_ftl_unload(client, name, fast_shutdown):
Args:
name: name of the bdev
"""
params = {'name': name}
params = {'name': name,
'fast_shutdown': fast_shutdown}
return client.call('bdev_ftl_unload', params)

View File

@ -2144,7 +2144,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.set_defaults(func=bdev_ftl_load)
def bdev_ftl_unload(args):
print_dict(rpc.bdev.bdev_ftl_unload(args.client, name=args.name))
print_dict(rpc.bdev.bdev_ftl_unload(args.client, name=args.name, fast_shutdown=args.fast_shutdown))
p = subparsers.add_parser('bdev_ftl_unload', help='Unload FTL bdev')
p.add_argument('-b', '--name', help="Name of the bdev", required=True)