OpenStack Networking (Neutron)
Go to file
Armando Migliaccio 17563a802e Adopt neutron-lib plugin directory
Neutron Manager is loaded at the very startup of the neutron
server process and with it plugins are loaded and stored for
lookup purposes as their references are widely used across the
entire neutron codebase.

Rather than holding these references directly in NeutronManager
this patch refactors the code so that these references are held
by a plugin directory.

This allows subprojects and other parts of the Neutron codebase
to use the directory in lieu of the manager. The result is a
leaner, cleaner, and more decoupled code.

Usage pattern [1,2] can be translated to [3,4] respectively.

[1] manager.NeutronManager.get_service_plugins()[FOO]
[2] manager.NeutronManager.get_plugin()
[3] directory.get_plugin(FOO)
[4] directory.get_plugin()

The more entangled part is in the neutron unit tests, where the
use of the manager can be simplified as mocking is typically
replaced by a call to the directory add_plugin() method. This is
safe as each test case gets its own copy of the plugin directory.
That said, unit tests that look more like API tests and that rely on
the entire plugin machinery, need some tweaking to avoid stumbling
into plugin loading failures.

Due to the massive use of the manager, deprecation warnings are
considered impractical as they cause logs to bloat out of proportion.

Follow-up patches that show how to adopt the directory in neutron
subprojects are tagged with topic:plugin-directory.


Partially-implements: blueprint neutron-lib

Change-Id: I7331e914234c5f0b7abe836604fdd7e4067551cf
2016-11-23 04:45:33 -07:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
bin XenAPI: add support for conntrack with XenServer 2016-09-23 02:34:25 +00:00
devstack Merge "Install OVS from git if current version < 2.5.1" 2016-11-16 15:28:17 +00:00
doc Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
etc Merge "iptables: fail to start ovs/linuxbridge agents on missing sysctl knobs" 2016-10-21 02:14:02 +00:00
neutron Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
rally-jobs Add a trunk rally test 2016-11-14 23:59:56 +00:00
releasenotes Merge "Deprecate SR-IOV 'physical_device_mappings' config option" 2016-11-13 17:22:46 +00:00
tools Merge "Remove duplicated tool" 2016-11-11 22:26:52 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Automatically generate neutron core configuration files 2015-11-27 15:22:59 +00:00
.gitreview Fix .gitreview to not point at a branch 2015-08-17 13:51:51 -06:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Remove last vestiges of oslo-incubator 2016-11-04 20:49:13 -04:00
.testr.conf Allow more time for DB migration tests 2016-09-21 20:54:41 -04:00
CONTRIBUTING.rst Make crystal clear how to contribute/approach the neutron community 2016-10-28 11:49:44 -07:00
HACKING.rst Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-11-22 02:15:19 +00:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
README.rst Fix specs broken link 2016-10-28 14:39:49 -07:00
TESTING.rst Merge "Deprecate" 2016-11-22 06:08:21 +00:00
babel.cfg Use babel to generate translation file 2013-01-24 00:20:32 +08:00
bindep.txt Fix periodic jobs: Add databases to bindep.txt 2016-10-09 06:31:00 +02:00
requirements.txt Updated from global requirements 2016-11-14 21:07:37 +00:00 Deprecate 2016-11-08 03:50:20 +00:00
setup.cfg Merge "Expose OVS bridge related options into metering agent config file" 2016-11-22 08:37:08 +00:00 Updated from global requirements 2015-09-21 18:56:49 +00:00
test-requirements.txt Updated from global requirements 2016-11-22 13:56:13 +00:00
tox.ini Switch to new hacking 0.12 2016-11-08 03:36:00 +00:00



To learn more about neutron:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute: