ironic/ironic
Jim Rollenhagen 7f46a03fca Refactor driver loading to load a driver instance per node
This paves the way for composable drivers. It:

Creates a BareDriver class, which is a minimal subclass of BaseDriver,
with no interfaces attached.

Adds a method driver_factory.build_driver_for_task, that accepts a
task argument and builds an instance of BareDriver that does have
interfaces attached. These interfaces come from loading the driver in
node.driver, and attaching each of the core, standard, and vendor
interfaces to the BareDriver created. This also accepts a driver_name
argument, for loading a driver that is not the one specified in
node.driver (for example, when updating the driver for a node).
This method will eventually need to take arguments for each interface
that is broken out of the main driver singleton.

By doing this, we create a driver instance per node, instead of using
the monolithic driver singletons shared across nodes. Note that the
attached interfaces are references to the interfaces in the driver
singleton, and thus themselves still singletons. It is *which* interface
implementations are referenced that will vary by node.

This means that in the future, we can dynamically load and attach these
interfaces, with the implementation chosen being defined by a property
of the node.

This patch also does a small refactoring as to how the list of
interfaces attached to a driver are referenced, for cleanliness.

Change-Id: Ic2b2525f2abd0d252f36442097e68f73aeaec9f7
2016-03-01 23:41:06 +00:00
..
api API to manually clean nodes 2016-02-09 14:41:01 +00:00
cmd Remove downgrade support from migrations 2016-02-08 15:31:15 +00:00
common Refactor driver loading to load a driver instance per node 2016-03-01 23:41:06 +00:00
conductor Refactor driver loading to load a driver instance per node 2016-03-01 23:41:06 +00:00
db Merge "Correct instance parameter description" 2016-02-24 10:09:55 +00:00
dhcp Remove 'zapping' from code 2016-02-09 22:47:45 +00:00
drivers Refactor driver loading to load a driver instance per node 2016-03-01 23:41:06 +00:00
locale Imported Translations from Zanata 2016-01-27 06:38:00 +00:00
nova Enable flake8 checking of ironic/nova/* 2015-06-12 11:48:20 -07:00
objects Move _from_db_object() into base class 2016-02-24 06:33:31 -08:00
tests Refactor driver loading to load a driver instance per node 2016-03-01 23:41:06 +00:00
__init__.py Move eventlent monkeypatch out of cmd/ 2014-02-08 00:11:56 -08:00
netconf.py Enable translation for config option help messages 2015-07-06 10:57:53 -07:00
version.py Correct version.py and update current version string 2014-03-21 13:50:05 -07:00