Add generic customization hooks via decorator.

Hooks add the ability to insert custom code around operations that
declare a named hook:

e.g.

@hooks.add_hooks('create_instance')
def create_instance(....):
   ....

The above hook allows Hook objects to be run 'pre' and 'post' the
execution of create_instance()

Hook objects are discovered via the setuptools entry point group
'nova.hooks'.

Change-Id: I3961df12ef415085de7459438967edacc34500c2
Fix fname concurrency tests.

It was possible for thread2 to run before thread1 in the fname
concurrency tests. When this happens the assertions in the fname
concurrency tests fail. In each fname test block until thread 1 signals
the test before creating thread 2. In the different fname test block
until thread 2 signals the test before beginning the actual test work.

This ensures everyone has started as expected before checking the
expected done values.

Part of blueprint grizzly-testtools

Change-Id: I119fb03423324c9db9847b97d9bb69e71fef2aad
Use fixtures library for nova test fixtures.

Moving the test-case setup and teardown code into managed fixtures
so that we can better interact with them when we start running things
in parallel.

Part of blueprint grizzly-testtools

Change-Id: I406be0a88b14c0dba2d22b4957e26a53442bbae3
Added sample tests to FlavorManage API.

Partially implements blueprint nova-api-samples
Fixes bug 1070163

Change-Id: Ib838adf0c21f3eee6c52cd8e1942c96ae89cca98
Unpin lxml requirements

Ubuntu is using a much newer version of lxml so
we shouldn't lock the versions in our infrasctructure.

Change-Id: I688c0be196db526f220262e25afa79d84fcae632
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Raise NotImplementedError in dns_driver.DNSDriver.

Updates dns_driver.DNSDriver so that we raise NotImplementedError
instead of returning empty result sets or passing. Since this
class is the default dns_driver for Nova it can be quite
confusing when it returns empty results (which actually
causes some HTTP 500 errors as well).

We really need to switch the default floating/instance
dns managers to MiniDNS as smoketests fail otherwise we
currently use nova.network.dns_driver.DNSDriver which is
not correct

Fixes LP Bug #1040236
Fixes LP Bug #1027998

Change-Id: Id818bb00e0689d96db948872842c07d2cf1edd57
libvirt: enable apic setting for Xen or KVM guest.

Bug 1086352

Currently, nova doesn't enable apic setting for Xen or KVM guest
in its libvirt driver. Windows guests would not boot successful in
such case. This patch adds apic setting in libvirt driver for Xen
or KVM guest, which would fix this problem. A check is also added
to libvirt guest config test case for this patch.

Change-Id: Ie213c9d086f77faf0cdc5a32337c5bf4b828cf5f
Use conductor for bw_usage operations

This patch moves bw_usage operations from compute manager
to conductor. In an effort to reduce the number of API points
we're adding to the conductor RPC API, this patch actually
only adds an update function, which also returns the current
values. This is used by the public conductor API layer to provide
both get and update calls through a single remote function.
Discussion and comments on this approach are welcomed.

Related to blueprint no-db-compute

Change-Id: Iabe4cef2bccc8ffcf0ddc76bf7b328c2c4d87112
Access DB values as dict not as attributes. Part 4

We cannot assume nova.db.api will be returning sqlalchemy objects
attributes, instead treat return values as dicts

Part of blueprint db-api-cleanup

Change-Id: Ie98c2cad080d95edcfa89b2601f6c57cb1188cbc
Merge "Added sample tests to FlavorManage API."
Merge "Raise NotImplementedError in dns_driver.DNSDriver."
Merge "Access DB values as dict not as attributes. Part 4"
Merge "libvirt: enable apic setting for Xen or KVM guest."
Merge "Add generic customization hooks via decorator."
Merge "Unpin lxml requirements"
Merge "Fix fname concurrency tests."
Merge "Use fixtures library for nova test fixtures."
Merge "Use conductor for bw_usage operations"
Set default DNS driver to No-op.

In 522ac62 we set the default network DNS driver to MiniDNS
which was primarily meant for testing only.

This patch adds a NoopDNSDriver and updates the Nova default
to use it.

Fixes LP Bug #1088603.

Change-Id: Id3bdf86e0ea16fc6d4490436afbabc7a95cf820b
Make DNS drivers inherit interface.

Updates the DNS driver implementations so they inherit
the interface. Should help catch things that aren't
implemented in the future.

Change-Id: Ic8b269c8525236c65b492c889d4530a09836bb13