neutron-vpnaas/devstack/settings
Dongcan Ye 23af68f52e Install suitable service_providers
If we wants VPN works on CentOS, we can set IPSEC_PACKAGE
to libreswan, but vpn service_providers still related
to strongswan.

This patch set the value of NEUTRON_VPNAAS_SERVICE_PROVIDER
according to IPSEC_PACKAGE in devstack/settings.

Change-Id: I893a191a8a1aa5a5beb8a73a9df4d1df2fb0c2f8
2019-11-13 02:33:43 +00:00

34 lines
1.0 KiB
Plaintext

# Settings for the VPNaaS devstack plugin
# Plugin
VPN_PLUGIN=${VPN_PLUGIN:-"vpnaas"}
# Device driver
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"strongswan"}
NEUTRON_VPNAAS_DEVICE_DRIVER=${NEUTRON_VPNAAS_DEVICE_DRIVER:-"neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec:StrongSwanDriver"}
function _get_service_provider {
local ipsec_package=$1
local name driver
driver="neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver"
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