Fixed metadata validation err. Fixes bug 965102.

1. Fixed the error message on specifying invalid server metadata key/value.
2. Added check to disallow specifying blank metadata key.
3. Added unit test coverage.

Addressed review comments.

Change-Id: I1f0002971dc236045d6e622641f46a4a30249d54
QuantumManager will start dnsmasq during startup. Fixes bug 977759

Added _setup_network_on_host method, which calls update_dhcp
if quantum_use_dhcp is set.

Change-Id: I193212037873001a03da7b7a484f61a5c13b5de8
nova.virt.xenapi_conn -> nova.virt.xenapi.connection

This fixes a couple of references that were missed in the recent move

Change-Id: I653b8b85294838a39f9d805bef094938f692e7be
Use utils.save_and_reraise_exception

It's less code and also logs when exceptions gets dropping instead
of silently dropping them

Change-Id: I407049861b1a402549f58939b654d1760cdb2d26
allow power state "BLOCKED" for live migrations if using Xen by libvirt

fixes bug 985587

Change-Id: I7184dd639733a68f6b31e5e3e4311c7aa8d50220
Fixes bug 987335.

Revert bug introduced by commit a837f92e that removed
console_log from get_console_output()

Change-Id: I22a14b5f50c2df0486420b38137328ac87844c1f
Validate min_ram/min_disk on rebuild.

Update compute API rebuild function so that it checks min_ram
and min_disk on the specified image.

Fixes LP Bug #919367.

Change-Id: Ifa38b303656709e537fa6e4e729f39715f23f552
Removes unnecessary code in _run_instance.

* Remove _is_instance_terminated and _shutdown_instance_even_if_deleted
  since run/terminate instance is synchronized.
* Avoid potential deadlock.
* Fixes bug 981316.

Change-Id: I4fe7e2ea00b85d9e0802fe93655e67db3909e86b
Scope coverage report generation to nova module.

Coverage report generation was not using --include filters.
This resulted in generating a report that included all external
dependencies. Some of these may include problematic characters for
utf8 decoding. In the odd case this was found, coverage would fail
with a UnicodeDecodeError.

Fixes bug #987077.

Change-Id: I276698e65ac1037972209a406058168433cd826b
Improved tools/hacking.py

* cleaner output
* fix bug 980009
* Fix N201
* N306: alphabetical order imports
* N401: docstring start
* N402: one line docstring start
* N403: multi line docstring end
* Until fixed, N40* will be disabled by default

Change-Id: I9addafdaa7a1f8fb950e14a5409f661dec6c7b87
Typo fix in bin/instance-usage-audit.

The notify method now requires a context, which in this case should be
`admin_context` not `context`.

Change-Id: I53275d0e1c9a898a7c0d9685382bb52ffb2efa2c
Merge "nova.virt.xenapi_conn -> nova.virt.xenapi.connection"
Merge "Improved tools/hacking.py"
Merge "Typo fix in bin/instance-usage-audit."
Merge "Use utils.save_and_reraise_exception"
Number of missing imports should always be shown

In tools/hacking.py

Change-Id: I1219dcc140594be97fc680981a122157fed2e279
Merge "Removes unnecessary code in _run_instance."
Set a more reasonable default RPC thread pool size

No service should be doing over 1000 different tasks at once. It can
only possibly end up overloading other dependent services. 64 should
be a more reasonable starting point.

Change-Id: I7690ad4a9cfc5ee11e1990d5cecdf23522f11f72
Introduced flag base_dir_name. Fixes bug 973194

rebased from master.

If user faces locking related problem when two nova-compute hosts
sharing same disk area via nfs, try to download same image into
cache concurrently - Then base_dir_name can be set to "_base_$my_ip" in
nova.conf

Default value for base_dir_name is "_base" thus retaining existing
behavior.

Change-Id: Icff10ed75ba83f7256731614dc9e01e578b347a4
Merge "Fixed metadata validation err. Fixes bug 965102."