cinder/cinder/tests/unit/objects
Gorka Eguileor 2abd8a68bb Fix DetachedInstanceError for VolumeAttachment
Patch I253123d5451b32f0e3143916e41aaa1af75561c2 fixed the
DetachedInstanceError for VolumeAttachment OVOs but only partially, as
apparently it was dependent on the SQLAlchemy version due to the use os
"hasattr".

This patch replaces "hasattr" with a check on the object's dictionary,
which will never trigger a Lazy Load.

Closes-Bug: #1834845
Change-Id: Iac785eef9be4b9cdb5c739ee0a87949805282867
(cherry picked from commit 2e73bede80)
(cherry picked from commit 44a15be6a7)
Conflicts:
    cinder/tests/unit/volume/drivers/test_lvm_driver.py
(cherry picked from commit eabf648b7a)
2019-10-03 07:36:03 -07:00
..
__init__.py Make c-vol use workers table for cleanup 2016-11-03 10:17:38 +01:00
test_backup.py Support metadata for backup resource 2017-07-26 14:23:58 +08:00
test_base.py Fix leftovers after backup abort 2018-03-13 12:39:06 +01:00
test_cgsnapshot.py Update OVO instance on destroy method call 2016-07-22 17:54:00 +02:00
test_cleanable.py Prevent claiming and updating races on worker 2017-01-19 10:42:24 +01:00
test_cleanup_request.py Add cleanable base object and cleanup request VO 2016-10-04 15:17:31 +02:00
test_cluster.py Create custom assertTrue and assertFalse 2017-09-11 18:31:20 +02:00
test_consistencygroup.py Remove cgsnapshot_id before snapshot.save 2016-12-03 16:23:43 -05:00
test_fields.py Add VolumeAttachStatus Enum 2016-11-09 17:10:27 -06:00
test_group.py Add group to cluster when init host 2017-07-12 14:08:43 +08:00
test_group_snapshot.py Use GroupSnapshotStatus enum field 2017-07-05 01:24:00 +00:00
test_group_type.py Add group type and group specs 2016-07-08 14:26:39 -04:00
test_manageable_volumes_snapshots.py Switch ManageableSnaphots & ManageableVolumes list to OVO 2017-01-25 00:41:30 +00:00
test_objects.py Fix how backups handle encryption key IDs 2018-01-30 22:12:49 +00:00
test_qos.py Test: Fix assert_has_calls dict order bug (QoS) 2017-01-23 10:58:28 -05:00
test_service.py Fix migration 112 to use live_data_migration API 2017-10-20 18:24:33 -06:00
test_snapshot.py Fix Snapshot object metadata loading 2019-03-12 14:33:46 +00:00
test_volume.py Fix DetachedInstanceError for VolumeAttachment 2019-10-03 07:36:03 -07:00
test_volume_attachment.py Fix DetachedInstanceError for VolumeAttachment 2019-10-03 07:36:03 -07:00
test_volume_type.py Create custom assertTrue and assertFalse 2017-09-11 18:31:20 +02:00