Add support for upstream Rocky release

Import stable/rocky rather than stable/queens branches of upstream
and ACI-specific repositories. Changes needed for compatability
with stable/rocky that were also compatible with stable/queens were
made in previous patches, so only rocky-specific changes are included
here.

Change-Id: If533a955fb4bc23d6e4081a43df7018b1b36a0ba
This commit is contained in:
Robert Kukura 2020-04-17 04:12:00 -04:00
parent ca82a36cb1
commit 4fa2839c9d
20 changed files with 56 additions and 56 deletions

View File

@ -14,15 +14,15 @@
- openstack-tox-pep8:
required-projects:
- name: openstack/requirements
override-checkout: stable/queens
override-checkout: stable/rocky
- openstack-tox-py27:
required-projects:
- name: openstack/requirements
override-checkout: stable/queens
override-checkout: stable/rocky
- openstack-tox-py35:
required-projects:
- name: openstack/requirements
override-checkout: stable/queens
override-checkout: stable/rocky
- legacy-group-based-policy-dsvm-functional:
voting: false
- legacy-group-based-policy-dsvm-aim:
@ -34,12 +34,12 @@
- openstack-tox-pep8:
required-projects:
- name: openstack/requirements
override-checkout: stable/queens
override-checkout: stable/rocky
- openstack-tox-py27:
required-projects:
- name: openstack/requirements
override-checkout: stable/queens
override-checkout: stable/rocky
- openstack-tox-py35:
required-projects:
- name: openstack/requirements
override-checkout: stable/queens
override-checkout: stable/rocky

View File

@ -25,7 +25,7 @@ NEUTRON_CONF_DIR=/etc/neutron
NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf
NFP_CONF_DIR=/etc/nfp
DISKIMAGE_CREATE_DIR=$NFPSERVICE_DIR/gbpservice/contrib/nfp/tools/image_builder
NEUTRON_SRC_BRANCH_FOR_NFP_CONTROLLER=stable/queens
NEUTRON_SRC_BRANCH_FOR_NFP_CONTROLLER=stable/rocky
# Save trace setting
XTRACE=$(set +o | grep xtrace)

View File

@ -43,11 +43,11 @@ if [[ $ENABLE_NFP = True ]]; then
# Make sure that your public interface is not attached to any bridge.
PUBLIC_INTERFACE=
enable_plugin neutron-fwaas http://opendev.org/openstack/neutron-fwaas.git stable/queens
enable_plugin neutron-lbaas https://opendev.org/openstack/neutron-lbaas.git stable/queens
enable_plugin neutron https://opendev.org/openstack/neutron.git stable/queens
enable_plugin neutron-vpnaas https://opendev.org/openstack/neutron-vpnaas.git stable/queens
enable_plugin octavia https://opendev.org/openstack/octavia.git stable/queens
enable_plugin neutron-fwaas http://opendev.org/openstack/neutron-fwaas.git stable/rocky
enable_plugin neutron-lbaas https://opendev.org/openstack/neutron-lbaas.git stable/rocky
enable_plugin neutron https://opendev.org/openstack/neutron.git stable/rocky
enable_plugin neutron-vpnaas https://opendev.org/openstack/neutron-vpnaas.git stable/rocky
enable_plugin octavia https://opendev.org/openstack/octavia.git stable/rocky
fi
fi

View File

