Add x-compute-request-id header when no response body

The x-compute-request-id header was only being added for requests which
generated a response body, like an index or show.  This adds it to
requests which generate no response body, like create/update/delete, or
actions on servers like resize.

Bug 1183712

Change-Id: Ia0e9d75e4b84280caab060fae58036ed818e00c3
Allocate networks in the background

Setting up networks and allocating IP addresses has the potential to
take an undesirable amount of time, blocking the build of a new
instance.  We can parallelize some work by querying for this information
*while* a new instance is being provisioned in the virt driver.

This adds a wrapper around the NetworkInfo model which allows one to
query for network information in a greenthread.  When a code path is hit
that actually needs the network information, it waits for the
greenthread to finish, if it hasn't already.

Network allocation will only be async for virt drivers that accept this
NetworkInfo model.  Other drivers that expect the legacy format end up
waiting for the operation to complete before driver.spawn is called.

Implements blueprint async-network-alloc

Change-Id: I389f939b9a36bc20b3b66e98d006d694622bd963
Import osapi_v3/enabled option in nova/test

Since `nova/api/openstack` may not have been imported by the time we use this
option in `nova/test`, we need to explicitly import it at the top of the file.

Fixes bug 1187847

Change-Id: Ibc9f3466d3baaf47d44bda2fc22247a494809909
Alphabetize v3 API extension entry point list

Alphabetize the v3 API extension point list in setup.cfg. With lots
of extensions being ported to V3 and an entry needed in setup.cfg for
each one and multiple people working on the ports if we always just
add an entry to the end of the list we are going to get a lot of merge
conflicts. To minimise the number of conflicts we'll try keeping the
list in alphabetical order and the number of conflicts should drop
as the list gets longer.

Change-Id: I386ec9bdb99660861d80f47923855e73f474a15f
Merge "Import osapi_v3/enabled option in nova/test"
Keypair API test cleanup

This is a cleanup in preparation for adding more
test coverage around keypairs. This patch does the
following:

* Moves keypair tests into their own file

* Breaks tests for methods into logically separate
  classes

* Shares key name validation and quota checking
  tests between `create` and `import_key`

* As part of above, add missing tests for
  `import_key` that were present for
  `create`

Change-Id: I8d8fdf9a1f9f11e1015ebbdfde1c8e77f5f421a8
Moving more tests to appropriate locations

Change-Id: I06aa8d8f31593cfea6e26560d6af2caf6a29194d
Merge "Alphabetize v3 API extension entry point list"
Merge "Add x-compute-request-id header when no response body"
Merge "Moving more tests to appropriate locations"
Merge "Keypair API test cleanup"
Merge "Allocate networks in the background"