Volume RPC API Versioning

Add versioning to Volume Rpc API version.  This is initial version
1.0, which is compatible with previous non-versioned RPC API.

Note: this patch slightly change the db.volume_update() behavior,
which now returns updated volume info.

Change-Id: I78036b6ed97c5bc369d8c85307ecaaad8e31ff90
Merge "Volume RPC API Versioning"
Add hosts extension to Cinder.

This adds the hosts extension to Cinder which is similar to
the extension by the same name in Nova.

This extension allows an admin user to check the status of
Cinder services on different hosts.  In addition it also
provides the capability to get host and project specific information
regarding volume count and space allocated for volumes on a specified
host.

Implements blueprint cinder-hosts-extension

Change-Id: Ic3679cfcd900baecdc2da17e42194cac99c9d422
Pass in correct volume_ref to create_from_snapshot.

The new rpc versioning change introduced a bug in the
create_from_snapshot code.  The originating volume_ref
was being passed in instead of the newly created volume_ref
as expected.

Fixes bug 1080898

Change-Id: I6ba4f4989c77e29685abb2649af8e003c447ab0f
Removes the xensm driver

This code does not work, and is slowly being replaced by
alternative XenServer specific drivers.

Fixes LP bug #1077011

Change-Id: I1af92ecdbb49a57a0ff4c05a70d77bcb69958cb2
Pin pep8 1.3.3

Apart of making pep8 version standard across all openstack
projects.

Also fix tools/hacking.py so it is compliant for pep8 1.2
and beyond, taken from fbc4568 in the nova tree.

Change-Id: I801c98a01960fa113dae1b6174c1a06bb149fea3
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Remove redundant db.volume_update() in volume manager create_volume()

Since scheduler has already updated db to set the 'host' field and
recorded 'scheduled_at' time, it's not necessary to do db.volume_update()
again in volume manager create_volume() method.  Also let volume api
to update db when creating volume from snapshot while snapshot_same_host
is true, thus the behavior is consistent (updating db when placement
decision is made).

Change-Id: I43aaee8e2a5d0ceadb98bd608cc147467488349e
Add db table for Glance Metadata

This commit implements the blueprint
https://blueprints.launchpad.net/cinder/+spec/retain-glance-metadata-for-billing

It creates the new table volume_glance_metadata in the cinder
database, provides the CRUD methods for it, and populates the table
when a volume or snapshot is created from a Glance image.

Patch set 2: remove superflous line

Patch set 3: Fix incorrect column types in sqlalchemy/models.py

Patch set 4: Define exception class GlanceMetadataExists

Change-Id: I8f98f6eaae005a33bfd49cea783774407b7aa120
Add XenAPINFSDriver

Related to blueprint xenapi-storage-manager-nfs

As xensm was not pulled to Cinder, this change shows an implementation
example for using an NFS export for volumes. This change contains the
volume create and delete functions, as a minimal set of functionality.
The connection information structure is compatible with the previous
xensm implementation.

Activate the driver with the following configuration entries in
cinder.conf:

volume_driver=cinder.volume.xenapi_sm.XenAPINFSDriver
xenapi_connection_url=http://<yourxenserver>
xenapi_connection_username=root
xenapi_connection_password=<secret>
xenapi_nfs_server=<nfs_server_address>
xenapi_nfs_serverpath=/exported_catalog

Change-Id: Ieaf077f540fc026c5bc37f2e3eb9d48fb96d0b74
Merge "Add XenAPINFSDriver"
Add volume bootable information to api response

If there is any glance metadata associated with a volume, we'll consider
the volume bootable. This will return the information for both /volumes
and /detail calls.

blueprint list-bootable-volumes

Change-Id: Id9dbe5cb648be62fb19bb8bd6a97d8eab05ec25a
Cleaning up volume driver paths

Moved all the remaining drivers under
cinder.volume.drivers. Updated the tests with
the new module paths and add backwards compatibilty
for the existing paths.

Implements bp driver-cleanup

Change-Id: I7673b5209cc072ac859d7d32cdeed2e7a17331e8
Merge "Removes the xensm driver"
Merge "Cleaning up volume driver paths"
Merge "Add volume bootable information to api response"
Moving common api code into cinder.api

This is progress for beginning to have separate versions of the
cinder api. Common code that would be shared by v1, v2 etc will use
these modules, so we'll just move them to a common place. Test directory
structure has also been updated.

progress on blueprint apiv2

Change-Id: I99fd95fc3bb5d4f4fc3d9ef5b76b6372a1f6033d
moving all middleware code in cinder.api.middleware

This includes auth, sizelimit, and faultwrapper middleware. Test
directory struture has been adjusted to match.

progress on blueprint apiv2

Change-Id: I62eecb208553abfee8dc8d2679264884b4cec153
Switching api to use base extension manager

progress on blueprint apiv2

Change-Id: I68640a88c7c2b7ee4c6661fa26a4f82d9c63b00f
Moving api v1 implementation into v1 directory

Adjusts paste to use composite factory for routing properly to v1 and
future api versions. Tests have been adjusted to match directory
structure.

progress on blueprint apiv2

Change-Id: I2cd3908705d224872b2d615cabe210fb1c453232
Moving contrib to cinder.api

This moves over all contrib to a common place for all api versions to
use. Test directory structure has been adjusted to match.

For compatibility with old cinder config settings, we ignore the old
contrib path and use the new location.

progress on blueprint apiv2

Change-Id: If1a24fd3c4d15db559674a021f6928613966e3a1