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:
parent
78a45b3f45
commit
cd209dbbaf
@ -1,3 +0,0 @@
|
|||||||
[AuthGroup1]
|
|
||||||
Comment "Auth Group1"
|
|
||||||
Auth "root" "tester"
|
|
@ -6,7 +6,6 @@ source $rootdir/test/iscsi_tgt/common.sh
|
|||||||
|
|
||||||
delete_tmp_conf_files() {
|
delete_tmp_conf_files() {
|
||||||
rm -f /usr/local/etc/its.conf
|
rm -f /usr/local/etc/its.conf
|
||||||
rm -f /usr/local/etc/auth.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -d /usr/local/calsoft ]; then
|
if [ ! -d /usr/local/calsoft ]; then
|
||||||
@ -25,7 +24,6 @@ calsoft_py="$testdir/calsoft.py"
|
|||||||
# Copy the calsoft config file to /usr/local/etc
|
# Copy the calsoft config file to /usr/local/etc
|
||||||
mkdir -p /usr/local/etc
|
mkdir -p /usr/local/etc
|
||||||
cp $testdir/its.conf /usr/local/etc/
|
cp $testdir/its.conf /usr/local/etc/
|
||||||
cp $testdir/auth.conf /usr/local/etc/
|
|
||||||
|
|
||||||
# Append target ip to calsoft config
|
# Append target ip to calsoft config
|
||||||
echo "IP=$TARGET_IP" >> /usr/local/etc/its.conf
|
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
|
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_portal_group $PORTAL_TAG $TARGET_IP:$ISCSI_PORT
|
||||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||||
$rpc_py construct_malloc_bdev -b MyBdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
$rpc_py construct_malloc_bdev -b MyBdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||||
|
Loading…
Reference in New Issue
Block a user