storwize-svc: improved test coverage and fixes.

Added test cases to cover more error paths, now providing 97% test
coverage of the storwize-svc driver. Some tests uncovered bugs in the
driver, which are fixed by this patch. In addition, there are some
fixes to the code included which address comments from the submission
of this driver to nova-volume and sync the two versions.

Change-Id: I7c646885a7f2b1e761725c14940f1d741996beb4
Add C-mode driver for NetApp.

blueprint netapp-volume-driver-cmode

Change-Id: I1eb418d05f557068bc0d4f359e19721c9c61068b
Fake requests in tests should be to v1

v2 does not exist, yet.

Change-Id: Id3a332c4d78c87882a7db1a8b98479a3881b0a5f
Merge "Fake requests in tests should be to v1"
Driver for IBM XIV storage.

Volume driver for IBM XIV storage systems, along with unit tests. The
driver imports the xiv_openstack_box class, which is a closed-source
proxy available separately to IBM XIV customers.

Change-Id: I3a3ec8b1d3e3adf1895b4a0bbd86993010d2e447
Adds new volume API extensions

Adds following extensions:
1. Create volume from image
2. Copy volume to image

Added unit tests.

Implements: blueprint create-volume-from-image
Change-Id: I9c73bd3fa2fa2e0648c01ff3f4fc66f757d7bc3f
Fix check_for_export() in non-exporting drivers

This overrides the default check_for_export so that drivers that don't
need to export block devices on the host like Sheepdog and RBD don't
raise a NotImplemented exception when this is called.

Reported-by: Mark Moseley <moseleymark@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>

Change-Id: Icf72f51904e7bdc368bfaf0a91dd0433ce3b1cf6
Merge "Adds new volume API extensions"
Remove unused imports

Fixes bug #1036666

Removed unused imports found by:
find . -type f -name "*py" -exec pylint -r n {} \; | grep -E "Unused imp|^\*"

Change-Id: Iad69354dd47c2a0dfa3a23a95c1a23eb66773b8d
Replace deprecated client with python-glanceclient

This is a copy of the code that was merged into Nova.
python-glanceclient is required for Folsom, and for using
the v2 API.

Implementing blueprint efficient-volumes-from-images
requires this since it needs to access the v2 API.

Change-Id: Ia088517abab61e824a641d4adf616e08a53a94bc
rbd: implement create_volume_from_snapshot

In an upcoming release, rbd will support creating volumes from
snapshots ('cloning'). To clone a snapshot, it must first be
'protected', which means it cannot be deleted until it is unprotected.
A snapshot can only be unprotected if no clones depend on it. Thus,
translate a failure to unprotect into a SnapshotIsBusy exception.

Also check for remaining snapshots before deleting a volume,
and raise VolumeIsBusy if any exist. While we're here, tidy up
the shell arguments to be more readable.

This is backwards compatible since it does not use the new features
unless they are available in the installed version of rbd.

Change-Id: If4105e7af7ba33f09a15103b53ad675aceb2ebb4
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge "Driver for IBM XIV storage."
add get_location method for images

This is useful for determining whether the backend storage for the
image in Glance is the same as the storage used in a volume driver.

The direct_url is only available in the v2 images API, so add a
version parameter to each request. As more parts of the v2 API are
used, this parameter will become more useful.

Change-Id: I5ca06b6d80ffe4118f8dd381ed11283573bce71f
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge "Add C-mode driver for NetApp."
Implements bp migrate-nova-volumes-to-cinder

  Helper cmds to transition from nova to cinder

  Implements an import section in cinder-manage to transfer
  applicable tables from local or remote Nova database into a
  fresh Cinder database.

  Also implements optional method to copy persistent target files.

Change-Id: I2e655e26c55f1986f3b1554726cead9e73ee9bd6
Add driver for using files on a generic NFS server as virtual block devices
Add NetApp-specific NFS virtual block driver

blueprint nfs-files-as-virtual-block-devices
blueprint netapp-nfs-cinder-driver

Change-Id: I10ef6f3e230fcea2748152313d341db46bffce55
Map internal exceptions in the nova style.

Fixes LP 1014687.

Adopt the nova idiom of internal exceptions mapped to their
corresponding HTTP reponse code in the FaultWrapper middleware,
and also inclusion of their detail message if declared safe for
external exposure.

Change-Id: I95a3c30466f6951e02f7a182545ff8db8fbecee8
Move volume size validation to api layer.

As per the discussion on this patch:

  ihttps://review.openstack.org/10540

Change-Id: I5d3031a08aa1e2d17b5fb233ebaec938c66fa88b
Merge "Move volume size validation to api layer."
Remove utils.deprecated functions.

We don't seem to use utils.deprecated at all... so lets
remove it and save ourselves 200 lines of code.

Also moves a couple misc. test cases in utils.py out of the
DeprecationTest suite and into the GenericUtilsTestCase
suite.

Change-Id: I96e93d8fa056110057c8855f2ce52c9f55cd4a9b