Merge "lib/neutron: allow to add more ml2 extension drivers"
This commit is contained in:
commit
cd69b52c7f
23
lib/neutron
23
lib/neutron
@ -171,7 +171,7 @@ function configure_neutron_new {
|
||||
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_vxlan vni_ranges 1001:2000
|
||||
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_flat flat_networks public
|
||||
if [[ "$NEUTRON_PORT_SECURITY" = "True" ]]; then
|
||||
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 extension_drivers port_security
|
||||
neutron_ml2_extension_driver_add port_security
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -489,6 +489,18 @@ function neutron_service_plugin_class_add_new {
|
||||
iniset $NEUTRON_CONF DEFAULT service_plugins $plugins
|
||||
}
|
||||
|
||||
function _neutron_ml2_extension_driver_add {
|
||||
local driver=$1
|
||||
local drivers=""
|
||||
|
||||
drivers=$(iniget $NEUTRON_CORE_PLUGIN_CONF ml2 extension_drivers)
|
||||
if [ $drivers ]; then
|
||||
drivers+=","
|
||||
fi
|
||||
drivers+="${driver}"
|
||||
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 extension_drivers $drivers
|
||||
}
|
||||
|
||||
function neutron_server_config_add_new {
|
||||
_NEUTRON_SERVER_EXTRA_CONF_FILES_ABS+=($1)
|
||||
}
|
||||
@ -561,6 +573,15 @@ function neutron_service_plugin_class_add {
|
||||
fi
|
||||
}
|
||||
|
||||
function neutron_ml2_extension_driver_add {
|
||||
if is_neutron_legacy_enabled; then
|
||||
# Call back to old function
|
||||
_neutron_ml2_extension_driver_add_old "$@"
|
||||
else
|
||||
_neutron_ml2_extension_driver_add "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
function install_neutron_agent_packages {
|
||||
if is_neutron_legacy_enabled; then
|
||||
# Call back to old function
|
||||
|
@ -870,6 +870,16 @@ function _neutron_service_plugin_class_add {
|
||||
fi
|
||||
}
|
||||
|
||||
# _neutron_ml2_extension_driver_add_old() - add ML2 extension driver
|
||||
function _neutron_ml2_extension_driver_add_old {
|
||||
local extension=$1
|
||||
if [[ $Q_ML2_PLUGIN_EXT_DRIVERS == '' ]]; then
|
||||
Q_ML2_PLUGIN_EXT_DRIVERS=$extension
|
||||
elif [[ ! ,${Q_ML2_PLUGIN_EXT_DRIVERS}, =~ ,${extension}, ]]; then
|
||||
Q_ML2_PLUGIN_EXT_DRIVERS="$Q_ML2_PLUGIN_EXT_DRIVERS,$extension"
|
||||
fi
|
||||
}
|
||||
|
||||
# mutnauq_server_config_add() - add server config file
|
||||
function mutnauq_server_config_add {
|
||||
_Q_PLUGIN_EXTRA_CONF_FILES_ABS+=($1)
|
||||
|
Loading…
Reference in New Issue
Block a user