A number of subprojects inherit neutron's ServicePluginBase
class [1]. This patch rehomes ServicePluginBase into
neutron-lib along with 2 other classes required for the
implementation of ServicePluginBase.
UTs and a release note are also included.
[1] http://codesearch.openstack.org/?q=ServicePluginBase
Change-Id: I2b1131ac53e9bfeb42a92f9ef134be6ff4cfe5a3
Even though the context was marked private, we should
consider it public as it is widely used across the
board, and it has demonstrated itself to be one of
the most stable components ever conceived in the
Neutron maze.
NeutronLibImpact
Partially-implements: blueprint neutron-lib
Change-Id: Ibb3797c17fef5a1ead40aa2cad1269ce11c45339
This patch builds a small hierarchy of event objects that
represent the payload for callback notification events. The
overall goal of this work is to begin moving away from the
existing unstructured **kwargs passed today and standardize
on a common set of event payload objects; the beginning of such
contained herein.
A PoC/dummy patch for neutron is provided in [1] that exemplifies
consumption of the new API by:
- Removes neutron.callbacks and moves all uses to
neutron_lib.callbacks.
- Neutron uses of callbacks for BEFORE_RESPONSE events
now use neutron-lib.
- Neutron uses of callbacks for ROUTER and PROCESS
resource events now use neutron-lib.
- Neutron UTs updated to pass with this patch.
For existing discussion on this approach please see [2][3].
Co-Authored-By: Armando Migliaccio <armamig@gmail.com>
[1] https://review.openstack.org/400404/
[2] https://review.openstack.org/#/c/345718
[3] https://review.openstack.org/#/c/342304
Change-Id: If76457b1f0d5d3479e394d0dba3b22a90928f0f2
This change adds additional validators and converters needed by the
neutron-fwaas API definition[1].
[1] https://review.openstack.org/389388
Co-Authored-By: ZhaoBo <zhaobo6@huawei.com>
Change-Id: If49391647dfa0cb1eeca4c80abdc7397eb639675
This is needed to stop stubbing out _get_plugin_directory
from neutron unit tests, thus preserving testing isolation.
Change-Id: Ic94b264068955c67d71b86fe54825b9fba4533ac
The following file(s) added utf-8 encoding but never used. So we can
remove them at all.
neutron_lib/__init__.py
neutron_lib/tests/unit/callbacks/test_callback_exceptions.py
neutron_lib/tests/unit/test_exceptions.py
neutron_lib/tests/unit/test_neutron_lib.py
releasenotes/source/conf.py
doc/source/conf.py
api-ref/source/conf.py
Change-Id: I45f1d48f8df461b67e6c37a37e0577ed4c1296a1
Migrate neutron agent extensions to neutron-lib. This includes both the
common abstract object as well as the l2 and l3-specific objects for
agent extensions.
This functionality is used by neutron, neutron-fwaas, networking-sfc,
and tap-as-a-service.
Please note that this does not migrate the l3_agent_extensions_api to
neutron-lib. This is because that specifically has a long dependency
chain that ends up requiring agent/[linux,windows]/utils.py, which
should be migrated separately.
Change-Id: I7255a5ae6b706c09acecc0dea5dbd2febae0c282
Needed-By: I6d2cff03207924c7492c6136d4b21a9817769c67
Needed-By: If9235c1cf39b8ad2ef049e8154b82736e1f1d763
Needed-By: Ie8f0e70b11435d627f73e3fed45f946e863e90bc
Needed-By: Ia5962acfd737b4b350b94591802928a5a4dc53fb
This adds a validator to check if a value is an IP address, an IP
subnet, or none.
This was originally part of the neutron-fwaas API definition migration
to neutron-lib[1], but it was suggested that this should be pulled into
a separate change.
[1] https://review.openstack.org/389388
Change-Id: I8dcf49adc7754d0c9aa0479ede2de481325bb3e3
Neutron recently updated their usage of hacking to use
version 0.12 [1] that now contains the hacking check
check_delayed_string_interpolation who's off_by_default
value is initially True (i.e. disabled). This hacking check
is defined in neutron_lib, but hasn't been registered in our
factory and isn't being consumed directly [2].
This patch takes a simple approach to reusing openstack-dev
hacking checks:
- Removes all traces of neutron-lib's version of the check; no one is
using it [2].
- Bumps our version of hacking to use 0.12 so we can use the checks
in that release.
- Enables the check via enabled extensions in tox.ini as neutron did [1].
- Updates our hacking check usage, noting that adopters should
enable the same extensions we do (via tox.ini).
[1] https://review.openstack.org/#/c/394817/
[2] http://codesearch.openstack.org/?q=check_delayed_string_interpolation&i=nope&files=&repos=
Change-Id: Ie9448317855b9cba6092cd0f63b77d26a562a5c9
Neutron-lib adopters should be using neutron-lib's hacking
checks (factory) to validate compliance, but are susceptible
to breakage when new checks are released in neutron-lib (see
partial bug). What we need is a way to roll-out adopter hacking
checks in a controlled manner, giving consumers the opportunity
and tools to comply with new checks.
This patch begins to address this need by:
- Separating neutron-lib hacking checks into 3 separate factories;
adopter, incubating and neutron-lib internal (private).
- Moving any existing checks into their respective factory.
- Updating the usage docs on how to adopt our hacking checks.
- Trusty ole unit test; for obvious reasons.
This patch plays a part in a longer term hacking check strategy:
- Adopters must run neutron-lib's hacking check factory() or its
equivalent via their pep8 checks. This is part of their pep8 gate job
once they update their tox.ini to use neutron's factory().
- Adopters must run a non-voting neutron-lib-pep8-incubating gate job
that runs pep8 with neutron-lib's incubating_factory(). This is means
to warn adopters of upcoming checks without failing their gates.
This job will be created (by me) assuming reviewers agree to this approach.
- We'll communicate hacking checks via the standard means (see usage
docs herein).
Closure of Bug #1609478 will follow completion of the strategy above.
Partial-Bug: #1609478
Change-Id: I5b8d5c41f1bf463109baf9c26ae9d9db5719097d
With respect to Section-4 of [1], the following patch adds
a function to compress the extended IPv6 address passed to
the neutron server to its canonical form. This allows
compressed IPv6 addresses to be stored and remove any
leading zeroes in the IPv6 addresses.
Non-canonical IPv6 address formatted inputs wont be blocked,
but the addresses would be normalized to canonical formats.
[1]: http://tools.ietf.org/html/rfc5952
Partial-Bug: #1531103
Change-Id: Ic9afa5f90fba783748f7c56e8fba02e06af69748
These must be available in neutron-lib so that subprojects can
remove their dependency on neutron.db.migration.cli.
Change-Id: I78b37534cba0fd9740b5290c72ec6150d0de07c8
get_random_mac is used by networking-ovn, tap-as-a-service,
neutron-vpnaas, and vmware-nsx, so we should move it into the
neutron-lib repository.
Change-Id: I391300e6f1d04b2413084bccdbacb038071c4509
When a subproject wants to create a class to extend the Neutron API,
that class inherits from ExtensionDescriptor. This change pulls
ExtensionDescriptor over to neutron-lib so that subprojects can inherit
from it. This class is almost entirely abstract.
This is used by nearly every neutron stadium project.
Change-Id: I4e9ba9c0c7fd4c5f449f11b4f401fa265ae7ea43
Release notes for neutron-lib are meant to address neutron
developers and help them identify changes from one release
to another.
Change-Id: I51d2049643d3b35484d07f2f4aad7765f6dac958