cinder/cinder/scheduler
Geraint North e6a3206523 Volume manage/unmanage support
Implements: blueprint add-export-import-volumes

Volume manage/unmanage support.

This change adds two new API extensions:

volume_unmanage.py:
Adds an "os-unmanage" action on an existing volume, which causes a
delete operation to flow through the stack, with a flag that indicates
that a different method ("unmanage") should be called on the driver
instead of delete_volume. A default, empty, implementation of unmanage
is provided.

volume_manage.py
Adds a new "os-manage-volume" API. A POST to this URI is very similar to
volume creation, except that the images, snapshots and existing volumes
cannot be specified. Instead the following must be specified:

host: Cinder host on which the existing storage resides
ref: Driver-specific reference to the existing storage object

name, description, volume_type, metadata and availability_zone are
supported as per a normal volume creation.

In order to support some re-use between volume_manage and the regular
volume creation, add_visible_admin_metadata has been factored out into
the cinder utils.py module.

The rest of the changes are just the implications of the host/ref
specification moving through the api, rpcapi, manager and flow (API and
Manager) layers. Management of an existing volume causes the
manage_existing_get_size() and manage_existing() methods to be called on
the driver, and a reference LVM implementation is provided.
brick/local_dev/lvm.py now includes a method to rename an LV.

Change-Id: Ifc5255b2fd277c0f60d25fc82a777e405b861320
2014-03-04 19:54:19 +02:00
..
filters Pull latest scheduler change from Oslo 2014-01-16 14:34:16 +08:00
flows Fix misspellings in cinder 2014-02-08 08:59:01 +08:00
weights Fix misspellings in cinder 2014-02-08 08:59:01 +08:00
__init__.py Remove vim header 2013-12-30 18:53:02 -06:00
driver.py Drop Chance/SimpleScheduler Implementation 2014-01-09 18:29:27 +08:00
filter_scheduler.py Add ability to modify volume type 2014-01-06 22:02:09 +02:00
host_manager.py Don't clear host_state_map when scheduling 2014-02-27 10:25:05 +08:00
manager.py Volume manage/unmanage support 2014-03-04 19:54:19 +02:00
rpcapi.py Volume manage/unmanage support 2014-03-04 19:54:19 +02:00
scheduler_options.py Remove vim header 2013-12-30 18:53:02 -06:00
simple.py Drop Chance/SimpleScheduler Implementation 2014-01-09 18:29:27 +08:00