chmod 755 /var/lib/neutron
pkgos_read_admin_creds ${N_CONF} keystone_authtoken neutron
+pkgos_read_config -p high /etc/default/neutron-server NO_SECTION NEUTRON_plugin_path neutron/plugin-select
+
exit 0
pkgos_var_user_group neutron
chmod 755 /var/lib/neutron
+
+ if [ ! -e /etc/default/neutron ] ; then
+ install -D -m 0664 /usr/share/neutron-common/neutron-default /etc/default/neutron
+ fi
+ db_get neutron/plugin-select
+ if [ -n "${RET}" ] ; then
+ pkgos_inifile -shinc set /etc/default/neutron NO_SECTION NEUTRON_plugin_path ${RET}
+ fi
pkgos_write_new_conf neutron api-paste.ini
pkgos_write_new_conf neutron neutron.conf
pkgos_write_admin_creds ${N_CONF} keystone_authtoken neutron
set -e
if [ "${1}" = "purge" ] ; then
+ rm -rf /etc/default/neutron
rm -rf /etc/neutron/api-paste.ini /etc/neutron/neutron.conf
[ -d /etc/neutron ] && rmdir --ignore-fail-on-non-empty /etc/neutron
rm -rf /var/lib/neutron
Type: password
_Description: Authentication server password:
Please specify the password to use with the authentication server.
+
+Template: neutron/plugin-select
+Type: select
+__Choices: brocade/brocade.ini, nicira/nvp.ini, openvswitch/ovs_neutron_plugin.ini, midonet/midonet.ini, nec/nec.ini, mlnx/mlnx_conf.ini, hyperv/hyperv_neutron_plugin.ini, ryu/ryu.ini, ml2/ml2_conf.ini, metaplugin/metaplugin.ini, bigswitch/restproxy.ini, linuxbridge/linuxbridge_conf.ini, cisco/cisco_plugins.ini, plumgrid/plumgrid.ini
+Choices-C: brocade/brocade.ini, nicira/nvp.ini, openvswitch/ovs_neutron_plugin.ini, midonet/midonet.ini, nec/nec.ini, mlnx/mlnx_conf.ini, hyperv/hyperv_neutron_plugin.ini, ryu/ryu.ini, ml2/ml2_conf.ini, metaplugin/metaplugin.ini, bigswitch/restproxy.ini, linuxbridge/linuxbridge_conf.ini, cisco/cisco_plugins.ini, plumgrid/plumgrid.ini
+Default: openvswitch/ovs_neutron_plugin.ini
+_Description: Plugin configuration to load:
+ Neutron uses a plugin architecture to manage networking. When starting the
+ Neutron server daemon, the configuration file corresponding to the plugin you
+ wish to use needs to be loaded. Please select which plugin configuration file
+ should be given as parameter when starting the Neutron server daemon.
+++ /dev/null
-# You should choose one of this configuration file accord the installed backend
-
-# NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/nicira/nvp.ini"
-# NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
-# NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/nec/nec.ini"
-# NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/ryu/ryu.ini"
-# NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
-
-NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
. /lib/lsb/init-functions
-if [ -r /etc/default/neutron-server ] ; then
- . /etc/default/neutron-server
- if [ -n "${NEUTRON_PLUGIN_CONFIG}" ] ; then
+if [ -r /etc/default/neutron ] ; then
+ . /etc/default/neutron
+ if [ -n "${NEUTRON_plugin_path}" ] ; then
+ NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/${NEUTRON_plugin_path}
DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
fi
fi
--- /dev/null
+# Default configuration file for Neutron. Currently only there to be able to
+# select which plugin to use, and configure neutron-server accordingly. You
+# can edit the file if you don't break its (shell script) syntax, or use:
+# dpkg-reconfigure -plow neutron-server
+
+# Select the path to the configuration file for the plugin which you wish to
+# use with Neutron. The path is what's after /etc/neutron/plugins. For example,
+# for using /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini in the
+# command line of the neutron-server, you should only set:
+# openvswitch/ovs_neutron_plugin.ini
+#
+# Possible values are (currently):
+#
+# brocade/brocade.ini
+# nicira/nvp.ini
+# openvswitch/ovs_neutron_plugin.ini
+# midonet/midonet.ini
+# nec/nec.ini
+# mlnx/mlnx_conf.ini
+# hyperv/hyperv_neutron_plugin.ini
+# ryu/ryu.ini
+# ml2/ml2_conf.ini
+# metaplugin/metaplugin.ini
+# bigswitch/restproxy.ini
+# linuxbridge/linuxbridge_conf.ini
+# cisco/cisco_plugins.ini
+# plumgrid/plumgrid.ini
+#
+# If more plugins were to come, then simply editing this file is not enough,
+# the debconf template will need to be edited to add the new value, otherwise
+# this will break on upgrades.
+
+NEUTRON_plugin_path=openvswitch/ovs_neutron_plugin.ini
install -D -m 0640 etc/metadata_agent.ini $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini
sed -i -e 's|^# nova_metadata_ip = 127.0.0.1|nova_metadata_ip = 127.0.0.1|' $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini
+ # Install the default file
+ install -D -m 0640 debian/neutron.mydefault $(CURDIR)/debian/neutron-common/usr/share/neutron-common/neutron-default
+
override_dh_auto_clean:
dh_auto_clean
rm -f neutron/vcsversion.py