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
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
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
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
Port scheduler hints 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: I992b8ee243f8ccc436f4a995c34d8b8e97ff7fa9
Make db.fakes stub out API not sqlalchemy

We shouldn't be stubbing out the backend db implementation, and instead
be stubbing out the db.api itself. One small step in making us less
sqlalchemy dependant.

Change-Id: Ifb2c45353edc281456e7407dd36b4cc4feea1ac0
Refactor ServerStatusTest class

Remove code duplication from ServerStatusTest class
Partially implements blueprint api-compute-servers-tests

Change-Id: I7585691c6274385840cbf67a9e051ca84cd07372
port Host 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: I7dd63b9952c10778427e7e0b0dd74f57cb4282ee
Break out compute API unit tests

As we convert things to objects, it'll be easier to convert our compute
API tests to be true unit tests if they are in their own class.  This
also allows us to move away from the hacks needed to simulate 2 DBs in
order to test ComputeCellsAPI().

There are currently a handful of tests that are true unit tests and
require no DB access.  These are now moved, subclassing from
test.NoDBTestCase.

Related to blueprint unified-object-model

Change-Id: I72f4f6ada8d0586e813e551a1b361bcebb16ee66