Fix logic for aggregate_metadata_get_by_host_with_key test case

After deleting a3 metadata, it is the host that once has such metadata
should be tested.

Change-Id: I79c40aa977911cd327d478ad8d9f147e19325017
Add x-openstack-request-id to nova v3 responses

x-openstack-request-id is the common header name for request ID going
forward. Nova, cinder, and neutron return this header. Using the
request_id middleware is a convenient way to ensure this header is in
the response. We will also be using the middleware to generate the
request ID.

The ID will be generated by the middleware and is inserted into the
request environment. The current code generates the request ID in the
constructor of RequestContext; with this change, the ID is generated
beforehand and passed in to the RequestContext constructor. Not much
different here: a request ID is generated and is available for use in
the handling of the request.

On the response end, the middleware is again used, this time to
attach the x-openstack-request-id header, using the value of the
generated request ID.

For v3, we will be using the request_id middleware provided in oslo.
For v2, nova-specific middleware (compute_request_id.py) is used.
Therefore, v3 responses will have the header x-openstack-request-id,
and v2 responses will have the header x-compute-request-id (no
change). It is necessary to move the existing code out into
middleware, so that the old header is not attached to v3 responses.

UpgradeImpact: api-paste.ini is modified

DocImpact: v3 responses of the API will only include x-openstack-request-id

Implements: blueprint cross-service-request-id
Change-Id: I5e370fd3de5ee2f8a8d13553015d88910ff5ea87
Fix broken version responses

The version responses link to non-existing PDF and WADL files.
Remove the WADL link and replace the PDF link with a HTML link to
docs.openstack.org.

Change-Id: I200e0fa268c4357403ca6c158fbbe682080c13d1
Closes-Bug: #1313119
Don't translate debug level logs in nova.spice, storage, tests and vnc

Our translation policy
(https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation) calls
for not translating debug level logs. This is to help prioritize log
translation. Furthermore translation has a performance overhead, even if
the log isn't used (since nova doesn't support lazy translation yet).

Change-Id: I5964d2f6a4328b91d67c0d8fd514e1eb7c6048bb
Updated from global requirements

Change-Id: I0c090aead369f8592539303bb067478dfc8897fa
Make cells use Fault obj for create

Add support into InstanceFault.create() to handle where we need to
duplicate any faults in the API cells. Convert the cells code to use
InstanceFault.create()

NOTE: This happens to fix an oversight where we accidentally left the
update_cells=False kwarg off of the db call in the cells code.

Change-Id: Iec11b8259aaecba055a6d5636ab60dfa0dbb6c83
Revert "Address the comments of the merged image handler patch"

This file was added in a55bbbfa1957d02b3006a51afcf4984a1f8ff886 and
later fixed up in 9e8513e6fe4bf8a8759ad0c1d71594f952d920ad. Only the
first commit was reverted in 0ba9cca788309bd8763a0d277a907769604cd9f4,
this commit finishes the job and reverts the fix-up commit so that the
orphan imagehandler code doesn't linger and doesn't get in the way of
future changes.

This reverts commit 9e8513e6fe4bf8a8759ad0c1d71594f952d920ad.

Change-Id: I3cf8000a3e984c57441a226d3139acbf3e346825
Dedup devref on unit tests

We already have a document on how to run unit tests, so
development.environment should just point to that document instead of
trying to summarize it.  Keeping this information in one less places
makes it easier to make sure the page is up to date (which
development.environment is not -- no mention of tox).

Change-Id: I9aecf439b6145b035b3457559ddb187058f5057b
Improve conductor error cases when unshelving

This commit handles different cases when the key 'shelved_image_id'
is not defined or None. Also it tries to improve the error messages.

Closes-Bug: #1307416
Change-Id: Ia2d0a183eefccdfd6f612d86f60cd2930c1a4b23
Remove and block DB access in dhcpbridge

This fixes an issue of direct DB access from happening in dhcpbridge
by using an object method instead. For this to work and to prohibit
future DB access from happening, the objects indirection API is set
and DB access is blocked in a similar way to how it is done in
nova-compute and nova-network.

Change-Id: I5e3152aad13343a6a1ecd9b5b511429159c9d4c2
Closes-Bug: #1316074
Remove unnecessary cleanup in test

The test test_rollback_live_migration_at_destination_correctly
makes use of a fake instance object. No need to clean this from
the database with db.instance_destroy.

This issue was also raised in:
https://review.openstack.org/#/c/90801/3/nova/tests/compute/test_compute.py

Change-Id: I66a9f60b9e7b2f69f79976c03e4e9ddcc5e02993
Merge "Dedup devref on unit tests"
Use Field in fixed_ip

In fixed_ip object, we use IPV4AndV6Address, which is a FieldType
instead of Field.

Create a Field for IPV4AndV6Address and use it in the fixed_ip object.

Change-Id: I0f369a70f755bc7e290edb96656c7c0cb2f3a00a
Check object's field

A nova object should have all fields as instance of fields.Field.
This patch adds a check on the metaclass to make sure of it.

This check happens only when class import so should have no
runtime performance impact.

Change-Id: I2cdf7eb097fb6907cbd048fa73138b352ab547d7
Merge "Don't translate debug level logs in nova.spice, storage, tests and vnc"
Merge "Updated from global requirements"
Merge "Make cells use Fault obj for create"
Merge "Add x-openstack-request-id to nova v3 responses"
Merge "Improve conductor error cases when unshelving"
Merge "Fix broken version responses"