Add API schema for v2.1/v3 migrate_server API

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 v3-api-schema

Change-Id: I9f1eea8471af0f86dcf472ed8a4fdb634dfdb260
Add API schema for v2.1/v3 create_backup API

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 v3-api-schema

Change-Id: Ie8a1ce6d0d7b90fb73555981fa974e9029344d3b
Add API schema for v2.1/v3 attach_interfaces API

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 v3-api-schema

Change-Id: I0c4066c34f6da0934946aa9eda907b911dbede16
Fixed wrong assertion in test_vmops.py

There is wrong assert method in
nova.tests.virt.vmwareapi.vmwareapi.test_vmops.py:640
while checking a number of calls mocked method 'mkdir'.

We should use assertEqual(3, len(mock_mkdir.mock_calls))
instead of self.assertTrue(3, len(mock_mkdir.mock_calls))

But number of calling method 'mkdir' not always is 3.
If dict block_device_info contains key 'block_device_mapping'
with any information, method 'mkdir' wouldn't be called in method
self._vmops.spawn(). That is why corresponding check been added.

Change-Id: Ifc26e112b9c2974e0fb7a91ba39d5b2d887bd549
Closes-Bug: #1335859
VMware: remove duplicate key from test_instance dict

Remove the duplicate 'node' key from test_instance dict

Change-Id: I1199b5f9428f3fad196bd10331b268f9a3eddcf9
Add 'anon' kwarg to FakeDbBlockDeviceDict class

This will allow us to create fake block devices without the database id
field, so we can pass them to BDM objects in our test  which can then
call create(). create() would normally error out if there is a DB id set
on the object.

Change-Id: I2d1f975633c8b2cb9e2e744c5f769b8f753b5968
change the firewall debugging for clarity

When we are building rules ensure we log the instance['id'] so
we can actually correlate the iptables output to UUID for the
instance.

Also bundle up the security group to iptables translation to a
final view of the world instead of the piecemeal rule at a time
view.

Display what rules are being skipped in the add process, as the
skips seem to happen a lot. If this is completely normal we should
probably delete the bit entirely at some later point.

Related-Bug: #1298472

Change-Id: I0e90c3af9bf908b733ed895ad7c204b0a95ef786
Remove redundant code in Libvirt driver

Change-Id: I98c5b5bb5a8710d32fadafe9781736a963616fec
Co-Authored-By: Thomas Kaergel <kaergel@b1-systems.de>
libvirt: add version cap tied to gate CI testing

Limit the libvirt features that Nova will use in a default
configuration to only those which are tested in the CI gate.

The end user can override the limit if they wish to opt-in
to use of untested features via the 'version_cap' setting
in the 'libvirt' group.

Change-Id: Ib91164cc572b1dbde2a31beee5751c52b0445d3e
Move injected_network_template config to where it's used

The config is used by netutils, so netutils should be the place where it's
defined.

Change-Id: I8ec317481dc7da299225ac605f90b146e7a6d98b
move the cloudpipe_update API v2 extension to use objects

This change converts the cloudpipe_update extension to use the Network
object instead of direct database access.

Related to blueprint compute-manager-objects-juno

Change-Id: Ie4f800e05dae9aafd6f0f11ef0f2cd9ecf0d3215
Merge "Fixed wrong assertion in test_vmops.py"
Merge "Remove redundant code in Libvirt driver"
Merge "Add API schema for v2.1/v3 attach_interfaces API"
Merge "Add API schema for v2.1/v3 migrate_server API"
Merge "Add API schema for v2.1/v3 create_backup API"
Merge "Move injected_network_template config to where it's used"
Merge "libvirt: add version cap tied to gate CI testing"
Merge "move the cloudpipe_update API v2 extension to use objects"
Merge "Add 'anon' kwarg to FakeDbBlockDeviceDict class"