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

Status:
Complete
Approver:
Andrew Laski
Priority:
Medium
Drafter:
Nikola Đipanov
Direction:
Approved
Assignee:
Nikola Đipanov
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Russell Bryant
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

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

Sponsor(s): Andrew Laski

Gerrit topic: https://review.openstack.org/#q,topic:bp/clean-up-legacy-block-device-mapping,n,z

Addressed by: https://review.openstack.org/50679
    Add a get_root_bdm utility function

Addressed by: https://review.openstack.org/50680
    Move is_volume_backed_instance to new style BDM

Gerrit topic: https://review.openstack.org/#q,topic:bug/1241615,n,z

Addressed by: https://review.openstack.org/54545
    Make rebuild use new-style BDMs

Addressed by: https://review.openstack.org/54572
    Make rebuild use new-style BDMs

Gerrit topic: https://review.openstack.org/#q,topic:bug/1246412,n,z

Addressed by: https://review.openstack.org/54603
    Make unshelve use new style BDM

Addressed by: https://review.openstack.org/54604
    Make unshelve use new style BDM

Gerrit topic: https://review.openstack.org/#q,topic:bp/icehouse-objects,n,z

Addressed by: https://review.openstack.org/57748
    Move compute API is_volume_backed to BDM objects

Addressed by: https://review.openstack.org/59033
    Make volume_snapshot_{create,delete} use objects

Addressed by: https://review.openstack.org/59034
    Make snapshot_volume_backed use new-world objects

Addressed by: https://review.openstack.org/60824
    Use objects internally in DriverBlockDevice class

Addressed by: https://review.openstack.org/63827
    Make volume attach use objects

Gerrit topic: https://review.openstack.org/#q,topic:bdm_objects_attach,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bdm_objects_rebuild,n,z

Addressed by: https://review.openstack.org/70135
    Move some compute methods to BDM objects

Addressed by: https://review.openstack.org/70136
    Move rebuild to BDM objects

Gerrit topic: https://review.openstack.org/#q,topic:bdm_objects_delete,n,z

Addressed by: https://review.openstack.org/70747
    Move instance delete to new-world BDM objects

Gerrit topic: https://review.openstack.org/#q,topic:bdm_objects_compute,n,z

Addressed by: https://review.openstack.org/71063
    Move detach_volume and remove_vol_connection to BDM objects

Addressed by: https://review.openstack.org/71065
    Move instance_resize code paths to BDM objects

Gerrit topic: https://review.openstack.org/#q,topic:bdm_objects_api_final,n,z

Addressed by: https://review.openstack.org/72341
    Remove compute API get_instance_bdms method

Addressed by: https://review.openstack.org/71064
    Make swap_volume code path use BDM objects

Gerrit topic: https://review.openstack.org/#q,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:
=======================

https://review.openstack.org/#/q/topic:bdm_objects_rpc,n,z
https://review.openstack.org/#/q/topic:bdm_objects_api_final,n,z
https://review.openstack.org/#/q/topic:bdm_objects_compute,n,z

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.