Backport some v3 aggregate API unittest to v2 API

This patch add some v3 aggregate API unittest into V2 API to improve
V2 API unittesting.

Change-Id: Id4d533e74b462b55b155b4e4ad7d94e018d35726
tests: fix test_compute to have predictable service list

The _create_service_entries() method in test_compute.py accepted
a dict for the list of services. The tests would then pull out
the first item in the list of keys of the dict. When the python
hash seed is set to a random value the list of keys has no
predictable ordering, causing the test suite to break. Changing
the data structure to use a list of lists instead of a dict
ensures strict ordering.

Related-bug: #1350287
Change-Id: I01a0d4cfb086eb94b49d25b65daf08e55e2087b4
Convert console_output v3 plugin to v2.1

Changes required to have v3 plugin natively support
the v2 API

The get_console_output action is reverted to os-getConsoleOutput

Partially implements blueprint v2-on-v3-api
Change-Id: I71b0d5fd1a098052f8e11f60a19113b6d647ef2d
Remove concatenation with translated messages

Translated messages should not be expanded by concatenation.  Instead
the additional text should be replacement text or part of the translated
message to allow the translators as much information as possible when
doing the translations.

Also, when lazy translation is enabled, the object returned does not
support concatenation and raises an exception.  Thus this patch is
needed to support blueprint: i18n-enablement.

This patch includes a hacking check for concatenation with a translated
message.

Change-Id: I8b368d275faa14b4750735445321874ce1da37d5
Partially-Implements: blueprint i18n-enablement
Fix wrong disk type limitation for disk IO throttling

The disk I/O limits feature in QEMU block layer allows I/O throttling
to be used across all underlying storage types.

Change-Id: If99107955fc976b00ee101d4c6a685c29e655f82
Closes-Bug: #1362129
Add functions to setup user namespaced filesystems

When using user namespaces, the contents of the container's
file systems need to be owned by the targeted user on the host.
These functions will change the ownership of the files in the
filesystem to the proper owners.

For example, when mapping root in the container to user 500
on the host, the contents of the filesystem owned by root need
to be changed to be owned by user 500.

Partially implements: bp libvirt-lxc-user-namespaces

Change-Id: I78afc2686f17b5e5ec740a3d0a1963df7cc92755
Changes V3 evacuate extension into v2.1

This patch changes v3 evacuate API to v2.1, and also share v2.1 and v2
test case.
The differences between v2 and v3 are described on the wiki page

https://wiki.openstack.org/wiki/NovaAPIv2tov3 .
Partially implements blueprint v2-on-v3-api

Change-Id: Ib105e367be5a921f1b9cade51204b224d99343ec
Change v3 aggregate API to v2.1

This patch changes v3 aggregate API to v2.1 and makes v2
unit tests share between v2 and v2.1.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3.

Partially implements blueprint v2-on-v3-api

Change-Id: I95372d49ffacd12bdc8e2f6b60628c17f70d0eba
Change v3 admin_actions to v2.1

This patch changes v3 admin_actions API to v2.1 and make v2
unit tests share between v2 and v2.1, move v3 testcase to v2.1.
The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3 .

Partially implements blueprint v2-on-v3-api
Change-Id: I6fa4a8bd45d0f32f2a61bc6d8ff7e0fbb5fa7f26
Adds list_instance_uuids to the Hyper-V driver

In case of large number of servers, the _destroy_evacuated_instances
fails randomly. Implementing list_instance_uuids solves the issue.

Co-Authored-By: Robert Tingirica <rtingirica@cloudbasesolutions.com>
Co-Authored-By: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Change-Id: I9c58168c012b342bb5dfa0c62a7c39a327f442b3
Closes-bug: #1291364
Add API schema for v2.1/v3 availability_zone 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 v3-api-schema

Change-Id: I4a7bd2ef4df322eb072730bbf7da2766f02cb398
Add API schema for v2.1/v3 multiple_create 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 v3-api-schema

Change-Id: Ibf0b6a5024f834ac9252933568d4416a8a5ba1fc
Port used_limits & used_limits_for_admin into v2.1

The used_limits & used_limits_for_admin is removed from v3 API.
For now, we need porting it back. And also try to share unittests
between v2 and v2.1.

Partially implements blueprint v2-on-v3-api

Change-Id: I57199273dcaf20b0b6618dfb436a92f04b139f52
Merge "Remove concatenation with translated messages"
Merge "Add functions to setup user namespaced filesystems"
Merge "tests: fix test_compute to have predictable service list"
Merge "Changes V3 evacuate extension into v2.1"
Merge "Backport some v3 aggregate API unittest to v2 API"
Merge "Change v3 aggregate API to v2.1"
Merge "Add API schema for v2.1/v3 availability_zone extension"