NSX|V3: update the nova API with the metadataproxy secret

When using METADATA_PROXY_SHARED_SECRET this will be written to
the nova configuration file.

Change-Id: I3729faafdbd91ef39d015517611fad74f03f9352
This commit is contained in:
Gary Kotton 2016-08-03 05:04:39 -07:00
parent da9ee782b9
commit 1143f6200a
1 changed files with 7 additions and 2 deletions

View File

@ -76,6 +76,13 @@ function neutron_plugin_create_nova_conf {
setup_integration_bridge
iniset $NOVA_CONF neutron ovs_bridge $OVS_BRIDGE
fi
# if n-api is enabled, then setup the metadata_proxy_shared_secret
if is_service_enabled n-api; then
if [[ "$NATIVE_DHCP_METADATA" == "True" ]]; then
iniset $NOVA_CONF neutron metadata_proxy_shared_secret $METADATA_PROXY_SHARED_SECRET
iniset $NOVA_CONF neutron service_metadata_proxy True
fi
fi
}
function neutron_plugin_install_agent_packages {
@ -162,8 +169,6 @@ function neutron_plugin_configure_service {
_nsxv3_ini_set dhcp_profile_uuid $DHCP_PROFILE_UUID
_nsxv3_ini_set metadata_proxy_uuid $METADATA_PROXY_UUID
iniset $NEUTRON_CONF DEFAULT dhcp_agent_notification False
iniset $NEUTRON_META_CONF DEFAULT metadata_proxy_shared_secret $METADATA_PROXY_SHARED_SECRET
iniset $NOVA_CONF neutron service_metadata_proxy True
fi
}