nova/nova/tests
Nikola Dipanov 4bd8a4bd8e Fix overloading of block device on boot by device name
Currently it is not possible to override an existing image block device
by supplying the device with the same name at boot (see also
Ib1ba130042aabbbe7bb8d60fc212c66e446c1d73). Even though we want to
discourage usage of device names as much as possible in the Nova API (as
not all hypervisors can honour them), EC2 API requires that this is possible.

While we want to make sure we document that supplying device names at
boot is only really desirable if you want to override some of the ones
contained in the image, introducing a different labeling system just so
that we don't use the device names seems like an overkill for a feature
that does not seem to be very used.

This patch adds a method that will do this deterministically when
compiling all the block device information for the request.

It is also worth noting that The EC2 API allows only subset of block
device attributes to be overridden in this way (see [1]). This limitation
did not exist previously in Nova, and there seems to be no reason why we
would need that complexity, so it would be up to the EC2 compatibility
code to deal with this.

[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM

Doc-Impact
Closes-bug: #1370250

Change-Id: I60ecdcae81ff5dec34f0fa0a39e0739759a6fa59
2015-07-29 18:34:41 +01:00
..
functional Merge "Add middleware filterout Microversions http headers" 2015-07-27 21:07:24 +00:00
unit Fix overloading of block device on boot by device name 2015-07-29 18:34:41 +01:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fixtures.py Block subtractive operations in migrations for Kilo and beyond 2015-06-30 19:56:43 -07:00