Clean up QTree when deleting volume on NetApp storage box.

Previously, deleting a Cinder volume would leave a QTree on NetApp
storage box. This commit fixes the issue.

Fixes bug 1099414

Change-Id: I95f1d6b802f4abfad421d34f1c000b75fb72c41e
Update EMC SMI-S iSCSI Driver

Refactor EMC SMI-S based iSCSI driver.  There are lots of common code
that can be shared between iSCSI and FC drivers using SMI-S.  Break
the original emc.py into two files: emc_smis_common.py and
emc_smis_iscsi.py.  Also added support for get_volume_stats() and
create_cloned_volume().  get_volume_stats() will be revisited after
winston-d's changes.  copy volume<->image will be revisited after
avishay-il's changes.

Change-Id: I90dc3599ec2fd5bb86a3e988111a8aee5de7efea
Get updated vol status in volume.api.reserve.

A race condtion was discovered where a nova volume attach
could easily be performed twice for the same volume.  Although
the cinder attach update would fail, this occured after the BDM
updates were made and in essence the attach to the compute instance
had already been issued.

This change simply forces a get from the DB of the volume-ref in the
reserve call and checks if an attach is already in progress.

Fixes bug: 1096983

Change-Id: Ie0e4156d691ee92b6981078ef0ba62f8c4cdf0c8
Check for non-default volume name template.

The iscsi delete methods in iscsi.py had hard-coded volume names
'volume-%s'.

If a user configured volume_name_template to
something other than default the result is failure to remove
the iscsi_target.

volume create worked appropriately and created the correct name
in the DB, so the persistence files were the only thing affected
or named incorrectly.

Fixes bug: 1101071

Change-Id: Id5575874b2cebd9b3509d739cb92abf06c503c4e
Fix hosts extension and enable its tests

This patch corrects the import in hosts.py, fix the DB API
service_get_by_host_and_topic raises ServiceNotFound exception with
right parameter and move tests to the right place so that they are
enabled.

Fix LP bug: #1104231

Change-Id: I07c486f456196a3812eb5274b950ab9560a51cf3
Check for installed cinder in filter tests.

Some of the filter tests require that the cinder pkg is
installed on the system, specifically cinder.egg-info/entry_points.

This change check that the egg-info directory exists in the root
cinder directory and determines whether to skip or not.

Change-Id: I36145f170e802aed5dfae8eec4684e60ad3d6f2c
Merge "Get updated vol status in volume.api.reserve."
Merge "Update EMC SMI-S iSCSI Driver"
Merge "Fix hosts extension and enable its tests"
Implement LVM thin provisioning support.

As of LVM2 version 2.02.89 the ability to do thin provisioning
was made available in LVM, this provides some cool new features
but also addresses some problems with things like terrible
LVM snapshot performance.

Currently the version of LVM in Ubuntu 12.04 does NOT support LVM thin,
however an experimental PPA from brightbox which is a backport from
Quantal has been proposed to Cannonical to be pulled in.  For some
users the experimental PPA is a better option than dealing with some of
the current issues in the standard LVM2 version of Precise (including
the dd hangs on secure delete). See BP for more info.

This change will create the thin pool if it doesn't exist
using pool_size flag, or by default using entire VG space.

Implements BP: implement-lvm-thin-provisioning

Change-Id: I8a30a1283e1992c64e8ac96841ae4a6f82f7018a
Generic iSCSI copy volume<->image.

Implements a generic version of copy_volume_to_image and
copy_image_to_volume for iSCSI drivers.

Change-Id: Iff097629bcce9154829a7eb5aee0ea6302338b26
Implements: blueprint generic-iscsi-copy-vol-image
Update osapi_volume_extension default.

Updates the Cinder config default for osapi_volume_extension
so that it only uses the new cinder.api.contrib.standard_extensions
loader.

Previously both the new and old extension loader path were listed
which can cause extensions to be loaded twice thus causing
log WARNINGs to appear in the Cinder API log file.

Also, regenerates the cinder.conf.sample to reflect this change.

Fixes LP Bug #1107963.

Change-Id: I4e060fc8dcc49d8285e0e7db57489d10aa6d193a
Use install_venv_common.py from oslo.

This syncs install_venv_common.py from oslo and reworks the
tools/install_venv.py script to use the new library.

Change-Id: Ia271de047cc80e462fa0850cd8d626d2da777dff
Wrap SolidFire size parameter in int.

SolidFire API requires that volume size is specified as
an int value, ensure an int is provided by wrapping in int()

Change-Id: If251ce2a7095f32aa2a59bb6cc767a4136c5f88c
Allow volume back-end to report 'infinite' or 'unknown' as capacity

For some reason, some volume back-ends cannot report actual capacity
that is available or even total capacity (e.g. thin-provisioning),
Cinder should allow such capability report and make placement/schedule
decision based on these status.

In particular, we agree to use 'infinite' to mark unlimited space and
'unknown' to mark unknown/unclear space.  Host manager and CapacityFilter
are updated accordingly to allow such capacity.  For those back-ends
report 'infinite' or 'unknown' capacity, CapacityFilter will let them
pass to give them a chance to try.  Even if failure happened, the retry
mechanism should take care of the case.

Change-Id: I6871a28745111b1878a606372e6edd664f0ea10c
Replace CRLF with unix-style "LF"

Seems to be more welcome, see e.g.
http://lists.openstack.org/pipermail/openstack-dev/2013-January/004549.html

Change-Id: I35e0fac4bbfc2fdf2dd9c56c264209e0c3a20cee
Fix typo in cinder/db/api.py

The api method quota_destroy_all_by_project() calls the implementation
quota_get_all_by_project()

Change-Id: I11927e1fd29c6248ce755dfd236bf0f9adf39d94
Fixes: bug #1108766
Set source volume to "in use" during clone

When we are cloning a volume, we now set the source volume's status
to 'in use'. This prevents a user from deleting the source volume while the
backend copies/clones the contents to the new volume.
When the cloning is complete, we reset the status to it's original
state.

Change-Id: Ie43345aba77df4671ed2b429645cf8d1af9b975b
Merge "Replace CRLF with unix-style "LF""
Merge "Fix typo in cinder/db/api.py"