Update SolidFire volume driver

Implements blueprint update-solidfire-driver

* Updates driver to reflect changes in the release version of SF API
* Modify SF naming scheme
* Implement snapshot functionality
* Implement setting qos on create via metadata
* Update/Add tests

(cherry picked from cinder commit df5c4ba)

Change-Id: I08f7aac31e9d95f971d297a19c285dfa7151b931
Fix flavor deletion when there is a deleted flavor

If there is a deleted flavor with the same ID as an undeleted flavor,
the flavormanage delete code attempts to delete it again, which fails.
This patch makes sure to pass read_deleted='no' when the flavor is
retrieved for deletion so we get the undeleted flavor. Includes a
failing test to make sure the value is passed properly.

Fixes bug 1048678

Change-Id: If6a20de2526b7ba90ada4a40317a98f79b2141dc
More specific lxml versions in tools/pip-requires

Changed lxml version in tools/pip-requires from >=2.3,<3 to
>=2.3,<2.3.5.  pip was apparently accepting 3.0alpha as a <3 requirement
but the ordering of elements changes in that version.  Some of the
libvirt tests would pass with lxml 3.0alpha but fail with any 2.3.x
version.  The tests now pass with any version of lxml within the range
specified.

Change-Id: I2d84d32f1bf6fba2c6dbe05799a284a44d4c39d8
Adds API sample test for Flavors Extra Data extension.

Change-Id: I65f8ed10dc5c1d31f848ad3fdc5c63e17fdc518f
Add flag cinder_endpoint_template to volume.cinder

Add optional flag to allow cinder endpoint to be defined by flag rather
than extracted from the request context's service catalog.  No change to
default behavior.

This flag allows deployers to use a seperate management endpoint for
cinder which compute can use exclusively to send messages to cinder, or
just use an auth system that doesn't add/forward the catalog along with
the request (e.g. noauth).

Add python-cinderclient to tools/test-requires

fix lp bug #1048798

Change-Id: Icb416bf4df2a6e37024f1fbc866006d46d30bcf2
fix rpcapi version.

In commit ce4dbbd7, the BASE_RPC_API_VERSION was changed to '2.1' in
nova.compute.rpcapi.  This should remain '2.0' until the API goes to
3.X.  Only specify version '2.1' for the method that requires it
(rebuild_instance).

Add a NOTE above each instance of BASE_RPC_API_VERSION to try to help
clarify this for the future.

Change-Id: I06cef44c905e8966505d5fb5b1046d6a0c75d533
Reset task state before rescheduling

Reset the task state to SCHEDULING before attempting re-scheduling.
This is a precaution to make sure subsequent calls to update the
task state see an 'expected_task_state'.

bug 1049897

Change-Id: I5667a88487bd7039eb2e0aaebef532199d8b31ef
Add 'detaching' to volume status

Fixes bug #1004382

When attach a volume , the volume status is "available -> attaching ->
in-use", But when detaching a volume , the volume status is "in-use ->
available". So We need 'detaching' volume status, it make the change of
state of the volume more clearly.

Change-Id: I544220c206899307294d50e26679f5351fdc0cd7
Stop fetch_ca from throwing IOError exceptions

Fixes bug #883300

Fixes problem where fetch_ca could throw an IOError exception rather
than a Nova specific exception.
Adds FileError exception.
Fixes other functions in crypto.py that had very similar problems.

Change-Id: Ic2e43c35ad58c67d33156c53d2a41910dfdf8678
Change comment for function _destroy

Change 'the instance if already' to 'the instance is already'

Change-Id: I31bee8d7c3049d14442abffce4b48589af083544
libvirt: Fix live block migration

Current check_can_live_migrate_destination trys to get instance info
by call self._conn.lookupByName(instance_name) on the destination
host before migrating. Because the instance is not on the destination
host yet, it failes with InstanceNotFound.

This fix gets the available disk size of the destination side.
On the source side, checks whether the above space is enough before
migrating.

Fixes bug 1044237

Change-Id: I20f64e1f85828049b697a4b1173bac8e5779d45a
PowerVM: Establish SSH connection at use time

Establish SSH connection at use time in PowerVM compute driver, in order
to work around a paramiko error on slow networks. Patch based on a
proposal by David Peraza.

Fixes bug 1040785.

Change-Id: I1a656981fae2f384c748c077d608018a0aafb681
Rename _unplug_vifs to unplug_vifs

self._vmops is of type VMWareVMOps, which doesn't have unplug_vifs
defined.

Partially fix bug 1037183

Change-Id: I561788fbfea1d221e13850e93593f8b9a96d9f7c
Check flavor id on resize.

Actually it checks for memory size changes so you can't change just cpu or hdd when resizing instances.

Fixes bug 1049195

Change-Id: I793d19dbf5f1d89d365e63ab61b4edb983fdb11c
Merge "libvirt: Fix live block migration"
Merge "PowerVM: Establish SSH connection at use time"
Avoid live migrate overwriting the other task_state

As commit 4082c8375a6ae7e7e67c7ad2e263be2d5fc3dd1f says,
one ordinary task is running, so that task_state is set. The
live_migrate task is accepted at API, and will change task_state to
MIGRATING. However the first task may continue to update task_state or
set it to None as it finishes.

This patch avoids it by updating task_state in compute.api.live_migrate
level with expected_task_state=None.

Add test case for compute.api.live_migrate.

Fixes bug 1049533

Change-Id: Ida8cef4797de421a7e356c9f5e882fe926535639
Avoid VM task state revert on instance termination

Related to bug 1046236.

Previously, if an exception is raised during the nova-compute node's
instance termination logic *before* the instance is evicted from the DB
(e.g. in the network teardown), then the task_state is reverted back to
None by the reverts_task_state decorator, so the instance continues
to be reported as ACTIVE with no outstanding task.

A subsequent attempt to delete the same instance results in the
quota_usages in_use count being decremented a second time.

This occurs despite I91a70ada as that fix depends on the VM task state
continuing to be DELETING. That logic was undermined in Id4358c50 which
caused the task state to be reverted on the successful or unsuccessful
conclusion of the action on the compute node.

Now, the motivation for Id4358c50 was to avoid the VM getting stuck with
a task state that prevents any further action other than deletion.
However in the case of a deletion already having been requested, this
protection is unnecessary and counter-productive. Hence we remove the
task state reversion from the terminate_instance action.

Change-Id: Ie5701e5c12f6241a203423d29d05df1858406c56
Makes key_name show in details view of servers

The wrong authorizor was being used in the details view and the test
for details was broken. This fixes the test and makes sure that
key_name shows up in details like it is supposed to.

Fixes bug 1043584

Change-Id: I4ff01bbd32759f30e7a31ef2eac9f58922843037
Merge "Avoid VM task state revert on instance termination"