neutron-vpnaas/tools/configure_for_vpn_func_testing.sh
Paul Michali 80f765d498 Add constraints targets support for neutron-vpnaas
Added support for running the constraints version of DSVM
functional targets, made constraints targets the default for
gate invocation, and tested each target variation.

Removed the functional test coverage related targets, because to
run them, requires that DSVM is configured (like the functional
tests).

This will need I3a2c3c81533ce6145cd16c2a08a4a2af0dfb0d07
upstreamed, so that the constraints jobs can all be tested
(as experimental).

Change-Id: Idb9902418ea2e6f35b00ffb78a8973e49b6e140d
Partial-Bug: 1522503
2016-01-08 13:07:19 +00:00

69 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -e
IS_GATE=${IS_GATE:-False}
USE_CONSTRAINT_ENV=${USE_CONSTRAINT_ENV:-False}
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 {
case $VENV in
dsvm-functional-sswan*)
IPSEC_PACKAGE=strongswan
;;
*)
IPSEC_PACKAGE=openswan
;;
esac
echo_summary "Installing $IPSEC_PACKAGE for $VENV"
neutron_agent_vpnaas_install_agent_packages
}
function _configure_vpn_ini_file {
echo_summary "Configuring VPN ini file"
local temp_ini=$(mktemp)
neutron_vpnaas_generate_config_files
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
}
function configure_host_for_vpn_func_testing {
echo_summary "Configuring for VPN functional testing"
if [ "$IS_GATE" == "True" ]; then
configure_host_for_func_testing
fi
sudo pip install --force oslo.config==3.0.0 # req for oslo-config-generator
_install_vpn_package
_configure_vpn_ini_file
}
if [ "$IS_GATE" != "True" ]; then
configure_host_for_vpn_func_testing
fi