Compat is for compatibility; there are certain things that no longer
need help because they're consistent across all OpenStack versions we
support (really Queens+ at this point). Remove the compat.py code
that supports this and stop using compat in import lines.
Also removed some conditional importing that was happening outside of
the compatibility layer - which shouldn't happen, but did in odd
places.
Change-Id: I913b184713a85b05ff97dcc14c9459025cb0c0e5
Remove all the conditionals to create the right imports in compat.py
where they relate to unsupported versions.
This is, in fact, most of them; the actual import lines will be
fixed in a subsequent patch.
Changed use of n_const and plugin_constants in the main body of the
code because they were being mixed up, making for harder work. The
reason was that at some point the plugin types were moved to a
different file, confusing matters; L3 is a plugin constant, Neutron-
inbuilt network types are not.
We should also look for use of TYPE_VXLAN as it's quite likely that
we shouldn't be using it to refer to GPE networks at all.
Change-Id: I96356a3500b3bbc90f6acb2673fe75df5d027468
We were patching bridge support methods into Liberty-and-earlier
Neutrons. We don't need to support that any longer.
Test included ensures functions we need are present in Neutron.
Change-Id: I6190b7459d8d548a1b2fda7071b1ae285cc5931c
Option functions are now in a predictable place; use their imports
and lose the code that dealt with older locations in older Neutron
versions.
Change-Id: I6031e71c68679c2ac2a6efb4b696b834ad448523
Our version of hacking was ancient, and it loads a pep8 check that
is both very inconsistent in reporting errors and has weaker
constraints. Fix the pep8 errors revealed and disable some of the
irrelevant tests in tox.ini.
Change-Id: I4ca71aa88456e4ac2baf0cfb3ac058b0a19e3b6b
The CommonDbMixin class used by services is deprecated in
the Train release. This patch ensures Train release
compatibility by using model_query from neuton_lib.db
to query a resource by its ID. Since model_query is
available in the previous releases, this is compatible
with older releases as well. Furthermore, Trunk constants
have changed in Train. This change ensures compatibility
by using the compat module.
Closes-bug: #1884812
Change-Id: Ica4343cb0ea85217d8a3d79e13f95ca6fb6d9927
- neutron.db._resource_extend is now neutron_lib.db.resource_extend
- neutron.db.api is now neutron_lib.db.api
- neutron.db.api.context_manager.reader is now neutron_lib.db.CONTEXT_READER
- neutron.db.api.context_manager.writer is now neutron_lib.db.CONTEXT_WRITER
Change-Id: I49bed1486b26e921b16bae3be25f110a02d77227
Importing neutron_lib.utils works in Newton,but it does not
have the get_random_mac, so reverting to neutron.common.utils
Change-Id: Ic95dd2be71d081cf6821f1b0b2353ccfae7ddced
Closes-Bug: #1769713
Newton version of neutron_lib does not have L3 defined in constants. Using plugin_constants instead.
Change-Id: I6c665ab55c0a47281919acb52a5f7238a6d6180a
Latest neutron has shuffled the 'callbacks' module to neutron_lib,
updating the imports in mech_vpp.py to reflect this.
Change-Id: I6e02fa2d995a7ee48f1497ad422424624083ba7b
This recently (Pike-Queens) moved from neutron.plugins.ml2.config to
neutron.conf.plugins.ml2.config and this patch adds a layer in compat.py
to insulate us from that, and also rejigs ml2_vpp config so that the
options for etcd live nearer the code that uses them and in general all
option registering works in a similar fashion.
Addresses-the config problems that were band-aided over in change
Idbf622591e8d92d8e29e3a92799d0e7ff460354a.
Change-Id: I18767336f05a0fdcebfe16ddd46c2a5325d4e661
The usage of get_random_mac in the neutron.common.utils
is deprecated for removal in version Pike, and usage of the
get_random_mac from neutron_lib.utils.net is recommended in
new version Queens
Change-Id: I54b40da91c2d7c3c5632993352d5c1a9c4aa7814
Co-Authored-By: Ian Wells <iawells@cisco.com>
When running Mitaka with certain combinations of plugins, the
enable_security_group option is already added and should not
be added again. This prevents that.
Change-Id: I30423480751fbf884dd8108b85db7664bee9de45
This is imperfect, because our compatibility layer that allows
us to work with older versions doesn't cover all the necessary
Neutron inclusions, but excluding N530 we have a pass.
Changes fit into categories:
- LOG.warn -> LOG.warning
- log messages now have kwargs if more than one argument
(not essential, but used to be for translation and seems
to be a good practice anyway)
- exception messages must be translated
- translated messages must have named positional arguments
- oslo_serialization.jsonutils must be used, not json
- [] can't be a default argument
- compat is marked with N530 as, there, neutron imports are
expected. In other places the mark has been left off, and
the tox check has been disabled (for later enablement via an
RFE)
This should not include changes outside of that set.
Change-Id: I1dc050f83a5199bf40117eac6c9adae221ae6857
This patch supports the VXLAN-GPE overlay networking capability using ml2
vxlan type driver. To deploy the GPE overlay, set the following options in
devstack - GPE_SRC_CIDR and GPE_LOCATORS. These devstack variables are
translated into ml2 config options named gpe_src_cidr and gpe_locators.
The gpe_src_cidr is the source IPv4 or IPv6 subnet/mask used for the GPE
underlay (uplink) interface. The gpe_locators is the name the physnet
functioning as the uplink source interface used by vxlan-gpe for overlay
encapsulation. In the current version, only one GPE locator
interface is supported. Also vxlan-gpe requires static ARP entries on
tenant instances for reachability.
Closes-Bug:#1676496
Change-Id: I8ddbf01e1436e2a1a258d602297b0426f194f295
BridgeDevice doesn't come with disable_ipv6 function in Liberty,
port this function from newer neutron upstream.
Change-Id: I035954a14e56be8a13ddb56844f35e2e4b740d51
Closes-bug: #1666354
This patch refactors networking-vpp to use portbindings
from neutron-lib. For more details see [1].
NeutronLibImpact
[1] https://review.openstack.org/422210/
Change-Id: Id97094de943fc1fea57390e6a4abb98c30a659c7
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
One of the imports works for Newton but not Mitaka, leaving Mitaka
to fall back to a bunch of imports that don't work for it. Break
conditionals up.
Change-Id: If8d2ba23728646786ab29752b4207de9eece4d2d
Move all the backward compatibility conditions into
backward_compatibility.py for sanity. This includes a number
of module name-change management bits, and some monkey patching,
all of which existed in the codebase before; we're just trying
to rationalise the locations and the conditionals.
Change-Id: Ifa7769758c2f66f094da40fef67f5213094c43cd