@ -25,13 +25,13 @@ GIT_BASE=${GIT_BASE:-https://opendev.org}
GBPSERVICE_REPO=${GBPSERVICE_REPO:-${GIT_BASE}/x/group-based-policy.git}
GBPSERVICE_BRANCH=${GBPSERVICE_BRANCH:-master}
GBPCLIENT_REPO=${GBPCLIENT_REPO:-${GIT_BASE}/x/python-group-based-policy-client.git}
GBPCLIENT_BRANCH=${GBPCLIENT_BRANCH:-master}
GBPCLIENT_BRANCH=${GBPCLIENT_BRANCH:-stable/rocky}
GBPUI_REPO=${GBPUI_REPO:-${GIT_BASE}/x/group-based-policy-ui.git}
GBPUI_BRANCH=${GBPUI_BRANCH:-master}
GBPHEAT_REPO=${GBPHEAT_REPO:-${GIT_BASE}/x/group-based-policy-automation.git}
GBPHEAT_BRANCH=${GBPHEAT_BRANCH:-master}
AIM_BRANCH=${AIM_BRANCH:-master}
OPFLEX_BRANCH=${OPFLEX_BRANCH:-master}
OPFLEX_BRANCH=${OPFLEX_BRANCH:-stable/rocky}
APICAPI_BRANCH=${APICAPI_BRANCH:-master}
ACITOOLKIT_BRANCH=${ACITOOLKIT_BRANCH:-noiro-lite}

View File

@ -20,14 +20,13 @@
# corresponding to the newest neutron branch supported by this
# repository.
from neutron.db import api as old_api
from neutron_lib.db import api
get_context_manager = api.get_context_manager
get_reader_session = api.get_reader_session
get_writer_session = api.get_writer_session
is_retriable = old_api.is_retriable
retry_db_errors = old_api.retry_db_errors
retry_if_session_inactive = old_api.retry_if_session_inactive
CONTEXT_READER = get_context_manager().reader
CONTEXT_WRITER = get_context_manager().writer
is_retriable = api.is_retriable
retry_db_errors = api.retry_db_errors
retry_if_session_inactive = api.retry_if_session_inactive
CONTEXT_READER = api.CONTEXT_READER
CONTEXT_WRITER = api.CONTEXT_WRITER

View File

@ -4912,7 +4912,9 @@ class ApicMechanismDriver(api_plus.MechanismDriver,
# This is only needed for baremetal VNIC types, as they don't
# have agents to perform port binding.
subport_db = self.plugin._get_port(context, first_subport_id)
if subport_db.port_binding.vnic_type != portbindings.VNIC_BAREMETAL:
if (not subport_db.port_bindings or
subport_db.port_bindings[0].vnic_type !=
portbindings.VNIC_BAREMETAL):
return
if event == events.AFTER_DELETE:
parent_port = None
@ -5674,12 +5676,14 @@ class ApicMechanismDriver(api_plus.MechanismDriver,
port = self.plugin._make_port_dict(port_db)
network = self.plugin.get_network(
plugin_context, port_db.network_id)
host = port_db.port_binding.host if port_db.port_binding else None
host = (port_db.port_bindings[0].host if port_db.port_bindings
else None)
levels = (n_db.get_binding_levels(plugin_context, port_id, host)
if host else None)
return ml2_context.PortContext(
self.plugin, plugin_context, port, network,
port_db.port_binding, levels)
port_db.port_bindings[0] if port_db.port_bindings else None,
levels)
def _add_network_mapping_and_notify(self, context, network_id, bd, epg,
vrf):
@ -6454,7 +6458,7 @@ class ApicMechanismDriver(api_plus.MechanismDriver,
query += lambda q: q.options(
orm.joinedload('binding_levels'))
for port in query(mgr.actual_session):
binding = port.port_binding
binding = port.port_bindings[0] if port.port_bindings else None
levels = port.binding_levels
unbind = False
# REVISIT: Validate that vif_type and vif_details are

View File

@ -22,7 +22,6 @@ from gbpservice.neutron.plugins.ml2plus import patch_neutron # noqa
from neutron.common import constants as n_const
from neutron.common import utils as n_utils
from neutron.db import _resource_extend as resource_extend
from neutron.db import _utils as db_utils
from neutron.db.models import securitygroup as securitygroups_db
from neutron.db import models_v2
from neutron.plugins.ml2.common import exceptions as ml2_exc
@ -38,6 +37,7 @@ from neutron_lib.api import validators
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib.db import utils as db_utils
from neutron_lib.plugins import directory
from oslo_log import log
from oslo_utils import excutils

View File

@ -17,7 +17,6 @@ from neutron.api import extensions
from neutron.common import utils as n_utils
from neutron.db import _model_query as model_query
from neutron.db import _resource_extend as resource_extend
from neutron.db import _utils as db_utils
from neutron.db import common_db_mixin
from neutron.db import dns_db
from neutron.db import extraroute_db
@ -26,6 +25,7 @@ from neutron.db.models import l3 as l3_db
from neutron.quota import resource_registry
from neutron_lib.api.definitions import l3 as l3_def
from neutron_lib.api.definitions import portbindings
from neutron_lib.db import utils as db_utils
from neutron_lib import exceptions
from neutron_lib.plugins import constants
from neutron_lib.plugins import directory

View File

@ -13,11 +13,11 @@ SKIP_EXERCISES=volumes,trove,swift,sahara,euca,bundle,boot_from_volume,aggregate
enable_plugin group-based-policy https://opendev.org/x/group-based-policy.git master
enable_plugin networking-sfc https://opendev.org/openstack/networking-sfc.git stable/queens
enable_plugin networking-sfc https://opendev.org/openstack/networking-sfc.git stable/rocky
ENABLE_APIC_AIM_GATE=True
AIM_BRANCH=master
OPFLEX_BRANCH=master
OPFLEX_BRANCH=stable/rocky
APICAPI_BRANCH=master
ACITOOLKIT_BRANCH=noiro-lite

View File

@ -20,7 +20,7 @@ GBPSERVICE_BRANCH=master
#GBPSERVICE_BRANCH=refs/changes/85/298385/154
GBPCLIENT_REPO=${GIT_BASE}/x/python-group-based-policy-client.git
GBPCLIENT_BRANCH=master
GBPCLIENT_BRANCH=stable/rocky
#GBPCLIENT_REPO=https://review.openstack.org/openstack/python-group-based-policy-client
#GBPCLIENT_BRANCH=refs/changes/95/311695/3
@ -45,13 +45,13 @@ enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_plugin neutron-fwaas https://opendev.org/openstack/neutron-fwaas.git stable/queens
enable_plugin neutron-lbaas https://opendev.org/openstack/neutron-lbaas.git stable/queens
enable_plugin neutron https://opendev.org/openstack/neutron.git stable/queens
enable_plugin neutron-fwaas https://opendev.org/openstack/neutron-fwaas.git stable/rocky
enable_plugin neutron-lbaas https://opendev.org/openstack/neutron-lbaas.git stable/rocky
enable_plugin neutron https://opendev.org/openstack/neutron.git stable/rocky
#ENBALE OCTAVIA
enable_plugin octavia https://opendev.org/openstack/octavia stable/queens
enable_plugin octavia https://opendev.org/openstack/octavia stable/rocky
#ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
enable_service q-fwaas-v1

View File

@ -20,7 +20,7 @@ GBPSERVICE_BRANCH=master
#GBPSERVICE_BRANCH=refs/changes/54/240954/47
GBPCLIENT_REPO=${GIT_BASE}/x/python-group-based-policy-client.git
GBPCLIENT_BRANCH=master
GBPCLIENT_BRANCH=stable/rocky
#GBPCLIENT_REPO=https://review.openstack.org/openstack/python-group-based-policy-client
#GBPCLIENT_BRANCH=refs/changes/55/435155/1

View File

@ -16,7 +16,7 @@ XTRACE=$(set +o | grep xtrace)
function prepare_gbp_devstack_pre {
cd $TOP_DIR
sudo git checkout stable/queens
sudo git checkout stable/rocky
sudo sed -i 's/DEST=\/opt\/stack/DEST=\/opt\/stack\/new/g' $TOP_DIR/stackrc
sudo sed -i 's/source $TOP_DIR\/lib\/neutron/source $TOP_DIR\/lib\/neutron\nsource $TOP_DIR\/lib\/neutron-legacy/g' $TOP_DIR/stack.sh
}
@ -25,15 +25,15 @@ function prepare_gbp_devstack_post {
# The following should updated when master moves to a new release
# We need to do the following since the infra job clones these repos and
# checks out the master branch (as this is the master branch) and later
# does not switch to the stable/queens branch when installing devstack
# does not switch to the stable/rocky branch when installing devstack
# since the repo is already present.
# This can be worked around by changing the job description in
# project-config to set BRANCH_OVERRIDE to use the stable/queens branch
sudo git --git-dir=/opt/stack/new/neutron/.git --work-tree=/opt/stack/new/neutron checkout stable/queens
sudo git --git-dir=/opt/stack/new/nova/.git --work-tree=/opt/stack/new/nova checkout stable/queens
sudo git --git-dir=/opt/stack/new/keystone/.git --work-tree=/opt/stack/new/keystone checkout stable/queens
sudo git --git-dir=/opt/stack/new/cinder/.git --work-tree=/opt/stack/new/cinder checkout stable/queens
sudo git --git-dir=/opt/stack/new/requirements/.git --work-tree=/opt/stack/new/requirements checkout stable/queens
# project-config to set BRANCH_OVERRIDE to use the stable/rocky branch
sudo git --git-dir=/opt/stack/new/neutron/.git --work-tree=/opt/stack/new/neutron checkout stable/rocky
sudo git --git-dir=/opt/stack/new/nova/.git --work-tree=/opt/stack/new/nova checkout stable/rocky
sudo git --git-dir=/opt/stack/new/keystone/.git --work-tree=/opt/stack/new/keystone checkout stable/rocky
sudo git --git-dir=/opt/stack/new/cinder/.git --work-tree=/opt/stack/new/cinder checkout stable/rocky
sudo git --git-dir=/opt/stack/new/requirements/.git --work-tree=/opt/stack/new/requirements checkout stable/rocky
source $TOP_DIR/functions
source $TOP_DIR/functions-common

View File

@ -1,22 +1,19 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
-e git+https://opendev.org/openstack/neutron.git@stable/queens#egg=neutron
-e git+https://opendev.org/openstack/neutron-vpnaas.git@stable/queens#egg=neutron-vpnaas
-e git+https://opendev.org/openstack/neutron-lbaas.git@stable/queens#egg=neutron-lbaas
-e git+https://opendev.org/openstack/neutron-fwaas.git@stable/queens#egg=neutron-fwaas
-e git+https://opendev.org/openstack/networking-sfc.git@stable/queens#egg=networking-sfc
-e git+https://opendev.org/openstack/neutron.git@stable/rocky#egg=neutron
-e git+https://opendev.org/openstack/neutron-vpnaas.git@stable/rocky#egg=neutron-vpnaas
-e git+https://opendev.org/openstack/neutron-lbaas.git@stable/rocky#egg=neutron-lbaas
-e git+https://opendev.org/openstack/neutron-fwaas.git@stable/rocky#egg=neutron-fwaas
-e git+https://opendev.org/openstack/networking-sfc.git@stable/rocky#egg=networking-sfc
-e git+https://github.com/noironetworks/apicapi.git@master#egg=apicapi
-e git+https://github.com/noironetworks/python-opflex-agent.git@stable/queens#egg=python-opflexagent-agent
-e git+https://github.com/noironetworks/python-opflex-agent.git@stable/rocky#egg=python-opflexagent-agent
-e git+https://github.com/openstack/vmware-nsx.git@stable/queens#egg=vmware_nsx
-e git+https://github.com/openstack/vmware-nsxlib.git@stable/queens#egg=vmware_nsxlib
-e git+https://opendev.org/x/python-group-based-policy-client.git@stable/queens#egg=gbpclient
-e git+https://opendev.org/x/python-group-based-policy-client.git@stable/rocky#egg=gbpclient
coverage!=4.4,>=4.0 # Apache-2.0
flake8-import-order==0.12 # LGPLv3
@ -30,7 +27,7 @@ oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
# Since version numbers for these are specified in
# https://releases.openstack.org/constraints/upper/queens, they cannot be
# https://releases.openstack.org/constraints/upper/rocky, they cannot be
# referenced as GIT URLs.
python-heatclient
python-keystoneclient

View File

@ -12,9 +12,9 @@ setenv = VIRTUAL_ENV={envdir}
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
usedevelop = True
install_command =
pip install -U {opts} {packages}
pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/queens}
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/rocky}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh