Merge "Add network_config_hook interface to run-os-net-config.sh"

This commit is contained in:
Jenkins 2016-12-23 11:16:44 +00:00 committed by Gerrit Code Review
commit 3de4f828b4
1 changed files with 6 additions and 0 deletions

View File

@ -113,11 +113,17 @@ if [ -n '$network_config' ]; then
mkdir -p /etc/os-net-config
# Note these variables come from the calling heat SoftwareConfig
echo '$network_config' > /etc/os-net-config/config.json
if [ "$(type -t network_config_hook)" = "function" ]; then
network_config_hook
fi
sed -i "s/bridge_name/${bridge_name:-''}/" /etc/os-net-config/config.json
sed -i "s/interface_name/${interface_name:-''}/" /etc/os-net-config/config.json
os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
RETVAL=$?
if [[ $RETVAL == 2 ]]; then
ping_metadata_ip