Remove multipath mapping device descriptor

When detaching a volume from a instance, we need to remove
multipath mapping device descriptor if there are other volumes
mapping to the host instead of do nothing, for some cinder drivers
can not terminate connection for multipath tool sending IOs to
storage array periodically.

Closes-bug: #1223975
Change-Id: I6fc02e045146ece49162ca6be1a83fa8d0214a0a
Update schema_diff.py to use 'postgresql' URLs.

This gets rid of a SQLAlchemy deprecation warning when using this tool w/
PostgreSQL:

The SQLAlchemy PostgreSQL dialect has been renamed from 'postgres' to
'postgresql'. The new URL format is
postgresql[+driver]://<user>:<pass>@<host>/<dbname>

This appears to have been deprecated in the SQLAlchemy 0.6 series so I think we
are Okay to remove it now.

Change-Id: If8fdf822ba452b387e9f2f3ec7c9157e4ae932f9
Remove useless variable from libvirt/driver.py

There are some variables in libvirt/driver.py were never used, so
we can just remove them.

Change-Id: Ie29bfbeef8c185697aa94a6e05e67a70436302c8
Use _get_server_admin_password()

There is _get_server_admin_password() for getting an admin password
in ServersController class. This patch makes some methods use it for
code clean-up.

Change-Id: Iff9d960126e1c09d928d72b572838e6f16cc4f33
Add auth_token settings to nova.conf.sample.

Updates our example config file so that it includes configuration
settings for the auth_token middleware.

Includes the latest generate_sample.sh from Oslo.

Related-Bug: #1240753

Change-Id: I393a67f1f005e775928130c9241aa7e25c391ae3
Correct exception handling

Previously, it was possible for an exception to be hidden and cause other
errors for example:
    UnboundLocalError: local variable 'port' referenced before assignment
was previously occuring if e.status_code != 404

Fixes bug: 1245700

Change-Id: I27e44ffd33a73c88745de8fda8fd7c374435808a
Replace assertEquals with assertEqual - tests/scheduler

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This is part of blueprint assertequal

Change-Id: I5a6c6ac5d248ea1666f93196d21eb23e793b36d1
Add notification for host operation

Add notification for the following host operations:
1) compute/api.py:set_host_enabled
2) compute/api.py:host_power_action
3) compute/api.py:set_host_maintenance

This can make sure 3rd party callers can get host status quickly.

Implements bp host-operation-notification

Change-Id: Ib4cc80e568b6028afbdd6cb86f6ac8edeed4f933
Remove duplicated test

Function test_create_instance_with_img_ref_associates_config_drive
do the same as function test_create_instance_associates_config_drive
(identical bodies with different names)

Change-Id: I3c77d9249150231831f2e7eba1ccd493867ca5c0
Move `diff_dict` to compute API

`diff_dict` is only once, in the compute API, so just move it there.

Change-Id: I3a5a56a969aa661b096587b82fd4dc3fc430995f
xenapi: converting XenAPIVolumeTestCase to NoDB

* Uses NoDB base class for speedup
* Removes dead/unecessary code

Change-Id: I0aa8c0886801c2e0b331d0655170a48f37a874d5
Fixes the destroy() method for the Docker virt driver

* Added the missing "context" argument in nova/virt/driver.py
* Added the missing argument in the test_virt_drivers.destroy() as well so it
will make sure none of the other drivers will miss it.

Change-Id: I083b935da95c28ad4f9879036ef2bf7c1fbbb58e
Closes-Bug: #1244829
Fix the boto version comparison

Use versionutils to check the boto version in parsed form rather than
comparing text.

Fixes bug: 1239890

Change-Id: Iea421ab0d86ce29648a8b8f757456364ea21e956
Add missing fields in DriverBlockDevice

Pylint reports the following, let's clean them up
["Instance of 'DriverBlockDevice' has no '_fields' member", ""]
["Instance of 'DriverBlockDevice' has no '_legacy_fields' member", ""]

Change-Id: Iaf56dc35ce5ad963a6fb50d6641b203409ca6798
Closes-Bug: #1214377
Send delete.end with latest instance state

Delete.end notifications were getting sent with a blank deleted_at
field. This meant that services listening to notifications for
instance state changes could potentially never get the instances
deleted_at value. The instance usage audit notification would be
the only source for that value.

This change returns the destroyed instance from the conductor API
and sends the delete.end notification with that state, containing
the deleted_at value which was just set.

UpgradeImpact
Closes-Bug: #1241681
Change-Id: I3481e0bada1711c3bff50f249f6a2b40a4ea6855
Merge "Add notification for host operation"
Fix `NoopQuotaDriver.get_(project|user)_quotas` format

The quota API extension expects `get_project_quotas` and `get_user_quotas` to
return a dictionary where the value is another dictionary with a `limit` key.

The `DbQuotaDriver` adhered to this spec, but the `NoopQuotaDriver` didn't.

This fixes the `NoopQuotaDriver` to return the results in the correct format.

Fixes bug 1244842

Change-Id: Iea274dab1c3f10c3cb0a2815f431e15b4d4934b1
Merge "Update schema_diff.py to use 'postgresql' URLs."
Merge "Move `diff_dict` to compute API"
Merge "Add missing fields in DriverBlockDevice"