8ded7fe701
Change-Id: I33de87142be1581b3038e6d2e8169a06635e26c2
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
|