Support Cinder v2 in Horizon

Registered by Julie Pichon

Horizon should still be usable when using a Cinder v2 endpoint.

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Julie Pichon
Direction:
Approved
Assignee:
Julie Pichon
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Julie Pichon
Completed by
Julie Pichon

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/cinder-v2-horizon,n,z

Addressed by: https://review.openstack.org/70149
    Basic support for Cinder v2

[jpichon 2014.01.30] Note: The proposed solution makes backwards-incompatible changes in terms of moving toward using the v2 attributes and only reading the v1 attributes as a fallback. Any code that made use of the v1 attributes in Horizon itself was fixed to use the new ones. However, this means that any project that consumes horizon and was using the APIs in openstack_dashboard/api/ will be broken. I'm not sure what kind of contract we offer with regard to these APIs.

It would be trivial to also support the v1 attributes if we want to avoid breaking possible consumers (basically add properties for the old attributes, possibly with some sort of deprecation warning logged or in the comments).

The reason for deciding to move toward using the v2 attributes rather than preserve the old ones was that it's The Future and the attributes were changed to be more consistent with the other clients, which is helpful.

[jpichon 2014.02.06] Note of interest (it doesn't affect this patch): Nova doesn't support Cinder v2 yet either (see https://blueprints.launchpad.net/nova/+spec/support-cinderclient-v2 - should happen in Icehouse).

[jpichon 2014.02.12] How to test:

In the local settings, set 'volume' in OPENSTACK_API_VERSIONS to 1 or 2 depending on the version you want to test.

OPENSTACK_API_VERSIONS = {
    "volume": 2
}

If your debug levels are set, you should be able to verify that the cinderclient calls are using the appropriate v1 or v2 URL.

Panels of interests:
* Volumes: All the volume actions should still work using either v1 or v2
* Images & Snapshots: Volume snapshots actions should work using v1 and v2
* Instances: Create instance has several options related to volumes and booting from volumes, these should still work and the volumes or volume snapshots displayed correct
* Admin - Volumes: Should display correctly, no changes for volume types which are still expected to work with both versions.

The name display was also generally improved so that the volume id is always shown if the volume doesn't have a name.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.