Clean up usage of legacy block device mapping

Registered by Nikola Đipanov

As part of the havana blueprint improve-block-device-handling we introduced the new block device data format, but in order to keep the work managable, we introduced the ability to transform block devices to the old (legacy) format so that we can still have code that is unaware of the new format.

Some code paths that use it:
* Delete
* Rebuild
* Snapshot
* Rescue
* Shelve
* Volume_snapshot{_create,_delete}

We should make the code use the new data format. This will likely not involve any new functionality - the functionality has been added to boot in the parent blueprint. The only place where we should be using legacy format is in the v2 API if the request format has been used to launch an instance.

Blueprint information

Andrew Laski
Nikola Đipanov
Nikola Đipanov
Series goal:
Accepted for icehouse
Milestone target:
milestone icon 2014.1
Started by
Russell Bryant
Completed by
John Garbutt

Related branches



Moved to needs code review, patches are up --johnthetubaguy

Sponsor(s): Andrew Laski

Gerrit topic:,topic:bp/clean-up-legacy-block-device-mapping,n,z

Addressed by:
    Add a get_root_bdm utility function

Addressed by:
    Move is_volume_backed_instance to new style BDM

Gerrit topic:,topic:bug/1241615,n,z

Addressed by:
    Make rebuild use new-style BDMs

Addressed by:
    Make rebuild use new-style BDMs

Gerrit topic:,topic:bug/1246412,n,z

Addressed by:
    Make unshelve use new style BDM

Addressed by:
    Make unshelve use new style BDM

Gerrit topic:,topic:bp/icehouse-objects,n,z

Addressed by:
    Move compute API is_volume_backed to BDM objects

Addressed by:
    Make volume_snapshot_{create,delete} use objects

Addressed by:
    Make snapshot_volume_backed use new-world objects

Addressed by:
    Use objects internally in DriverBlockDevice class

Addressed by:
    Make volume attach use objects

Gerrit topic:,topic:bdm_objects_attach,n,z

Gerrit topic:,topic:bdm_objects_rebuild,n,z

Addressed by:
    Move some compute methods to BDM objects

Addressed by:
    Move rebuild to BDM objects

Gerrit topic:,topic:bdm_objects_delete,n,z

Addressed by:
    Move instance delete to new-world BDM objects

Gerrit topic:,topic:bdm_objects_compute,n,z

Addressed by:
    Move detach_volume and remove_vol_connection to BDM objects

Addressed by:
    Move instance_resize code paths to BDM objects

Gerrit topic:,topic:bdm_objects_api_final,n,z

Addressed by:
    Remove compute API get_instance_bdms method

Addressed by:
    Make swap_volume code path use BDM objects

Gerrit topic:,topic:bdm_objects_rpc,n,z

This is very tied up with the objects work, hard to split out these patches. --johnthetubaguy

Topics with some patches left:

Late move to medium, due to dependency --johnthetubaguy


Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.