Port rescue 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 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 blueprint nova-v3-api

Change-Id: I8dc2b42b4ffb4618978856d5520485cd34e726d9
Port rescue API to v3 Part 2

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

Partially implements blueprint nova-v3-api

Change-Id: Iaa6d0cf7708b0887512db952b1e26ccde75d24ef
Port evacuate 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: I2c77b445b1e7a1b63993ae86cebea9922e9d098c
Port evacuate API to v3 Part 2

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

Partially implements blueprint nova-v3-api

Change-Id: Id9ca6a7a92a087cb063fe265af1ad6a626c63510
Adds support for the Indigo Virtual Switch (IVS)

Implements: blueprint ivs-vif-driver

Adds line to rootwrap config to allow call to ivs-ctl to control the Indigo switch.
Adds a new 'ivs' VIF type in network/model.py.
Adds support to the LibvirtGenericVIFDriver class for the IVS switch.
Adds functions to linux_net.py to create and delete IVS vif ports.
Adds unit tests to test the new IVS methods.

Change-Id: I65436b82f65374103644af8aba9dba14ba73f94c
Adds v3 API extension discovery filtering

Adds ability for a v3 loaded extension to be visible in
/v3/extensions to be dependent on the discoverable action policy
for that extension. Note that this does not actually effect whether
or not the functionality provided by the extension is accessible

Implements blueprint nova-v3-api-filter

Change-Id: I3f6ba7ea59e7abfa9d57b79ab18aa5b675e64118
Cells: Add support for global cinder

Implements cinder support for compute cells when cinder is a global
installation.  Adds syncing of the block device mapping table between
child cells and API cells.

Implements blueprint cells-cinder-support

Change-Id: Ife5be9922db0742c8ee4f970517396be86597cce
Cleanup overshadowing in test_evacuate.py

Fixes overshadowing problem of uuid in test_evacuate identified in
the v2 to v3 evacuate port but separated into a separate changeset
to fix both the v2 and v3 versions at the same time

Change-Id: If1006d86eab7198484a6d5f82a3f3f328724f4d4
port agent 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: Ib7c489769d9b07797366be5920cc23ab2074a768
Change resource links when url has no project id

This patch allow response body to be look like the request url. So if a
project_id is passed the resource links on the response will also have a
project_id, and in the case of api-v3 where project_id are no longer present in
the url the response will not have it either.

Complements bp v3-api-remove-project-id.

Also fix two minor issues on the unit tests, which were breaking with this
change:
 - When doing ServersViewBuilderTest there was no api version specified.
 - ServersControllerTest was duplicating api version on the application url.

Change-Id: I872332ef56b4b6e99fedb43833ad45e8e654f44f
Port flavors core API to v3 tree

Port flavors core API (which does *not* include all extensions, like flavor
create) to the V3 API, adapting the way it's loaded to fit with the new
extension framework and, of course, its tests.

This also change the flavors requests and responses links on unit tests since
project_id  is no longer present on v3 url

Partially implements blueprint v3-api-core-as-extensions

Change-Id: Ide2eb22a89be3bd9adcf5e09cbef23e824a83fc1
Organize limits units and per-units constants

During v3 api review there was an agreement that would be nice to move limits
constants to utils file and refactor its usage inside limits api to avoid
unnecessary code duplication.

Also changed TestLimiter class to MockLimiter since that name can be confuse to
some unit test frameworks.

Change-Id: I1b8626e8d1e3257333d4dfee61591fd4cde82bd1
Port cells 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: Ie629ee328d76a1595350b597c7874b430217c769
Fix the ServerPasswordController class doc string

The code must have been copied from the flavor access extension to start
with and the old class doc string was left in place.

Fixes bug 1191232

Change-Id: Ie60ea629270c8185abc05fd4e08bbd7a9945c2b5
Port server_diagnostics extension to v3 API Part1

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

Implements blueprint nova-v3-api

Change-Id: I52f906948b5873cf3fdfff14270c7384ee5e7b9f
Accept is_public=None when listing all flavors

nova-client uses a None (with capital N) when listing all the flavors.
Right now this is interpreted as a wrong query by n-api preventing us
from listing the private flavors using the nova-client.

Fixes bug #1190239

Change-Id: I2a9b1c24cd744c8819c1d41e0ad103d05398401c
Log xml in libvirt _create_domain failures

When an error occurs defining, launching or enabling hairpin mode on a
libvirt domain, log the xml for reproduction and analysis.

Fixes bug 1183534

Change-Id: Ic8f1d11c5a92779c686b7248895bbc6f2cfdbf0b
Check the instance ID before creating it

At least with libvirt 1.x instance goes into shutdown state
before its ID is changed. This means that there's a race
condition during reboot where nova might try to create an
instance that's already defined. By checking if the ID of
the new and old instance is the same, we avoid that situation
and reiterate on the loop.

The tests for this are added in
I6215f80bd15820dac80151e7063916dbbc21d761

Change-Id: I493b828f0c6848fbadc591be2f47fd1b12fd3a51
Fixes: bug 1181924
Add tests for libvirt's reboot functionality

This patcha adds the missing tests for libvirt drivers reboot method.

Change-Id: I6215f80bd15820dac80151e7063916dbbc21d761
No support for double nested 64 bit guest using VCDriver

64bit instances launched on ESX via the VCDriver will not
support running 64bit guests. There is an option that can
be passed during the vmx creation that will allow for this
to happen. This is very useful if you want to run hypervisors
 (esx, kvm) on top of ESX and then run 64bit VMs on top of
those hypervisors.

Fixes bug 1192256

Change-Id: Id6eb224c97569737cbb41f1b64f61805e1df004e