Neutron: use "OSC show -f value -c id" instead of "OSC list + grep"
We should leverage server-side filtering. Change-Id: I3deef791868769b0b7cfc405d73dff57458ca427
This commit is contained in:
parent
1493bdeba2
commit
d038b60e65
@ -156,7 +156,7 @@ function get_role_id {
|
||||
function get_network_id {
|
||||
local NETWORK_NAME="$1"
|
||||
local NETWORK_ID
|
||||
NETWORK_ID=`openstack network list | grep $NETWORK_NAME | awk '{print $2}'`
|
||||
NETWORK_ID=`openstack network show -f value -c id $NETWORK_NAME`
|
||||
echo $NETWORK_ID
|
||||
}
|
||||
|
||||
|
@ -242,8 +242,7 @@ function configure_tempest {
|
||||
# the public network (for floating ip access) is only available
|
||||
# if the extension is enabled.
|
||||
if is_networking_extension_supported 'external-net'; then
|
||||
public_network_id=$(openstack network list | grep $PUBLIC_NETWORK_NAME | \
|
||||
awk '{print $2}')
|
||||
public_network_id=$(openstack network show -f value -c id $PUBLIC_NETWORK_NAME)
|
||||
fi
|
||||
|
||||
iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG
|
||||
|
@ -54,7 +54,7 @@ fi
|
||||
REMAINING_ARGS="${@:2}"
|
||||
|
||||
# BUG: with duplicate network names, this fails pretty hard.
|
||||
NET_ID=$(openstack network list | grep "$NET_NAME" | awk '{print $2}')
|
||||
NET_ID=$(openstack network show -f value -c id "$NET_NAME")
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user