devstack/lib/neutron_plugins/services/firewall
Jerry Zhao 8eab6ad31b make fwaas plugin and driver configurable
user can pass fwaas plugin and driver from localrc

Change-Id: Id956d4d7e62ba81f77319c199c9cb9f354b13d12
2016-02-01 18:22:21 -08:00

34 lines
1.0 KiB
Bash

#!/bin/bash
# Neutron firewall plugin
# ---------------------------
# Save trace setting
_XTRACE_NEUTRON_FIREWALL=$(set +o | grep xtrace)
set +o xtrace
FWAAS_PLUGIN=${FWAAS_PLUGIN:-neutron_fwaas.services.firewall.fwaas_plugin.FirewallPlugin}
FWAAS_DRIVER=${FWAAS_DRIVER:-neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver}
function neutron_fwaas_configure_common {
_neutron_service_plugin_class_add $FWAAS_PLUGIN
}
function neutron_fwaas_configure_driver {
# Uses oslo config generator to generate FWaaS sample configuration files
(cd $NEUTRON_FWAAS_DIR && exec ./tools/generate_config_file_samples.sh)
FWAAS_DRIVER_CONF_FILENAME=/etc/neutron/fwaas_driver.ini
cp $NEUTRON_FWAAS_DIR/etc/fwaas_driver.ini.sample $FWAAS_DRIVER_CONF_FILENAME
iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas enabled True
iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas driver "$FWAAS_DRIVER"
}
function neutron_fwaas_stop {
:
}
# Restore xtrace
$_XTRACE_NEUTRON_FIREWALL