Fix bulk floating ip ext to show uuid and fixed_ip

The bulk floating ip extension was not showing the instance_uuid
or the fixed_ip properly due to a missing join and an ommision
when the extension was first created. This updates the extension
to display all of the relevant data.

Change-Id: I81c2c742a7eed134b5452c19da0cc55811c009ab
Closes-Bug: #1360426
Convert service v3 plugin to v2.1 API

Changes required to have v3 plugin natively support the V2.1
API

Remove the 1st level dict of service in the body param

Partially implements blueprint v2-on-v3-api
Co-Authored-by: Chris Yeoh <cyeoh@au1.ibm.com>
Change-Id: Ida59f00e3cf4640b63add1d6350aa7c30529807e
Port volume_attachments extension to v2.1 API

This patch ports v2 volume_attachments & volume_attachment_update
extension to v2.1.
Unittest code modified to share testing with both v2/v2.1.
API sample file and their tests have been added.

Partially implements blueprint v2-on-v3-api

Change-Id: Icf63529f317bc61debc665641d1c9d9f2e45bcec
Retry ebtables on race

Calls to ebtables can race with libvirt and cause nova, or libvirt
to fail to apply ebtables rules.

The goal of this patch is to provide a simple fix to improve the
stability of the gate.

We now call ebtables in a simple loop that retries on failure.
Long term we want to update nova to make use of the --concurrent
flag in newer versions of ebtables. The --concurrent flag
implements a lock to prevent multiple invocations of ebtables from
racing. This will require a newer libvirt and the ability to
timeout long running execs (--concurrent can block forever if it
never gets the lock).

A future patch is forthcoming to add support for --concurrent.

DocImpact
Add ebtables_exec_attempts option (default=3).

Change-Id: I3e04782ac4678581462f9bee4bb10d5f3b223457
Partial-Bug: #1316621
Add "x-compute-request-id" to a response header

The commit I5e370fd3de5ee2f8a8d13553015d88910ff5ea87 changed
"x-compute-request-id" to "x-openstack-request-id" on v2.1 API.
But this change is backwards incompatible against v2.0 API.

This patch makes all v2.1 APIs return "x-compute-request-id" in
the header.

Partially implements blueprint v2-on-v3-api

Change-Id: Ibe46e4004a7124ddc9a622fa7f26b9ec10a9a702
Make get_image_metadata() use Instance.get_flavor()

This cleans up the last use of extract_flavor() in compute/, aside from
resource tracker.

Related to blueprint flavor-from-sysmeta-to-blob

Change-Id: I2a5c2b5d2220a05ea7e921f7d7077c6880fbc5bb
Make compute/api.py::resize() use Instance.get_flavor()

This is actually a teensy change, but along with it come a lot of fixes
to tests that were still passing instance dicts to this method.

Related to blueprint flavor-from-sysmeta-to-blob

Change-Id: I6eb905730e4a61628a2ac94f752fc56786e952d2
Merge "Make get_image_metadata() use Instance.get_flavor()"
Merge "Make compute/api.py::resize() use Instance.get_flavor()"
Merge "Fix bulk floating ip ext to show uuid and fixed_ip"
Add API schema for v2.1/v3 scheduler_hints extension

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistent for
the whole Nova API.

Partially implements blueprint v2-on-v3-api

Change-Id: I7e54db52e55727f090128cc393a28043e1085636
Share unit test case for server_external_events api

This patch makes v2.1 and v2 share same unit test cases

Partially implements blueprint v2-on-v3-api
Change-Id: I4bcc30adb7289313d0cf82d70a80712a6c2621e8
Port v2 quota_classes extension to work in v2.1(v3) framework

Port v2 quota_classes extension and adapts it to the v2.1/v3 API
framework. API behaviour is identical with the exception that
there is no support for XML. Also

- unittest code modified to share existing testing with both
  v2/v2.1
- Adds expected error decorators for API methods
- Adds API samples

Partially implements blueprint v2-on-v3-api

Change-Id: I372e9940f499d3e2cf621a58eafa9502d4e14cea
Merge "Share unit test case for server_external_events api"
Add API json schema for server_external_event(v2.1)

Partially implements blueprint v2-on-v3-api
Change-Id: I1c6c7e958a6d01a58c9dcbc17281bd7ee9768588
Merge "Retry ebtables on race"
Merge "Port v2 quota_classes extension to work in v2.1(v3) framework"
Merge "Add API json schema for server_external_event(v2.1)"
Merge "Add "x-compute-request-id" to a response header"
Merge "Port volume_attachments extension to v2.1 API"