Fix iboot mock

The iboot mock was pointing to the iboot module in Ironic
(ironic.drivers.modules.iboot), this patch is changing it to point to
the module in ironic-staging-drivers otherwise, once iboot is removed
from the Ironic tree it's likely to break the unittests in this project.

Change-Id: I85fbfa9a83143ad309ae0cf6d5d45c8b7e45391e
This commit is contained in:
Lucas Alvares Gomes 2016-08-26 16:08:28 +01:00
parent 3ca96ed906
commit f3698f57ed
1 changed files with 3 additions and 2 deletions

View File

@ -45,8 +45,9 @@ if not iboot:
# if anything has loaded the iboot driver yet, reload it now that the
# external library has been mocked
if 'ironic.drivers.modules.iboot' in sys.modules:
six.moves.reload_module(sys.modules['ironic.drivers.modules.iboot'])
if 'ironic_staging_drivers.iboot.power' in sys.modules:
six.moves.reload_module(
sys.modules['ironic_staging_drivers.iboot.power'])
# attempt to load the external 'libvirt' library, which is required by
# the optional drivers.modules.libvirt module