Merge "NSX|V3: configure devstack for native DHCP and metadata support"

This commit is contained in:
Jenkins 2016-07-26 20:59:02 +00:00 committed by Gerrit Code Review
commit b1ec19bd67

View File

@ -30,6 +30,9 @@ NSX_GATEWAY_NETWORK_INTERFACE=${NSX_GATEWAY_NETWORK_INTERFACE:-}
# Override default 'True' in devstack:lib/neutron_plugins/services/l3
Q_USE_PROVIDERNET_FOR_PUBLIC=False
# Native support from platform
NATIVE_DHCP_METADATA=${NATIVE_DHCP_METADATA:-False}
METADATA_PROXY_SHARED_SECRET=${METADATA_PROXY_SHARED_SECRET:-}
# Save trace setting
NSX_XTRACE=$(set +o | grep xtrace)
@ -146,8 +149,13 @@ function neutron_plugin_configure_service {
_nsxv3_ini_set insecure $NSX_INSECURE
_nsxv3_ini_set ca_file $NSX_CA_FILE
_nsxv3_ini_set default_bridge_cluster $DEFAULT_BRIDGE_CLUSTER_UUID
_nsxv3_ini_set dhcp_profile_uuid $DHCP_PROFILE_UUID
_nsxv3_ini_set metadata_proxy_uuid $METADATA_PROXY_UUID
if [[ "$NATIVE_DHCP_METADATA" == "True" ]]; then
_nsxv3_ini_set native_dhcp_metadata $NATIVE_DHCP_METADATA
_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
fi
}
function neutron_plugin_setup_interface_driver {
@ -161,6 +169,17 @@ function neutron_plugin_check_adv_test_requirements {
function init_vmware_nsx_v3 {
if [[ "$NATIVE_DHCP_METADATA" == "True" ]]; then
if ! is_set DHCP_PROFILE_UUID; then
die $LINENO "DHCP profile needs to be configured!"
fi
if ! is_set METADATA_PROXY_UUID; then
die $LINENO "Metadata proxy needs to be configured!"
fi
if is_service_enabled q-dhcp q-meta; then
die $LINENO "Native support does not require DHCP and Metadata agents!"
fi
fi
if ! is_set NSX_GATEWAY_NETWORK_INTERFACE; then
echo "NSX_GATEWAY_NETWORK_INTERFACE not set not configuring routes"
return