Sync notifier changes from openstack-common

Syncs the following from stable/folsom:

 c767e9b Add multiple-driver support to the notifier api.

Also remove notification_driver from cinder.flags. This should
have been done when first adopting this code from openstack-common
since the option is defined there now.

Note: I've left the cinder-specific change to use cinder's context
rather than openstack-common's context.

Change-Id: I6ff4b5d45ca9cc4acaf37c62c143f2886ebee423
Add update to volume and snapshot controllers

Add update method to api.openstack.volume.volumes and snapshots
controllers.  Url mapping automatically routes a PUT on the resource to
the update method.  Implementation closely matches updates to server
resource for the openstack compute api.

e.g.

curl http://localhost:8776/v1/${PROJECT_ID}/volumes/${VOLUME_ID} \
    -H 'x-auth-token: ${ADMIN_AUTH_TOKEN}' \
    -H 'content-type: application/json' \
    -XPUT -d '{"volume": {"display_name": "new-name"}}'

Add volume.api.API.update_snapshot method to avoid making db calls
directly from the SnapshotsController.

Add tests for new methods.

Update return value of test_volume.VolumeTestCase._create_snapshot
to return the whole model like _create_volume

fixes lp bug #1042904

Change-Id: I887178f9b7834cc7afd54bba8fb902b630faf8c0
Update rpc from openstack-common.

Fix bug 1049843.

This commit syncs the following commit from openstack-common:

    commit 7e9f72bb28456c912aa80945dbdb8d200f81b462
    Make projects define 'control_exchange'.

This change allows cinder to set a project-specific default of 'cinder'
for the 'control_exchange' option.  The option is now defined in
cinder.flags.

Change-Id: Ia91c172ca0665798d616f9faf5880770074235c8
Sync log format changes from openstack-common.

This patch pulls in the following change from openstack-common:

    9f88d84 Improve logging of process id

Change-Id: I6c5be346ed332d14357441b2b147ad1f09157f41
Use tmpdir and avoid leaving test files behind

 We were just creating a file for testing iscsi persist files and
 weren't cleaning up after the test.

 Change this to use a tmpdir and make sure we leave no tracks.

 Fixes bug #1050086

Change-Id: I9b9a2400a172d52987d76f3132793cb042fd201c
Merge "Update rpc from openstack-common."
Merge "Sync log format changes from openstack-common."
Merge "Use tmpdir and avoid leaving test files behind"
Fix FLAGS.volumes_dir help message

And other nova/volume/iscsi.py typos

Change-Id: I781a07b4f11b6cf336c278a6994bd5575ae1a70a
Fixes bug 1050135.

Regenerate cinder.conf.sample and fix a couple related bugs.

Change-Id: I3e472f9c69ad4888dc15f901f4bc7cd825fb5ba1
Should've added super().tearDown() in test_iscsi

  Made changes to use tempfiles and implemented teardown,
  but should have also called super().tearDown as well.

  Associated with chage: I9b9a2400

Change-Id: I2e9d1cb7bfbe78323630eb2f3270698a7ce7e4c4
Add entity body validation helper

Add a _valid_body() helper for the to avoid repeating the same tests in
multiple methods. Include a check that the entity itself is actually a
dict.

(Cherry-picks part of commit d1ad73ee from Nova)

Change-Id: If8114cc76d68567005c85c803f29e30e034db89a
Improve entity validation in volumes APIs

Fixes bug #1048565

Use the new Controller.is_valid_body() helper to validate the entity
body in various volumes related POST/PUT handlers and return 422
as appropriate.

Change-Id: I04127972981522c1ed81903893396c4f9665bcd3
Merge "Add entity body validation helper"
Add a resume delete on volume manager startup

  Currently if for some reason the volume service was stopped
  during the zero out operation of a volume delete there was
  no way to get the volume removed from the system (it would
  be present in deleting status forever).

  This change adds a simple check of volumes in the DB with status
  of deleting, and if any are found it restarts the delete process
  on them.

  addresses bug #1011150

Change-Id: Id4c4a3bc61f95245ebc6658234b4b88029956562
Merge "Improve entity validation in volumes APIs"
Merge "Add a resume delete on volume manager startup"
Merge "Sync notifier changes from openstack-common"
Sync a change to rpc from openstack-common.

This commit pulls in the following change from openstack-common:

    ee44222 Change the qpid_heartbeat default to 60 seconds.

Fix bug 1050661.

Change-Id: I999e16c18227f9aab4dc8c2ff88cd6907c7c8191
Update quota when deleting volume that failed to be scheduled

If one volume was failed to get scheduled, removing such volume should
also clean up reservation.
Also when create_volume is ready to send to scheduler, reservation
should be committed no matter backend can successfully create that
volume or not since deleting volume call will do a minus reservation
even on volume with 'error' status.

Fix bug 1052052

Change-Id: Iaec9926024ad5adb38b08b07772095f49b8593c2