test/iscsi: In ip_migration.sh, eliminate rpc_config function
Two line function called from one spot. Simpler to inline it. Signed-off-by: Ben Walker <benjamin.walker@intel.com> Change-Id: I82818945a672b8c5603f45b6f2b4f072ff2098e1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4301 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
e8c7327533
commit
c8a5b48c44
@ -24,13 +24,6 @@ function kill_all_iscsi_target() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function rpc_config() {
|
|
||||||
# $1 = RPC server address
|
|
||||||
# $2 = Netmask
|
|
||||||
$rpc_py -s $1 iscsi_create_initiator_group $INITIATOR_TAG $INITIATOR_NAME $2
|
|
||||||
$rpc_py -s $1 bdev_malloc_create 64 512
|
|
||||||
}
|
|
||||||
|
|
||||||
function rpc_validate_ip() {
|
function rpc_validate_ip() {
|
||||||
# Always delete the IP first in case it is there already
|
# Always delete the IP first in case it is there already
|
||||||
cmd="$rpc_py -s $1 net_interface_delete_ip_address 1 $MIGRATION_ADDRESS"
|
cmd="$rpc_py -s $1 net_interface_delete_ip_address 1 $MIGRATION_ADDRESS"
|
||||||
@ -89,9 +82,10 @@ function iscsi_tgt_start() {
|
|||||||
$rpc_py -s $1 framework_start_init
|
$rpc_py -s $1 framework_start_init
|
||||||
echo "iscsi_tgt is listening. Running tests..."
|
echo "iscsi_tgt is listening. Running tests..."
|
||||||
|
|
||||||
rpc_config $1 $NETMASK
|
$rpc_py -s $1 iscsi_create_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||||
trap 'kill_all_iscsi_target; iscsitestfini; exit 1' \
|
$rpc_py -s $1 bdev_malloc_create 64 512
|
||||||
SIGINT SIGTERM EXIT
|
|
||||||
|
trap 'kill_all_iscsi_target; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Running ip migration tests"
|
echo "Running ip migration tests"
|
||||||
|
Loading…
Reference in New Issue
Block a user