test/iscsi_tgt: Port CHAP to JSON RPC in Calsoft test

Use JSON RPC instead of config file to configure CHAP secret.

Change-Id: Iecaa3eed00fd1b0c25d46693c4ebc04973970f6f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/433205
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2018-11-15 10:34:03 +09:00 committed by Ben Walker
parent 78a45b3f45
commit cd209dbbaf
2 changed files with 1 additions and 5 deletions

View File

@ -1,3 +0,0 @@
[AuthGroup1]
Comment "Auth Group1"
Auth "root" "tester"

View File

@ -6,7 +6,6 @@ source $rootdir/test/iscsi_tgt/common.sh
delete_tmp_conf_files() {
rm -f /usr/local/etc/its.conf
rm -f /usr/local/etc/auth.conf
}
if [ ! -d /usr/local/calsoft ]; then
@ -25,7 +24,6 @@ calsoft_py="$testdir/calsoft.py"
# Copy the calsoft config file to /usr/local/etc
mkdir -p /usr/local/etc
cp $testdir/its.conf /usr/local/etc/
cp $testdir/auth.conf /usr/local/etc/
# Append target ip to calsoft config
echo "IP=$TARGET_IP" >> /usr/local/etc/its.conf
@ -45,6 +43,7 @@ echo "iscsi_tgt is listening. Running tests..."
timing_exit start_iscsi_tgt
$rpc_py add_iscsi_auth_group 1 -c 'user:root secret:tester'
$rpc_py add_portal_group $PORTAL_TAG $TARGET_IP:$ISCSI_PORT
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
$rpc_py construct_malloc_bdev -b MyBdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE