Remove setup-neutron
We don't really need to use setup-neutron from os-cloud-config to create the ctlplane network and subnet. As simple as they are, it's more straightforward and clear to just use neutron commands directly. This removes all depedencies on os-cloud-config from instack-undercloud so we can remove that requirement from requirements.txt (and moves us closer to deprecating that entire repo). Change-Id: I88a4359884429f85f1ef356d50abb0bf664a5540
This commit is contained in:
parent
b1dfcb9d29
commit
3f6a345d70
@ -73,24 +73,15 @@ if [ "$net_create" -eq "1" ]; then
|
||||
neutron net-delete ctlplane
|
||||
fi
|
||||
|
||||
NETWORK_JSON=$(mktemp)
|
||||
NETWORK_JSON_DATA='{"physical":{}}'
|
||||
NETWORK_JSON_DATA=$(jq '.physical = .physical + {
|
||||
"gateway": "'$NETWORK_GATEWAY'",
|
||||
"metadata_server": "'$UNDERCLOUD_IP'",
|
||||
"cidr": "'$NETWORK_CIDR'",
|
||||
"allocation_start": "'$DHCP_START'",
|
||||
"allocation_end": "'$DHCP_END'",
|
||||
"name": "'$PHYSICAL_NETWORK'",
|
||||
}' <<< $NETWORK_JSON_DATA)
|
||||
if [ -n "${UNDERCLOUD_NAMESERVER:-}" ]; then
|
||||
NETWORK_JSON_DATA=$(jq '.physical = .physical + {
|
||||
"nameserver": "'$UNDERCLOUD_NAMESERVER'",
|
||||
}' <<< $NETWORK_JSON_DATA)
|
||||
fi
|
||||
jq . > $NETWORK_JSON <<< $NETWORK_JSON_DATA
|
||||
setup-neutron -n $NETWORK_JSON
|
||||
rm $NETWORK_JSON
|
||||
neutron net-create ctlplane \
|
||||
--provider:network_type flat \
|
||||
--provider:physical_network ctlplane
|
||||
|
||||
neutron subnet-create --name ctlplane-subnet \
|
||||
--allocation-pool start=$DHCP_START,end=$DHCP_END \
|
||||
--gateway $NETWORK_GATEWAY \
|
||||
--host-route destination=169.254.169.254/32,nexthop=$METADATA_SERVER \
|
||||
ctlplane $NETWORK_CIDR
|
||||
fi
|
||||
|
||||
# Disable nova quotas
|
||||
|
@ -6,6 +6,5 @@ oslo.config
|
||||
psutil>=1.1.1,<2.0.0
|
||||
netaddr>=0.7.12,!=0.7.16
|
||||
pystache
|
||||
os-cloud-config
|
||||
os-refresh-config
|
||||
os-apply-config
|
||||
|
Loading…
Reference in New Issue
Block a user