cinder/cinder/db
whoami-rajat 3b3e0b2c58 Make volume soft delete more thorough
When a volume record is soft-deleted in the database,
dependent records in other tables (for example,
Transfers, VolumeGlanceMetadata, etc.) must be soft
deleted as well.  Otherwise, we will get FK dependency
errors when the database is purged.

This patch adds that support for VolumeAttachment table.
(other tables were already covered, just refactored)

Also adds tests.

Co-authored-by: Rajat Dhasmana <rajatdhasmana@gmail.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: Ibfa6c4ba2f162681756ec3203991351345b65346
Related-Bug: #1542169
(cherry picked from commit a5bb17bdfc)
(cherry picked from commit dd2ba49004)
2020-01-24 07:06:02 +00:00
..
sqlalchemy Make volume soft delete more thorough 2020-01-24 07:06:02 +00:00
__init__.py Enable flake8 H303,H304 checking 2014-04-15 09:16:01 +00:00
api.py Use config-table for dynamic config documentation 2019-02-26 16:50:39 -06:00
base.py Add ability to specify backup driver via class name 2017-10-11 12:59:00 +03:00
migration.py Compact DB migrations to Ocata 2019-02-07 15:06:22 -06:00