ironic/ironic/api
Dmitry Tantsur 6e981156c8 Move interface validation from API to conductor side
This change moves the check on network interface to driver_factory.py
and moves node creation from API to conductor side. A new exception
InterfaceNotFoundInEntrypoint (similar to DriverNotFoundInEntrypoint)
was introduced for the case when invalid interface is requested either
during creation or during updating.

The current approach already duplicates the check in two places.
With the driver composition in place it will not be quite possible:
different conductors may have different interfaces enabled as long as
no hardware type ends up with different interfaces on different
conductors. Also when calculating the defaults, we'll need access
to a real hardware type object, which may not be possible on API side.

Also there is a demand for driver-side validations on creation
(e.g. detecting duplicating IPMI addresses), which also requires
creation to happen on conductor side. Such features, however, are
out of scope for this change.

A side effect of this change is that objects.Node.network_interface
is now defined the same way as other interfaces (i.e. nullable string).

Also added more clean ups to base unit test class, as otherwise newly
added tests randomly break other tests.

Change-Id: Id1da20ccd5bb50e61a82449ef3d2ffce91822d71
Partial-Bug: #1524745
2016-12-01 09:59:48 +01:00
..
controllers Move interface validation from API to conductor side 2016-12-01 09:59:48 +01:00
middleware Merge imports in code 2016-08-24 01:34:03 +00:00
__init__.py Centralize config options - [api] 2016-07-21 11:51:45 -07:00
app.py Clean imports in code 2016-08-18 10:02:30 +07:00
app.wsgi Replace logging constants with oslo.log 2016-04-26 16:38:51 +08:00
config.py Promote agent vendor passthru to core API 2016-08-05 12:31:32 +02:00
expose.py Disable XML now that we have WSME/Pecan support 2015-04-06 09:31:09 -07:00
hooks.py Add user and project domains to ironic context 2016-11-15 17:35:22 +02:00