Set SCSI as the default cdrom bus for PowerKVM

Set the default cdrom bus to scsi when the guest architecture is
ppc64 and the hypervisor is kvm|qemu. Checks the arch from
image_meta. Fallback to host arch if arch is not present in the
metadata associated with the image.

KVM unit tests without image_meta unified in a loop.

Change-Id: I62d1490ee8c9ba45a087f934342f14386ddb7cb2
Merge "Sync unhandled exception logging change from Oslo"
Merge "Fix string formatting of exception.NoUniqueMatch message"
Merge "docstring fix"
Merge "Remove vi modelines"
Add ESX quality warning

In line with the other drivers we've been marking as untested,
this patch marks the ESX driver as "not tested" in the logs to
alert admins to the fact. The VCenter driver is being tested
with minesweeper, and thus does not emit a similar message on
startup.

Change-Id: I9217bab01761f68b716cdce3b21c2653abd9afa1
Update nova.conf.sample for python-keystoneclient 0.5.0

python-keystoneclient 0.5.0 added a new oslo.config option:

 enforce_token_bind=permissive

Change-Id: If719600866561e03b037b1eb1f58e14103a99385
Add instance_get_active_by_window_joined to InstanceList

This is needed to remove get_active_by_window from nova compute API and
allow us to make the simple_tenant_usage API use Flavor objects.

Related to blueprint compute-manager-objects

Change-Id: I93354db2775f08346f9b812f1f1e78a4050efd4a
Make the simple_tenant_usage API use objects

This change makes the simple_tenant_usage V2 and V3 APIs use Instance
and Flavor objects.

Related to blueprint compute-manager-objects

Change-Id: I8e0e870727d687da165c809ffb7a4456bff81122
Remove get_instance_type and get_active_by_window from nova compute API

Commit 013b301c1c makes both methods vestigial since the
simple_tenant_usage API was the only thing using them.

Change-Id: Idbe8183760edd57b58564761c30f2f6e3ad0086e
Merge "Update nova.conf.sample for python-keystoneclient 0.5.0"
Use new images when spawning BM instances.

With nova-BM the TFTP files (kernel and ramdisk) are cached between
instances but disks never are (today). We were treating the disk image
the same way but this is incorrect because its filename is 'disk'
rather than '$uuid' and as such it has to be cleaned out whenever a
deploy request is being processed.

Change-Id: I15c8fc25a4c064341b9f1ed51e6df8d1494fbdff
Co-Authored-By: Robert Collins <rbtcollins@hp.com>
Merge "Enforce FlavorExtraSpecs Key format."
Fixed naming issue of variable in a debug statement formatting

Closes-bug: 1275802

Change-Id: I5bf57290ff3023f6d3332a92114cc4f235e1f4af
Rename API schema modules with removing "_schema"

The paths of API schema modules include "/schemas" and they show
API schema clearly. It is not necessary to include "_schema" in
module names. This patch renames the modules with removing "_schema"
from module names.

@validaiton.schema() takes 1 parameter, so calling it by name
is excessive. Then, this patch removes the specified argument.

By applying these changes, we can specify API schema module in one
line with @validation.schema().

Partially implements blueprint nova-api-validation-fw

Change-Id: Ia646e1c2466fa0a1418f757a48d2e6b4f84f7c98
Hyper-V: Change variable in debug log message

The variable used in the log message is incorrect. The log message
outputs the file size instead of the internal VHD size.

Closes-bug #1275805

Change-Id: I270709098e058cf51bbe6494b903a461b3938d15
Add hacking test to block cross-virt driver code usage

The baremetal driver has been accessing some libvirt driver
private classes and config variables. Any code that is intended
to be shared across virt drivers should be in a common package
instead. Add a hacking file to enforce this for imports and
config options so that no further problems like this are made
in the future.

NB, this skips verification of the baremetal driver until
bugs 1261826 and 1261827 are fixed, or the baremetal driver is
removed, whichever comes first.

Change-Id: Ifbfe597795795a847830f9bd937dc459cd37d118
Closes-Bug: #1261842
Avoid deadlock when stringifying NetworkInfo model

In the libvirt driver, we log information about the instance we're
about to generate XML for, which includes a NetworkInfo model. In
reality, this is a NetworkInfoAsyncWrapper which acquires a lock
on the model. Since we're in the middle of a log statement, we also
hold the logging lock. This happens right after we've fired off an
async request to update information about the instance, which first
acquired the network model lock and then acquired the logging lock
to make a seemingly innocuous log record.

The resulting deadlock is fixed by this patch by stringifying the
NetworkInfo object before making the log call in the libvirt
driver.

Change-Id: I81f35197ab7c74daa84fb51fbaa2df28c025da13
Closes-bug: 1276268
Add serializer capability to fake_notifier.

With the change to oslo.messaging.notify.Notifier, we have
introduced the serializer plugin.  In some implementations
this is used to modify the notfications/serialize data.  The
implementations will want to test their serializers and
the easiest way to do this is via the fake_notifier.
This change allows fake_notifier to act more like
notifier with serializer being a pass in as an argument.

The serializer is passed to subnotifiers created via
the prepare method.

Change-Id: I03ef9ed92366961d4e296381d149c54d7da97f70
Merge "Rename API schema modules with removing "_schema""