a9f26b81e2
This reverts commit caae7b6a6f
.
Reason for revert:
Many users still need L3 firewalls and Inspur team wants to maintain
this project.
Neutron drivers team discussed the topic of the maintenance of
neutron-fwaas, and agreed to include neutron-fwaas again to Neutron
stadium[1].
Some updates have been made:
Remove use "autonested_transaction" method, see more [2]
Replace "neutron_lib.callbacks.registry.notify" with "registry.publish"
Replace rootwrap execution with privsep context execution.
Ensure db Models and migration scripts are sync, set table
firewall_group_port_associations_v2's two columns nullable=False
[1] https://meetings.opendev.org/meetings/neutron_drivers/2022/neutron_drivers.2022-01-28-14.00.log.html#l-14
[2] https://review.opendev.org/c/openstack/neutron-lib/+/761728
Change-Id: I14f551c199d9badcf25b9e65c954c012326d27cd
51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -xe
|
|
|
|
FWAAS_DIR="$BASE/new/neutron-fwaas"
|
|
NEUTRON_DIR="$BASE/new/neutron"
|
|
TEMPEST_DIR="$BASE/new/tempest"
|
|
SCRIPTS_DIR="/usr/os-testr-env/bin"
|
|
|
|
venv=${1:-"dsvm-functional"}
|
|
|
|
function generate_testr_results {
|
|
# Give job user rights to access tox logs
|
|
sudo -H -u $owner chmod o+rw .
|
|
sudo -H -u $owner chmod o+rw -R .stestr
|
|
if [ -f ".stestr/0" ] ; then
|
|
.tox/$venv/bin/subunit-1to2 < .stestr/0 > ./stestr.subunit
|
|
$SCRIPTS_DIR/subunit2html ./stestr.subunit testr_results.html
|
|
gzip -9 ./stestr.subunit
|
|
gzip -9 ./testr_results.html
|
|
sudo mv ./*.gz /opt/stack/logs/
|
|
fi
|
|
}
|
|
|
|
function dsvm_functional_prep_func {
|
|
:
|
|
}
|
|
|
|
if [[ "$venv" == dsvm-functional* ]]
|
|
then
|
|
owner=stack
|
|
sudo_env=
|
|
# Set owner permissions according to job's requirements.
|
|
cd $FWAAS_DIR
|
|
sudo chown -R $owner:stack $FWAAS_DIR
|
|
sudo chown -R $owner:stack $NEUTRON_DIR
|
|
# Prep the environment according to job's requirements.
|
|
$prep_func
|
|
|
|
# Run tests
|
|
echo "Running neutron-fwaas $venv test suite"
|
|
set +e
|
|
sudo -H -u $owner $sudo_env tox -e $venv
|
|
testr_exit_code=$?
|
|
set -e
|
|
|
|
# Collect and parse results
|
|
generate_testr_results
|
|
exit $testr_exit_code
|
|
fi
|