nova/nova/tests/functional/wsgi
Mohammed Naser 16c2c8b3ee Ensure attachment_id always exists for block device mapping
If an instance is deleted before it is scheduled, the BDM
clean-up code uses the mappings from the build request as
they don't exist in the database yet.

When using the older attachment flow with reserve_volume,
there is no attachment_id bound to the block device mapping
and because it is not loaded from database but rather from
the build request, accessing the attachment_id field raises
an exception with 'attachment_id not lazy-loadable'

If we did a new style attach, _validate_bdm will add the
attachment_id from Cinder.  If we did not, then this patch
will make sure to set it to 'None' to avoid raising an
exception when checking if we have an attachment_id set in
the BDM clean-up code

Change-Id: I3cc775fc7dafe691b97a15e50ae2e93c92f355be
Closes-Bug: #1750666
2018-02-21 14:29:31 -05:00
..
__init__.py nova flavor manage functional test 2015-02-20 08:50:44 -05:00
test_flavor_manage.py Remove compatibility code for flavors 2017-09-05 10:36:10 -04:00
test_interfaces.py Fix functional tests for USE_NEUTRON 2017-12-21 19:11:46 -05:00
test_secgroup.py Enable global hacking checks and removed local checks 2017-02-10 15:09:37 +01:00
test_servers.py Ensure attachment_id always exists for block device mapping 2018-02-21 14:29:31 -05:00