Port fping extension to v3 API Part 1

This changeset only copies the v2 files (implementation and test)
into the appropriate v3 directories unchanged. The copy as-is
will not be loaded by either the v2 or v3 extension loaders. The
second changeset will then make the changes required for it to
work as a v3 extension.

This is being done in order to make reviewing of extension porting
easier as gerrit will display only what is actually changed for v3
rather than entirely new files

Partially implements blueprint nova-v3-api

Change-Id: I55d15ab5f9f59a83dc67bac2d2f41ceee06085d5
port Simple_tenant_usage  API into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Partially implements: bp v3-api-extension-versioning

Change-Id: I1618987cc905a6734b409eb9a7fe37c65b6aac28
Remove junk file when ftp transfer failure

During spawn with powervm driver, the image transfer to the IVM host
may fail in some conditions, eg. IVM host doesn't have enough disk
space. It leaves the junk file in IVM host, and this will disturb
next spawn after resolving environment issue, need clean it.

Fixes bug #1188884

Change-Id: I7b8d719995c2702c89cf55cef5f34bde9d01c1b9
Port hypervisor API into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Partially implements: bp v3-api-extension-versioning

Change-Id: I251dc18dda9756574c308a08423fd805a3e91182
Port extended status extension to v3 API Part 1

This changeset only copies the v2 implementation file into the
appropriate v3 directory unchanged. The copy as-is will not be
loaded by either the v2 or v3 extension loaders. The second
changeset will then make the changes required for it to work as a
v3 extension.

This is being done in order to make reviewing of extension porting
easier as gerrit will display only what is actually changed for v3
rather than entirely new files.

Partially implements blueprint nova-v3-api

Change-Id: Ia5b80b70a7a459bf973de1c1aea8dc650e763b8d
Port extended-server-attributes into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then make
the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Partially implements: bp v3-api-extension-versioning

Change-Id: Idc9eed087a82f897d504a5c79e520883e537d060
Clarify the compute API is_volume_backed_instance method

Update the is_volume_backed_instance to be more robust and
check for volume_id or snapshot_id to see if a block device
mapping is really backed by a cinder volume. As per the blueprint
https://wiki.openstack.org/wiki/BlockDeviceConfig#snapshot_id_and_volume_id
I used the volume_id to do this as seems consistent with the
rest of the tests.

Add unit test to enforce this.

The motivation behind this is that we rely on this method at HP and
the test ServersActionsAllJsonTest.test_server_create_image
in nova.tests.integrated.test_api_samples highlighted weakness in
this method and where it could fail now that every instance has an
associated block device mapping for its root device.

Change-Id: Ia4b623a94d0285d8aeb97e9fd72a63f5f87efe7a
Remove usage of locals() from powervm virt package

Fixes bug 1171936

Change-Id: I9ff8c392071102737c70a807f9bfc584729c4142
Fix the filtered characters list from console-log

In fffcaea1 ^M was added to the list of characters to filter from the
console-log output but, because of a typo in the regexp, the
character '-' was added to that list too and has been removed since
then.

Fixes bug #1194032

Change-Id: Ia02b0b4c7027cbd09a51042ca1b5d28890413626
Sync rpc from oslo-incubator.

The most significant change included here is:

6d42ced Remove the amqp_rpc_single_reply_queue option from Havana

Change-Id: I4322a8dbfe9b666cd741c3c520a192296c56cd7b
Exeption message of 'live migration' is not appropriate

Fix bug 1194367

When do live-migration with RESTAPI body as:
{
    "os-migrateLive": {
        "host": "0443e9a1254044d8b99f35eace132080",
        "block_migration": false
    }
}

Customer would get the following exception:
{
    "badRequest": {
        "message": "host and block_migration must be specified.",
        "code": 400
    }
}

Update the exception to the following which is more accurate:
host, block_migration and disk_over_commit must be specified.

Change-Id: I87fbc8e9d287cd73084ae5e36dd7d6c0bcaec41c
port Attach_interface API into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Change-Id: I83803ed04f39cb7dda537d08d34e78a04cd64d4c
xenapi: Remove vestigial `compile_metrics` code

`compile_metrics` is no longer called as it was superceded by:

    https://github.com/openstack/nova/commit/8887f10c66bca248f289db8f834ae8f36f9a03a1

Fixes bug 1194990

Change-Id: Ia651ac69fc38ed3f5cb29562556f7065caba225a
Port Simple_tenant_usage API to v3 Part 2

This patch contains the changes required to adapt the Simple_tenant_usage
extension and the corresponding unittest to the v3 framework

Partially implements: bp v3-api-extension-versioning

Change-Id: I2db66704a77e822543e270773acc847267ef6ece
Port server password extension to v3 API Part 1

This changeset only copies the v2 implementation file into the
appropriate v3 directory unchanged. The copy as-is will not be
loaded by either the v2 or v3 extension loaders. The second
changeset will then make the changes required for it to work as a
v3 extension.

This is being done in order to make reviewing of extension porting
easier as gerrit will display only what is actually changed for v3
rather than entirely new files

Partially implements blueprint nova-v3-api

Change-Id: I8be578ed4fada25ec4a8aa8adb3addb0a3791f85
Fixes for quota_sets v3 extension

Various fixes for the quota_sets v3 extension:

* Removes reference to ext_mgr as this is a v2 concept and causes
  the extension to fail to load

* Merges os-extended-quotas extension which was just used as a switch
  by it being loaded or not and didn't contain any content itself. The
  extension presumes the functionality is always enabled. This means
  that the force paramter must now always be passed if the client
  wants to set the new quota lower than what is already used and
  reserved

* Updates test suite and consolidates tests given extended quotas is
  no longer a separate extension

Partially implements blueprint nova-v3-api

Change-Id: I868636b526a5990f96e63168d50c2d894ed33d52
Remove locals() from compute directory

Replace locals() with dictionary of the values to be printed

Change-Id: Iec926e859a5b340a04d9ada7c770b58eecd450b6
Sane rest API rate limit defaults

The previous rate limit defaults were unusable in any deployment.
Rate limiting to 10 POSTS per minute and 50 servers per day seems
to low, especially when we can use quotas to actually limit the amount
of resources a user can consume.

Update docstring to explain what the rate limiting is used for.

Fixes bug 1178529

DocImpact changed default values

Change-Id: I8cc93423f76d9b0a5135adf69babc4ff355a0951
Port config drive API to v3 Part 1

This changeset only copies the v2 files (implementation and test)
into the appropriate v3 directories unchanged. The copy as-is
will not be loaded by either the v2 or v3 extension loaders. The
second changeset will then make the changes required for it to
work as a v3 extension.

This is being done in order to make reviewing of extension porting
easier as gerrit will display only what is actually changed for v3
rather than entirely new files

Partially implements blueprint nova-v3-api

Change-Id: I9a4b31ef06bbf05c25b4a5e96f5cee2ce4d80d2f
Port config_drive API to v3 Part 2

Ports the config_drive extensions and the corresponding unittests
to the v3 framework. Moves the commented out tests from the v3
version of test_servers to the config drive extension unittests.

Adds entrypoint infrastructure to allow extensions to extend the way
that the servers extension performs xml deserialization so extension
specific deserialization does not require changes to the core servers
extension. The blacklist/whitelist settings for extensions generally
also apply to server extension point loading.

Also merges in updates to config drive functionality which were applied
to the v2 API while this changeset has been in review

https://review.openstack.org/#/c/31314

Partially implements blueprint nova-v3-api

Change-Id: Ic8b75cc8b353a6e22cbaf354317a78c4df8d937e