[openstack-dev] [Nova][Deployers] Optional, platform specific, dependancies in requirements.txt

Dan Smith dms at danplanet.com
Fri Apr 13 13:49:08 UTC 2018


>>         global ironic
>>         if ironic is None:
>>             ironic = importutils.import_module('ironicclient')

I believe ironic was an early example of a client library we hot-loaded,
and I believe at the time we said this was a pattern we were going to
follow. Personally, I think this makes plenty of sense and I think that
even moving things like the python-libvirt load out to something like
this to avoid hyperv people having to nuke it from requirements makes
sense.

> I have a pretty strong dislike for this mechanism.  For one thing, I'm
> frustrated when I can't use hotkeys to jump to an ironicclient method
> because my IDE doesn't recognize that dynamic import.  I have to go look
> up the symbol some other way (and hope I'm getting the right one).  To
> me (with my bias as a dev rather than a deployer) that's way worse than
> having the 704KB python-ironicclient installed on my machine even though

This seems like a terrible reason to make everyone install ironicclient
(or the z/vm client) on their systems at runtime.

--Dan



More information about the OpenStack-dev mailing list