0b0aafa062
Most of the agent config files, except for the one used by OVN metadata agent, does not contain the neutron_ prefix (metadata_agent.ini or metering_atent.ini for example). The prefix is redundant because the config files are usually created in the /etc/neutron directory. Change-Id: Ibff6ab20e7309873cb7dd241264b4694646c52c1
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
# Settings for the VPNaaS devstack plugin
|
|
|
|
# Plugin
|
|
if [[ $Q_AGENT == "ovn" ]]; then
|
|
VPN_PLUGIN=${VPN_PLUGIN:-"ovn-vpnaas"}
|
|
else
|
|
VPN_PLUGIN=${VPN_PLUGIN:-"vpnaas"}
|
|
fi
|
|
|
|
# Device driver
|
|
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"strongswan"}
|
|
if [[ $Q_AGENT == "ovn" ]]; then
|
|
NEUTRON_VPNAAS_DEVICE_DRIVER=${NEUTRON_VPNAAS_DEVICE_DRIVER:-"neutron_vpnaas.services.vpn.device_drivers.ovn_ipsec.OvnStrongSwanDriver"}
|
|
else
|
|
NEUTRON_VPNAAS_DEVICE_DRIVER=${NEUTRON_VPNAAS_DEVICE_DRIVER:-"neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec:StrongSwanDriver"}
|
|
fi
|
|
|
|
function _get_service_provider {
|
|
local ipsec_package=$1
|
|
local name driver
|
|
|
|
if [[ $Q_AGENT == "ovn" ]]; then
|
|
driver="neutron_vpnaas.services.vpn.service_drivers.ovn_ipsec.IPsecOvnVPNDriver"
|
|
else
|
|
driver="neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver"
|
|
fi
|
|
|
|
if [ "$ipsec_package" = "libreswan" ]; then
|
|
name="openswan"
|
|
else
|
|
name="strongswan"
|
|
fi
|
|
echo "VPN:${name}:${driver}:default"
|
|
}
|
|
|
|
# Service Driver, default value depends on IPSEC_PACKAGE.
|
|
if [ -z "$NEUTRON_VPNAAS_SERVICE_PROVIDER" ]; then
|
|
NEUTRON_VPNAAS_SERVICE_PROVIDER=$(_get_service_provider $IPSEC_PACKAGE)
|
|
fi
|
|
|
|
# Config files
|
|
NEUTRON_CONF_DIR=${NEUTRON_CONF_DIR:-"/etc/neutron"}
|
|
NEUTRON_VPNAAS_DIR=$DEST/neutron-vpnaas
|
|
|
|
NEUTRON_VPNAAS_CONF_FILE=neutron_vpnaas.conf
|
|
NEUTRON_VPNAAS_CONF=$NEUTRON_CONF_DIR/$NEUTRON_VPNAAS_CONF_FILE
|
|
|
|
OVN_VPNAGENT_CONF=$NEUTRON_CONF_DIR/ovn_vpn_agent.ini
|