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:
James Slagle 2017-01-25 09:57:18 -05:00
parent b1dfcb9d29
commit 3f6a345d70
2 changed files with 9 additions and 19 deletions

View File

@ -73,24 +73,15 @@ if [ "$net_create" -eq "1" ]; then
neutron net-delete ctlplane neutron net-delete ctlplane
fi fi
NETWORK_JSON=$(mktemp) neutron net-create ctlplane \
NETWORK_JSON_DATA='{"physical":{}}' --provider:network_type flat \
NETWORK_JSON_DATA=$(jq '.physical = .physical + { --provider:physical_network ctlplane
"gateway": "'$NETWORK_GATEWAY'",
"metadata_server": "'$UNDERCLOUD_IP'", neutron subnet-create --name ctlplane-subnet \
"cidr": "'$NETWORK_CIDR'", --allocation-pool start=$DHCP_START,end=$DHCP_END \
"allocation_start": "'$DHCP_START'", --gateway $NETWORK_GATEWAY \
"allocation_end": "'$DHCP_END'", --host-route destination=169.254.169.254/32,nexthop=$METADATA_SERVER \
"name": "'$PHYSICAL_NETWORK'", ctlplane $NETWORK_CIDR
}' <<< $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
fi fi
# Disable nova quotas # Disable nova quotas

View File

@ -6,6 +6,5 @@ oslo.config
psutil>=1.1.1,<2.0.0 psutil>=1.1.1,<2.0.0
netaddr>=0.7.12,!=0.7.16 netaddr>=0.7.12,!=0.7.16
pystache pystache
os-cloud-config
os-refresh-config os-refresh-config
os-apply-config os-apply-config