Make sure leases are maintained until release

Dnsmasq asks nova-dhcpbridge for existing leases on reboot, but
we don't return addresses that have been deallocated but not yet
released. This modifies nova to return leased but not allocated
addresses. It also delays removing the vif until we disassociate
the ip so we still have access to the mac address.

Resolves-bug: 1300355

Change-Id: Id78d66aad5005f052a1b49002de0ef13ef5a298d
libvirt: optimize pause mode support

Commit bfb28fcf9031af4c695177663702ce05edbbfa4d added a method
call that checks if the libvirt driver support the
VIR_DOMAIN_START_PAUSED flag. This patch optimizes that by reading
the value at startup.

Change-Id: I0fc1edec55df609ab25b9999f4a0d077ddcf0be7
Support multi-version pydevd

We need to support multi-version pydevd
in order to supporting pycharm3 and pydev3 remote debug.
If we want to remote debug by pydev3 or pycharm3,
"from pydev import pydev" is not work,
need to "import pydevd" directly.

Change-Id: I975c859c46f81d7fe1ca3dfebe05040153471800
Delete in-process snapshot when deleting instance

Try to delete the image created to hold the snapshot when the snapshot
creation fails because either the instance doesn't exist or it is in the
deleting task_state.

Closes-Bug: #1296590
Change-Id: I422c4f10c348d189fee217b55e0766e73eb5b16c
Remove quota-class logic from context and make unit tests pass

Continuation of quota-class removal started in
I1110022d6f628d03aaf363da707f2d2ef1600437.

Since we don't have an API to set quota-class any more, we don't need to
store it inside of the context. Also begin removing quota-class logic from
nova.quota to make test_quota pass with changes to context

Change-Id: I85dd24121a434b95dc6f0af180444d4258b50765
Clean up openstack-common.conf

oslo-incubator will introduce new integrity check in [1].
That will help developer find inconsistent issue while copying
from oslo-incubator. The check just outputs warnings. These are
changes according to warning:
 * sort the modules in openstack-common.conf
 * Fix wrong module names

[1] https://review.openstack.org/#/c/76901/

Change-Id: Ie939d46a72732357acc9dab03c0682b0e271a7ed
Related-Bug: #1295582
Add a docstring to hacking unit tests

This commit adds a docstring to the hacking check unit tests
explaining how the tests work. To someone who isn't well versed with
how pep8/flake8 works the tests cases are a bit of black magic.

Change-Id: I5dc61612a5fec42443d8d89eaf700bb17b4b0842
Code Improvement

Change code in wsgi.py.

Before:
if not is_dict(body[entity_name]):
    return False
return True

After:
return is_dict(body[entity_name])

Since this calling is in the end of the method I
can just return the result of the calling.

Change-Id: I834f26aa5a91abd18b8da10aef81f3aeb72a61ed
XenAPI: Remove unneeded instance argument from image downloading

The Xenapi image downloading code requires an instance argument
when launching a VM.  However, the downloading code doesn't
need the instance information as it doesn't use it for
any processing/debugging/loging.  We can remove this
argument safely.

Change-Id: Id8b531b74e5f0e59638b608bff93fc89b66b889d
Closes-bug: #1307662
Updated from global requirements

Change-Id: Icb3c49781f2769698714d4fab9cbaed10ebe4251
Tidy up xenapi/volume_utils.py

Removed unused code and made some private methods start with _

Change-Id: Idae0bf55b9d0586fd0a0412aace517afc46031ea
Move tests into test_volume_utils

Move some tests in test_xenapi that would fit better in
test_volume_utils.

Change-Id: Ibe516a2473ff921d4f43621e71645810e674f73b
Merge "Tidy up xenapi/volume_utils.py"
Merge "Move tests into test_volume_utils"
Merge "Updated from global requirements"
Merge "XenAPI: Remove unneeded instance argument from image downloading"
Merge "Add a docstring to hacking unit tests"
Merge "Delete in-process snapshot when deleting instance"
Merge "Support multi-version pydevd"
Merge "Remove quota-class logic from context and make unit tests pass"