Comment 20 for bug 1524745

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/401311
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=6e981156c83c4d7217e985c88553548d5924c601
Submitter: Jenkins
Branch: master

commit 6e981156c83c4d7217e985c88553548d5924c601
Author: Dmitry Tantsur <email address hidden>
Date: Wed Nov 23 16:17:58 2016 +0100

    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