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 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
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
Quantumapi returns an empty network list

When nova retries network list and if the list is empty, quantumapi
should return a empty list instead of an empty dictionnary.

Fixes bug 1189976

Change-Id: I5b8c498a6c86e92d0de14d8de9e55722408c5669
Port certificates 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: Ibdb3b444432fa707786e6bb43aaba61d2a3fc89f
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
Port certificates API to v3 Part 2

This patch contains the changes required to adapt the certificates
extension and the corresponding unittests to the v3 framework

Partially implements blueprint nova-v3-api

Change-Id: If4fe7e8524ba0181b50722281f594e0a80cd49ed
Adding fixed_ip in create.end notification

Sending the network information for an instance in the create.end notification.

Fixes bug 1185076

Change-Id: Iabe088ed23736d7b1ee97624761445023aab22c2
Cleanup certificate API extension

Fixes a couple of minor issues with the v2 and v3 versions
of the certificate API extension identified during the
v2->v3 port
* Removes unused CertificatesTemplate class
* Corrects doc strings for a couple of methods

Change-Id: If022d2393ceab5ce7e6311c92a6f52b6325039bc
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
Initial scheduler support for instance_groups

Scheduler support for blueprint instance-group-api-extension

The patch set adds the following:
1. conductor support for getting instances via the instance_group uuid
2. conductor support for removing an instance from the instance_group
   members

In addition to this it replaces the 'group' hint with 'instance_group'.

DocImpact

Change-Id: I4a4febc2e85d4ffc8b1579d2673fa107171a3c5b
Allow reboot or rebuild from vm_state=Error

In general most operations are only valid on an
instance that has booted successfully at least once
so this change extends the instance state check
logic to include evidence that the instance has
been successfully started at least once.

This enables more operations to be allowed in
against instances in an Error state.  For example
reboot and rebuild are useful recover options for
an instance which has reached an error state, but
not if the instance failed during its initial build.

With this change the only actions allowed on an
instance which has never booted successfully are
delete and force_delete.  Soft delete is not
allowed, as the restore is in effect a start unless
there is specific virt driver support.

In addition the following actions are now allowed
against instances in an Error state providing the
instance has booted at least once:  Reboot, Rebuild,
and Rescue.

Fixes bug:   1183946

Change-Id: I63fd8d2a182df5cf12754892e8076933b3b1e79f
Add err_msg param to baremetal_deploy_helper.

Updates the baremetal-deploy-helper so that we look for an
option 'e' POST parameter which contains an optional error
message string from the agent.

This works with the associated DIB branch here:
  http://review.openstack.org/#/c/33341/

And is also fully backwards compatible with existing agent scripts
which do not send the 'e' parameter.

Change-Id: I9a5914e719c2db6d2ae6d002cd386a0e48fda18d
Setting static ip= for baremetal PXE boot.

This patch adds a new option "pxe_network_config" to baremetal PXE driver,
if set it tells the driver to append the network configuration to the
kernel cmdline. Initramfs built with network support could then benefit
from this option and avoid the injection of network configuration files
into the image.

DocImpact

Change-Id: I61dc946f42f8a86eaad0e73b033a0d8da4a74e40
Remove db session hack from conductor's vol_usage_update()

Commit 3cf4cb2534c387f287f118d4185d54b1435d3bc0 made the
vol_usage_update() in conductor hack around a stale sqlalchemy
object issue by keeping session active in the current context
until the notification was completed. This layering violation
led to some "creative" tests to try to verify this behavior.

This removes that and refreshes the object before letting it
out of the db/api layer so that all the attributes are present,
thus avoiding the dynamic load during notification.

Change-Id: Ia6ef5cb7f462ff72d170f3af33f2d020ee4d3e3c
Sync oslo-incubator gettextutils

This change brings in new functionality from gettextutils
needed for supporting API message localization in Nova.

bp user-locale-api

Change-Id: Ia81f46bb980a237f345f6b8600dfe2a75e4b8c77
Adds expected_errors decorator for API v3

Adds an expected_errors decorator for v3 API methods which allows
the specification of what exceptions can be raised within the
method. If an unexpected error occurs a 500 is instead returned
which plus a request to file a bug report

Partially implements blueprint v3-api-expected-errors

Change-Id: I5723e576b30b47744394517cdb1ff6bab1d8f78b