horizon/openstack_dashboard/dashboards/project
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
..
access_and_security Ensure document ready before auto download 2014-08-21 12:06:31 +01:00
containers Exception handling is captured correctly when deleting a container. 2014-08-11 15:47:30 -04:00
data_processing Merge "Fix Data Processing image registry" 2014-08-24 14:42:33 +00:00
database_backups Merge "Update Twitter Bootstrap to version 3" 2014-07-28 22:17:55 +00:00
databases Suppress expected exception messages in unit test 2014-08-21 10:30:53 -07:00
firewalls Fix and enable H702 _() method check 2014-08-02 12:43:27 +09:00
images Merge "reduce the height of the textarea to 4" 2014-08-21 06:57:37 +00:00
instances Merge ""Device size" field only allow positive values" 2014-08-18 12:55:11 +00:00
loadbalancers Merge "Fix policy check for LoadBalancer panels" 2014-08-12 04:02:58 +00:00
network_topology Refactor network topology JSONView class 2014-08-24 10:01:58 +00:00
networks Merge "reduce the height of the textarea to 4" 2014-08-21 06:57:37 +00:00
overview Add missing Disk unit to Overview Usage 2014-08-04 15:59:58 -07:00
routers Fixed cannot delete router port because of permission denied. 2014-08-04 23:21:39 -07:00
stacks add Previous link to Project > Stacks table 2014-08-05 15:00:48 -07:00
volumes Enable changing volume type of a volume 2014-08-25 11:09:31 -07:00
vpn Add some missing '+' icons 2014-07-29 20:24:47 +04:00
__init__.py Splits OpenStack Dashboard bits from framework app code. 2012-10-11 11:47:50 -07:00
dashboard.py Fixing display order of data processing panels 2014-07-31 16:04:03 -04:00
models.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00