VPNaaS: Correcting method name for functional test
With the new DevStack plugin for neutron-vpnaas, the method names for various stacking actions were renamed. One is used by the functional test setup script tools/configure_for_vpn_func_testing.sh. The change wasn't noticed, because the neutron-vpnaas repo still was using DevStack's existing VPN setup, where the old method name is still in use. But, when removing the VPN setup in DevStack, then the function tests will fail. This commit renames the method to match the name of the DevStack plugin method, instead of the older DevStack repo method. It'll be needed, before upstreaming Iffa9901e24adbacb581425c4b38c7e8cff0da9e8. In addition, it makes sure that VPN environment variables are available for use by the configuration script, and reuses more plugin.sh code, to remove duplication. Change-Id: Ib22a4b9abdc82c2b14d933b02329c6483c075ea8
This commit is contained in:
parent
a983ed34f8
commit
9c21bb5ad2
@ -30,14 +30,15 @@ function neutron_vpnaas_configure_common {
|
||||
}
|
||||
|
||||
function neutron_vpnaas_configure_agent {
|
||||
cp $NEUTRON_VPNAAS_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE
|
||||
local conf_file=${1:-$Q_VPN_CONF_FILE}
|
||||
cp $NEUTRON_VPNAAS_DIR/etc/vpn_agent.ini $conf_file
|
||||
if [[ "$IPSEC_PACKAGE" == "strongswan" ]]; then
|
||||
iniset_multiline $Q_VPN_CONF_FILE vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver
|
||||
iniset_multiline $conf_file vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver
|
||||
if is_fedora; then
|
||||
iniset $Q_VPN_CONF_FILE strongswan default_config_area /usr/share/strongswan/templates/config/strongswan.d
|
||||
iniset $conf_file strongswan default_config_area /usr/share/strongswan/templates/config/strongswan.d
|
||||
fi
|
||||
else
|
||||
iniset_multiline $Q_VPN_CONF_FILE vpnagent vpn_device_driver $NEUTRON_VPNAAS_DEVICE_DRIVER
|
||||
iniset_multiline $conf_file vpnagent vpn_device_driver $NEUTRON_VPNAAS_DEVICE_DRIVER
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@ PROJECT_NAME=${PROJECT_NAME:-neutron-vpnaas}
|
||||
REPO_BASE=${GATE_DEST:-$(cd $(dirname "$BASH_SOURCE")/../.. && pwd)}
|
||||
|
||||
source $REPO_BASE/neutron/tools/configure_for_func_testing.sh
|
||||
source $REPO_BASE/neutron-vpnaas/devstack/settings
|
||||
source $NEUTRON_VPNAAS_DIR/devstack/plugin.sh
|
||||
|
||||
|
||||
function _install_vpn_package {
|
||||
@ -32,23 +34,14 @@ function _install_vpn_package {
|
||||
fi
|
||||
|
||||
echo_summary "Installing $IPSEC_PACKAGE"
|
||||
neutron_vpn_install_agent_packages
|
||||
neutron_agent_vpnaas_install_agent_packages
|
||||
}
|
||||
|
||||
|
||||
function _configure_vpn_ini_file {
|
||||
echo_summary "Configuring VPN ini file"
|
||||
|
||||
local temp_ini=$(mktemp)
|
||||
cp $REPO_BASE/$PROJECT_NAME/etc/vpn_agent.ini $temp_ini
|
||||
if [ "$IPSEC_PACKAGE" == "strongswan" ]; then
|
||||
iniset_multiline $temp_ini vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver
|
||||
if is_fedora; then
|
||||
iniset $temp_ini strongswan default_config_area /usr/share/strongswan/templates/config/strongswan.d
|
||||
fi
|
||||
else
|
||||
iniset_multiline $temp_ini vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.ipsec.OpenSwanDriver
|
||||
fi
|
||||
neutron_vpnaas_configure_agent $temp_ini
|
||||
sudo install -d -o $STACK_USER /etc/neutron/
|
||||
sudo install -m 644 -o $STACK_USER $temp_ini $Q_VPN_CONF_FILE
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user