nova/nova/tests/unit/virt/ironic
Mark Goddard f5b6dc603c Include only required fields in ironic node cache
The ironic virt driver maintains a cache of ironic nodes to avoid
continually polling the ironic API.  Code paths requiring a specific
node use a limited set of fields, _NODE_FIELDS, when querying the
ironic API for the node. This reduces the memory footprint required by
the cache, and the network traffic required to populate it. However,
in most cases the cache is populated using a detailed node list
operation in _refresh_cache(), which includes all node fields.

This change specifies _NODE_FIELDS in the node list operation in
_refresh_cache().

We also modify the unit tests to use fake node objects that are
representative of the nodes in the cache.

Change-Id: Id96e7e513f469b87992ddae1431cce714e91ed16
Related-Bug: #1746209
(cherry picked from commit 8bbad196a7)
2020-05-01 14:52:10 +00:00
..
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_client_wrapper.py Fix {min|max}_version in ironic Adapter setup 2019-04-30 21:19:39 +00:00
test_driver.py Include only required fields in ironic node cache 2020-05-01 14:52:10 +00:00
test_patcher.py Don't JSON encode instance_info.traits for ironic 2018-02-15 17:06:16 +00:00
utils.py Include only required fields in ironic node cache 2020-05-01 14:52:10 +00:00