test/iscsi: In ip_migration.sh, use 'ip' to add and remove IP addresses
This eliminates the only known use of the net_interface_* RPCs. These RPCs are also undocumented. Change-Id: I92e2dd9ebd59a80518aed5a77aa7f3ccf0371c9a Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4304 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
2c379bdabf
commit
2d03b8ac44
@ -10,9 +10,6 @@ iscsitestinit
|
||||
rpc_py="$rootdir/scripts/rpc.py"
|
||||
fio_py="$rootdir/scripts/fio.py"
|
||||
|
||||
# Namespaces are NOT used here on purpose. This test requires changes to detect
|
||||
# ifc_index for interface that was put into namespace. Needed for net_interface_add_ip_address.
|
||||
# Reset ISCSI_APP[] to use only the plain app for this test without TARGET_NS_CMD preset.
|
||||
source "$rootdir/test/common/applications.sh"
|
||||
NETMASK=127.0.0.0/24
|
||||
MIGRATION_ADDRESS=127.0.0.2
|
||||
@ -25,10 +22,10 @@ function kill_all_iscsi_target() {
|
||||
}
|
||||
|
||||
function rpc_add_target_node() {
|
||||
$rpc_py -s $1 net_interface_add_ip_address 1 $MIGRATION_ADDRESS
|
||||
"${TARGET_NS_CMD[@]}" ip addr add $MIGRATION_ADDRESS/24 dev $TARGET_INTERFACE
|
||||
$rpc_py -s $1 iscsi_create_portal_group $PORTAL_TAG $MIGRATION_ADDRESS:$ISCSI_PORT
|
||||
$rpc_py -s $1 iscsi_create_target_node target1 target1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 64 -d
|
||||
$rpc_py -s $1 net_interface_delete_ip_address 1 $MIGRATION_ADDRESS
|
||||
"${TARGET_NS_CMD[@]}" ip addr del $MIGRATION_ADDRESS/24 dev $TARGET_INTERFACE
|
||||
}
|
||||
|
||||
function iscsi_tgt_start() {
|
||||
|
Loading…
Reference in New Issue
Block a user