<commit_before>#!/usr/bin/env bash

set -ex

VENV=${1:-"dsvm-functional"}

GATE_DEST=$BASE/new
DEVSTACK_PATH=$GATE_DEST/devstack

if [ "$VENV" == "dsvm-functional" ] || [ "$VENV" == "dsvm-fullstack" ]
then
    # The following need to be set before sourcing
    # configure_for_func_testing.
    GATE_STACK_USER=stack
    NEUTRON_PATH=$GATE_DEST/neutron
    PROJECT_NAME=neutron
    IS_GATE=True

    source $NEUTRON_PATH/tools/configure_for_func_testing.sh

    # Make the workspace owned by the stack user
    sudo chown -R $STACK_USER:$STACK_USER $BASE

    configure_host_for_func_testing
elif [ "$VENV" == "api" ]
then
    cat > $DEVSTACK_PATH/local.conf <<EOF
[[post-config|/etc/neutron/neutron_vpnaas.conf]]

[service_providers]
service_provider=VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default

EOF

    export DEVSTACK_LOCAL_CONFIG+="
enable_plugin neutron-vpnaas git://git.openstack.org/openstack/neutron-vpnaas
enable_plugin neutron git://git.openstack.org/openstack/neutron
enable_service q-qos
"

    $BASE/new/devstack-gate/devstack-vm-gate.sh
fi<commit_msg>Add support for neutron-full and api jobs using pecan to gate_hook<commit_after>#!/usr/bin/env bash

set -ex

VENV=${1:-"dsvm-functional"}

GATE_DEST=$BASE/new
DEVSTACK_PATH=$GATE_DEST/devstack

if [ "$VENV" == "dsvm-functional" ] || [ "$VENV" == "dsvm-fullstack" ]
then
    # The following need to be set before sourcing
    # configure_for_func_testing.
    GATE_STACK_USER=stack
    NEUTRON_PATH=$GATE_DEST/neutron
    PROJECT_NAME=neutron
    IS_GATE=True

    source $NEUTRON_PATH/tools/configure_for_func_testing.sh

    # Make the workspace owned by the stack user
    sudo chown -R $STACK_USER:$STACK_USER $BASE

    configure_host_for_func_testing
elif [ "$VENV" == "api" -o "$VENV" == "api-pecan" -o "$VENV" == "full-pecan" ]
then
    cat > $DEVSTACK_PATH/local.conf <<EOF
[[post-config|/etc/neutron/neutron_vpnaas.conf]]

[service_providers]
service_provider=VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default

EOF

    if [ "$VENV" == "api-pecan" -o "$VENV" == "full-pecan" ]
    then
        cat >> $DEVSTACK_PATH/local.conf <<EOF
[[post-config|/etc/neutron/neutron.conf]]

[default]
web_framework=pecan

EOF
    fi

    export DEVSTACK_LOCAL_CONFIG+="
enable_plugin neutron-vpnaas git://git.openstack.org/openstack/neutron-vpnaas
enable_plugin neutron git://git.openstack.org/openstack/neutron
enable_service q-qos
"

    $BASE/new/devstack-gate/devstack-vm-gate.sh
fi
{'fraction_non_alphanumeric': 0.12594059405940594, 'fraction_numerical': 0.0007920792079207921, 'mean_word_length': 4.479392624728851, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5430687', 'n_tokens_mistral': 985, 'n_tokens_neox': 948, 'n_words': 160}