nova/nova/virt/xenapi
Matt Riedemann 151242ab71 xenapi: avoid unnecessary BDM query when building device metadata
This change makes _save_device_metadata only query the database
for the instance BlockDeviceMappingList if there are block
device mappings in the block_device_info dict. If there are none,
then there is no point in making the extra useless query to the
database.

A TODO is left in the code since this could be further optimized
if the DriverVolumeBlockDevice object would proxy the 'tag' attribute
from it's underlying BlockDeviceMapping object, but that is a bigger
change saved for another time.

The existing unit test is fixed up and another unit test is added
to validate that we don't query the database if there are no
block device mappings to process.

Change-Id: Ia879b97775125406bd4134f2438d8b988eabc41d
2017-07-06 13:29:43 -04:00
..
image XenAPI: Remove bittorrent.py which is already deprecated 2017-06-07 19:09:58 -07:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
agent.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
driver.py Merge "XenAPI: device tagging" 2017-06-29 16:08:19 +00:00
fake.py Completed implementation of instance diagnostics for Xen 2017-06-04 15:47:40 +04:00
firewall.py Fix python3 issues with devstack 2016-12-21 22:20:00 -05:00
host.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
network_utils.py Fixes dict keys and items references for Python 3 2015-12-07 12:19:59 +02:00
pool.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
pool_states.py Remove vi modelines 2014-02-03 14:19:44 +00:00
vif.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
vm_utils.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
vmops.py xenapi: avoid unnecessary BDM query when building device metadata 2017-07-06 13:29:43 -04:00
volume_utils.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
volumeops.py Remove translation of log messages 2017-06-13 11:20:28 +07:00