Commit 211cb4c2 authored by Jim Harris's avatar Jim Harris
Browse files

test: don't call python explicitly



We use python3 now, not python.  This is important
because in next patch we will use a new 'aliases'
keyword argument in the argparse API that's only
available in Python 3.

While here, clean up some documentation that was
instructing users to call python explicitly instead
of just invoking scripts/rpc.py directly.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I0c11e131cd56f7c994aa8fe21b4b00ae33489fdd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453460


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 70e3aac3
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ In addition to the configuration file, the iSCSI target may also be configured v
 - get_portal_groups -- Show information about all available portal groups.

~~~
python /path/to/spdk/scripts/rpc.py add_portal_group 1 10.0.0.1:3260
/path/to/spdk/scripts/rpc.py add_portal_group 1 10.0.0.1:3260
~~~

### Initiator groups
@@ -98,7 +98,7 @@ python /path/to/spdk/scripts/rpc.py add_portal_group 1 10.0.0.1:3260
 - get_initiator_groups -- Show information about all available initiator groups.

~~~
python /path/to/spdk/scripts/rpc.py add_initiator_group 2 ANY 10.0.0.2/32
/path/to/spdk/scripts/rpc.py add_initiator_group 2 ANY 10.0.0.2/32
~~~

### Target nodes
@@ -109,7 +109,7 @@ python /path/to/spdk/scripts/rpc.py add_initiator_group 2 ANY 10.0.0.2/32
 - get_target_nodes -- Show information about all available iSCSI target nodes.

~~~
python /path/to/spdk/scripts/rpc.py construct_target_node Target3 Target3_alias MyBdev:0 1:2 64 -d
/path/to/spdk/scripts/rpc.py construct_target_node Target3 Target3_alias MyBdev:0 1:2 64 -d
~~~

## Configuring iSCSI Initiator {#iscsi_initiator}
@@ -233,27 +233,27 @@ $ ./app/iscsi_tgt/iscsi_tgt
Construct two 64MB Malloc block devices with 512B sector size "Malloc0" and "Malloc1":

```
$ python ./scripts/rpc.py construct_malloc_bdev -b Malloc0 64 512
$ python ./scripts/rpc.py construct_malloc_bdev -b Malloc1 64 512
$ ./scripts/rpc.py construct_malloc_bdev -b Malloc0 64 512
$ ./scripts/rpc.py construct_malloc_bdev -b Malloc1 64 512
```

Create new portal group with id 1, and address 10.0.0.1:3260:

```
$ python ./scripts/rpc.py add_portal_group 1 10.0.0.1:3260
$ ./scripts/rpc.py add_portal_group 1 10.0.0.1:3260
```

Create one initiator group with id 2 to accept any connection from 10.0.0.2/32:

```
$ python ./scripts/rpc.py add_initiator_group 2 ANY 10.0.0.2/32
$ ./scripts/rpc.py add_initiator_group 2 ANY 10.0.0.2/32
```

Finally construct one target using previously created bdevs as LUN0 (Malloc0) and LUN1 (Malloc1)
with a name "disk1" and alias "Data Disk1" using portal group 1 and initiator group 2.

```
$ python ./scripts/rpc.py construct_target_node disk1 "Data Disk1" "Malloc0:0 Malloc1:1" 1:2 64 -d
$ ./scripts/rpc.py construct_target_node disk1 "Data Disk1" "Malloc0:0 Malloc1:1" 1:2 64 -d
```

#### Configure initiator
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
rpc_py="python $rootdir/scripts/rpc.py"
rpc_py="$rootdir/scripts/rpc.py"
set -e

timing_enter blob_bdev_io_wait
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ function ssh_initiator(){
}

NETMASK=$INITIATOR_IP/32
rpc_py="python $rootdir/scripts/rpc.py -s $testdir/rpc_iscsi.sock"
rpc_py="$rootdir/scripts/rpc.py -s $testdir/rpc_iscsi.sock"
iscsi_fio_results="$testdir/perf_output/iscsi_fio.json"
rm -rf $iscsi_fio_results
mkdir -p $testdir/perf_output
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ source $rootdir/test/nvmf/common.sh
NULL_BDEV_SIZE=102400
NULL_BLOCK_SIZE=512

rpc_py="python $rootdir/scripts/rpc.py"
rpc_py="$rootdir/scripts/rpc.py"

set -e

+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=128
MALLOC_BLOCK_SIZE=512

rpc_py="python $rootdir/scripts/rpc.py"
rpc_py="$rootdir/scripts/rpc.py"

set -e

Loading