horizon/openstack_dashboard
Gloria Gu fa7105d0da Enable changing volume type of a volume
Expose the functionality of the 'cinder retype' command in the UI.
It allows user to change the volume type of a volume whose status is
in-use or available when horizon's cinder API version is >= 2.

cinder retype is only supported starting cinder v2.

If enabled_backends is specified in /etc/cinder/cinder.conf,
retype is actually performed by a specific driver.
It depends on the drivers (backends) that are associated
with volume types.
Volume types are set through type-key extra specs.

If enabled_backends in cinder.conf is not specified, volumes are
created by LVM so retype is actually performaned in LVM.

During retype, if cinder finds it can not retype, it will check
if the migration policy is on_demand or never. If the policy is
is never, then cinder does not do anything, otherwise, it will
perform migration. By default, in the horizon retype dialog UI,
migration policy is never which is also the default
of the cinder cli command.

Currently in horizon cinder api default version is 1. In order to
test this functionallity, you need to update
openstack_dashboard/local/local_settings.py to have the "volume"
API to use version 2 so the "Change Volume Type" action menu
shows up for the volume. If local_settings.py is not available, you
need to copy the local_settings.py.example file, change it to
local_settings.py, update other necessary settings and also update
have the API version setting like the followings:

OPENSTACK_API_VERSIONS = {
    #"data_processing": 1.1,
    #"identity": 3,
    "volume": 2
}

Implements: blueprint volume-retype

Change-Id: Id8bc539e1849f5910df34d7b76cc250ec82f9671
2014-08-25 11:09:31 -07:00
..
api Enable changing volume type of a volume 2014-08-25 11:09:31 -07:00
conf Enable changing volume type of a volume 2014-08-25 11:09:31 -07:00
dashboards Enable changing volume type of a volume 2014-08-25 11:09:31 -07:00
enabled Separating Identity Dashboard and using RBAC 2014-08-18 16:40:56 -06:00
local Merge "Manually disable IP version when creating network subnets." 2014-08-21 01:43:03 +00:00
locale Imported Translations from Transifex 2014-08-25 06:03:48 +00:00
management Created a make_web_conf command. 2014-04-03 17:34:32 +02:00
openstack Synced jsonutils from oslo-incubator 2014-05-27 12:25:45 +02:00
static Merge "Fix styling for dynamic select widget add item button" 2014-08-23 17:24:39 +00:00
templates Update Twitter Bootstrap to version 3 2014-07-28 16:13:21 +02:00
test Enable changing volume type of a volume 2014-08-25 11:09:31 -07:00
usage Add missing Disk unit to Overview Usage 2014-08-04 15:59:58 -07:00
utils Honor dashboard DISABLED over horizon settings 2014-08-04 07:43:58 +09:00
wsgi Updated the django.wsgi file for devstack. 2012-02-29 01:37:37 -08:00
__init__.py Unifies the project packaging into one set of modules. 2012-02-29 00:20:13 -08:00
context_processors.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00
exceptions.py Merge "Update exception map based on neutronclient exception rearrange" 2014-07-24 09:59:02 +00:00
hooks.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00
policy.py Separating Identity Dashboard and using RBAC 2014-08-18 16:40:56 -06:00
settings.py Merge "Unbundle all JavaScript libraries from Horizon" 2014-08-21 16:07:31 +00:00
urls.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00
views.py Fix Flake8 style warnings in openstack_dashboard/ 2014-07-30 14:13:24 +02:00