Fix errors in tools/ping_neutron.sh
Due to errors in tools/ping_neutron.sh, exercise neutron-adv-test.sh fails. Faults were: 'neutron net-list' took too much arguments and variable REMAINING_ARGS was mistyped. Change-Id: I681328bfb1e4445543ef9d94e3b3824dbc9c8346 Closes-Bug: #1478021
This commit is contained in:
parent
c90656a4a3
commit
aa81e2ea73
@ -51,15 +51,15 @@ if [[ -z "$NET_NAME" ]]; then
|
|||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REMANING_ARGS="${@:2}"
|
REMAINING_ARGS="${@:2}"
|
||||||
|
|
||||||
# BUG: with duplicate network names, this fails pretty hard.
|
# BUG: with duplicate network names, this fails pretty hard.
|
||||||
NET_ID=$(neutron net-list $NET_NAME | grep "$NET_NAME" | awk '{print $2}')
|
NET_ID=$(neutron net-list | grep "$NET_NAME" | awk '{print $2}')
|
||||||
PROBE_ID=$(neutron-debug probe-list -c id -c network_id | grep "$NET_ID" | awk '{print $2}' | head -n 1)
|
PROBE_ID=$(neutron-debug probe-list -c id -c network_id | grep "$NET_ID" | awk '{print $2}' | head -n 1)
|
||||||
|
|
||||||
# This runs a command inside the specific netns
|
# This runs a command inside the specific netns
|
||||||
NET_NS_CMD="ip netns exec qprobe-$PROBE_ID"
|
NET_NS_CMD="ip netns exec qprobe-$PROBE_ID"
|
||||||
|
|
||||||
PING_CMD="sudo $NET_NS_CMD ping $REMAING_ARGS"
|
PING_CMD="sudo $NET_NS_CMD ping $REMAINING_ARGS"
|
||||||
echo "Running $PING_CMD"
|
echo "Running $PING_CMD"
|
||||||
$PING_CMD
|
$PING_CMD
|
||||||
|
Loading…
Reference in New Issue
Block a user