Commit efd4bb5a authored by David Johnson's avatar David Johnson

Support floating IPs via new-style pluggable ipamallocationpools.

(We still seed the old ipallocationpool table, for now.)
parent 7710a219
......@@ -1557,6 +1557,21 @@ if [ -z "${NEUTRON_NETWORKS_DONE}" ]; then
| mysql --password=${DB_ROOT_PASS} neutron
done
# Support newer pluggable ipamallocationpools, too.
if [ $OSVERSION -ge $OSNEWTON ]; then
IPAMSID=`echo "select id from ipamsubnets where neutron_subnet_id='$SID'" | mysql -N --password=$NEUTRON_DBPASS neutron`
if [ -z "$IPAMSID" ]; then
echo "WARNING: could not find ipamsubnetid from ipamsubnets post-Newton!"
else
echo "delete from ipamallocationpools where subnet_id='$IPAMSID'" \
| mysql --password=${DB_ROOT_PASS} neutron
for ip in $PUBLICADDRS ; do
echo "insert into ipamallocationpools values (UUID(),'$IPAMSID','$ip','$ip')" \
| mysql --password=${DB_ROOT_PASS} neutron
done
fi
fi
echo "NEUTRON_NETWORKS_DONE=\"${NEUTRON_NETWORKS_DONE}\"" >> $SETTINGS
logtend "neutron-network-ext-float"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment