[CI] Fix devstack hooks to unblock CI
Logic of share-network creation was dependent on presense of "JOB_NAME" env var. And it is unavailable now. Moreover, we do not really need to depend on it. Therefore, remove dependency on it and assume we always run CI without nova-network enabled. Change-Id: Ic03e2166101a4deb13e8a8545d2fb2506454a20a Closes-Bug: #1595160
This commit is contained in:
parent
02c731691d
commit
6e15683539
@ -57,22 +57,16 @@ USE_SHARE_NETWORK=$(trueorfalse True USE_SHARE_NETWORK)
|
||||
if [[ ${USE_SHARE_NETWORK} = True ]]; then
|
||||
SHARE_NETWORK_NAME=${SHARE_NETWORK_NAME:-ci}
|
||||
|
||||
if [[ "$JOB_NAME" =~ "neutron" ]]; then
|
||||
DEFAULT_NEUTRON_NET=$(neutron net-show private -c id -f value)
|
||||
DEFAULT_NEUTRON_SUBNET=$(neutron subnet-show private-subnet -c id -f value)
|
||||
NEUTRON_NET=${NEUTRON_NET:-$DEFAULT_NEUTRON_NET}
|
||||
NEUTRON_SUBNET=${NEUTRON_SUBNET:-$DEFAULT_NEUTRON_SUBNET}
|
||||
manila share-network-create \
|
||||
--name $SHARE_NETWORK_NAME \
|
||||
--neutron-net $NEUTRON_NET \
|
||||
--neutron-subnet $NEUTRON_SUBNET
|
||||
else
|
||||
DEFAULT_NOVA_NET=$(nova net-list | grep private | awk '{print $2}')
|
||||
NOVA_NET=${NOVA_NET:-$DEFAULT_NOVA_NET}
|
||||
manila share-network-create \
|
||||
--name $SHARE_NETWORK_NAME \
|
||||
--nova-net $NOVA_NET
|
||||
fi
|
||||
DEFAULT_NEUTRON_NET=$(neutron net-show private -c id -f value)
|
||||
DEFAULT_NEUTRON_SUBNET=$(neutron subnet-show private-subnet -c id -f value)
|
||||
NEUTRON_NET=${NEUTRON_NET:-$DEFAULT_NEUTRON_NET}
|
||||
NEUTRON_SUBNET=${NEUTRON_SUBNET:-$DEFAULT_NEUTRON_SUBNET}
|
||||
|
||||
manila share-network-create \
|
||||
--name $SHARE_NETWORK_NAME \
|
||||
--neutron-net $NEUTRON_NET \
|
||||
--neutron-subnet $NEUTRON_SUBNET
|
||||
|
||||
iniset $MANILACLIENT_CONF DEFAULT share_network $SHARE_NETWORK_NAME
|
||||
iniset $MANILACLIENT_CONF DEFAULT admin_share_network $SHARE_NETWORK_NAME
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user