Add LUN# to provider_location in Nexenta driver.

Fixes bug 1088411. Lets Nexenta driver work with any iscsi_helper.

Change-Id: Ib70ed94fa472c7281de077f0f36575216741678f
Add capability to update volume metadata.

This addresses some cleanup and bugs with volume metadata updates
on the cinder side.  Mostly this implements v1/volume_metadata api
and adds things like propery checks to cinder.volume.api.update_volume_meta.

NOTE: This is only for api V1, a seperate patch will be provided for
V2 once this lands.

The remainder of the bp will be implemented in a cinderclient patch to follow.
Implement cinder side of blueprint update-vol-metadata

Also fixes bug: 1096018

Change-Id: Ie11931f657d3dcd69680fe5fcae435ff89549d97
Clean up IPV6 config checks in test_wsgi.

Two tests in test_wsgi require a configured IPV6 interface.
We added a check/skip for this but it wasn't very graceful and
didn't work on OS-X or platforms other than Linux.

This patch implements the checks a bit cleaner using the skip_if
decorator, and combines the linux/path check and configured interface
check.

Change-Id: I950fdfeb8135912faf5dcaabe52fb87abd73dd1e
Fix error for extra specs update with empty body.

Fixes: bug #1090320
Change-Id: Ia2792d477f7670ecb2eb0c9c10dcbf1cf5b2389e
ensure zeros are written out when clearing volumes

Note O_DIRECT is _not_ used when copying from /dev/zero
and there are issues with enabling that (see 444cd542).
Therefore we arrange to have dd issue an fdatasync()
to ensure the data is persisted, lest it be discarded
from the write cache when the device is unprovisioned.

* cinder/volume/drivers/lvm.py (_copy_volume): Add 'conv=fdatasync'
to the dd option list if O_DIRECT isn't used when clearing
(which it won't as descrived above).

Fixes bug: 1100363
Change-Id: I76789557754ebaeb6d52bb34548a2ef17808fbf6
Improve error message for missing NFS share config

If FLAGS.nfs_share_config is not defined, the error will reference
the name of the config option to set.

If the nfs_share_config path doesn't exist, the error will reference
the path that was configured.

This will hopefully simplify troubleshooting of NFS configuration.

Change-Id: Ica6a60a63330554dc880f36962f3a081926ce5cf
Fix NFS volume creation

NfsDriver uses an undefined method _sizestr.  This patch removes it.

Change-Id: I7cd4d04f404a00c22021f3971eb9f9593c657896
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
Merge "Add capability to update volume metadata."
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
Merge "Clean up IPV6 config checks in test_wsgi."
Merge "ensure zeros are written out when clearing volumes"
Merge "Improve error message for missing NFS share config"
Merge "Fix error for extra specs update with empty body."
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
Merge "Add LUN# to provider_location in Nexenta driver."
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."