Browse Source

fix gate

A few fixes to get the tricircle gate working:
- Remove the depend on neutron common exception.
- Update lower-constraints for unneeded version constraining.
- The changes from https://review.openstack.org/#/c/596420/
- Adds neutron and sfc to the functional playbook
- Separates the neutron and networking-sfc requirements into
sibling-requirements.txt so they are not picked up by devstack and
updates tox.ini as needed for them.

Change-Id: Icd6b36e613456b4af35eaf70ef95b4ef32ddf806
Signed-off-by: song baisen <songbaisen@szzt.com.cn>
Co-Authored-By: tangzhuo <ztang@hnu.edu.cn>, zhiyuan_cai <luckyvega.g@gmail.com>
changes/99/638099/11
Boden R 2 years ago
committed by songbaisen
parent
commit
2639d8964d
8 changed files with 19 additions and 16 deletions
  1. +2
    -0
      .zuul.yaml
  2. +0
    -1
      lower-constraints.txt
  3. +2
    -1
      playbooks/tricircle-dsvm-functional/run.yaml
  4. +2
    -4
      requirements.txt
  5. +4
    -0
      sibling-requirements.txt
  6. +2
    -0
      tox.ini
  7. +6
    -9
      tricircle/network/central_plugin.py
  8. +1
    -1
      tricircle/tests/unit/network/test_central_plugin.py

+ 2
- 0
.zuul.yaml View File

@ -7,6 +7,8 @@
required-projects:
- openstack-infra/devstack-gate
- openstack/tricircle
- openstack/neutron
- openstack/networking-sfc
- job:
name: tricircle-multiregion


+ 0
- 1
lower-constraints.txt View File

@ -8,7 +8,6 @@ bandit==1.1.0
bashate==0.5.1
beautifulsoup4==4.6.0
cachetools==2.0.0
cffi==1.7.0
cliff==2.8.0
cmd2==0.8.0
contextlib2==0.4.0


+ 2
- 1
playbooks/tricircle-dsvm-functional/run.yaml View File

@ -42,7 +42,8 @@
set -x
export PYTHONUNBUFFERED=true
export BRANCH_OVERRIDE=default
export PROJECTS="openstack/tricircle $PROJECTS"
export PROJECTS="openstack/tricircle openstack/neutron openstack/networking-sfc $PROJECTS"
export LIBS_FROM_GIT="neutron,networking-sfc"
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=0


+ 2
- 4
requirements.txt View File

@ -43,10 +43,8 @@ oslo.upgradecheck>=0.1.1 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
sqlalchemy-migrate>=0.11.0 # Apache-2.0
# These repos are installed from git in OpenStack CI if the job
# configures them as required-projects:
neutron>=12.0.0 # Apache-2.0
networking-sfc>=6.0.0 # Apache-2.0
# Uncomment or copy/paste the sibling requirements for release of project
# -r ./sibling-requirements.txt
# The comment below indicates this project repo is current with neutron-lib
# and should receive neutron-lib consumption patches as they are released


+ 4
- 0
sibling-requirements.txt View File

@ -0,0 +1,4 @@
# These repos are installed from git in OpenStack CI if the job
# configures them as required-projects:
neutron>=12.0.0 # Apache-2.0
networking-sfc>=6.0.0 # Apache-2.0

+ 2
- 0
tox.ini View File

@ -10,6 +10,7 @@ passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS
usedevelop = True
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/sibling-requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals =
sh
@ -67,6 +68,7 @@ deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/sibling-requirements.txt
[flake8]
show-source = True


+ 6
- 9
tricircle/network/central_plugin.py View File

@ -24,7 +24,6 @@ from oslo_db.sqlalchemy import utils as sa_utils
import oslo_log.helpers as log_helpers
from oslo_log import log
import neutron.common.exceptions as ml2_exceptions
from neutron.conf.plugins.ml2 import config # noqa
from neutron.db import agents_db
from neutron.db.availability_zone import router as router_az
@ -336,7 +335,7 @@ class TricirclePlugin(db_base_plugin_v2.NeutronDbPluginV2,
if not match:
raise
else:
raise ml2_exceptions.FlatNetworkInUse(
raise exceptions.FlatNetworkInUse(
physical_network=match.groups()[0])
# process_extensions is set to False in _make_network_dict, so "tags"
# field will not be set, we manually set here so openstack client can
@ -978,13 +977,11 @@ class TricirclePlugin(db_base_plugin_v2.NeutronDbPluginV2,
try:
# notify interested parties of imminent port deletion;
# a failure here prevents the operation from happening
kwargs = {
'context': context,
'port_id': port_id,
'port_check': port_check
}
registry.notify(
resources.PORT, events.BEFORE_DELETE, self, **kwargs)
registry.publish(
resources.PORT, events.BEFORE_DELETE, self,
payload=events.DBEventPayload(
context, metadata={'port_check': port_check},
resource_id=port_id))
except callbacks_exc.CallbackFailure as e:
# NOTE(xiulin): preserve old check's behavior
if len(e.errors) == 1:


+ 1
- 1
tricircle/tests/unit/network/test_central_plugin.py View File

@ -967,7 +967,7 @@ def fake_filter_non_model_columns(data, model):
@classmethod
def fake_load_obj(cls, context, db_obj):
def fake_load_obj(cls, context, db_obj, fields=None):
return db_obj


Loading…
Cancel
Save