Commit 44626532 authored by Karol Latecki's avatar Karol Latecki Committed by Jim Harris
Browse files

scripts/rpc: change construct_crypto_bdevs args to positional



Arguments for this function were added as optional arguments
and were listed as such by argparse when using rpc.py --help.

This is confusing as all of these arguments are obligatory
in order to create a crypto bdev in SPDK configuration.

Change-Id: I7c31413314f28e44ee008d3d7c28759063700b61
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460968


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarVitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 99b25f1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ may cause problems in some use cases.

Example command

`rpc.py construct_crypto_bdev -b NVMe1n1 -c CryNvmeA -d crypto_aesni_mb -k 0123456789123456`
`rpc.py construct_crypto_bdev NVMe1n1 CryNvmeA crypto_aesni_mb 0123456789123456`

This command will create a crypto vbdev called 'CryNvmeA' on top of the NVMe bdev
'NVMe1n1' and will use the DPDK software driver 'crypto_aesni_mb' and the key
+4 −4
Original line number Diff line number Diff line
@@ -169,10 +169,10 @@ if __name__ == "__main__":
                                                  key=args.key))
    p = subparsers.add_parser('construct_crypto_bdev',
                              help='Add a crypto vbdev')
    p.add_argument('-b', '--base_bdev_name', help="Name of the base bdev")
    p.add_argument('-c', '--name', help="Name of the crypto vbdev")
    p.add_argument('-d', '--crypto_pmd', help="Name of the crypto device driver")
    p.add_argument('-k', '--key', help="Key")
    p.add_argument('base_bdev_name', help="Name of the base bdev")
    p.add_argument('name', help="Name of the crypto vbdev")
    p.add_argument('crypto_pmd', help="Name of the crypto device driver")
    p.add_argument('key', help="Key")
    p.set_defaults(func=construct_crypto_bdev)

    def delete_crypto_bdev(args):
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ function create_bdev_subsystem_config() {
			local crypto_dirver=crypto_qat
		fi

		tgt_rpc construct_crypto_bdev -b MallocForCryptoBdev -c CryptoMallocBdev -d $crypto_dirver -k 0123456789123456
		tgt_rpc construct_crypto_bdev MallocForCryptoBdev CryptoMallocBdev $crypto_dirver 0123456789123456
		expected_notifications+=(
			bdev_register:MallocForCryptoBdev
			bdev_register:CryptoMallocBdev