Fixes spawn issue on Hyper-V

The current Hyper-V Technical Preview introduces slight changes
in the data returned by GetVirtualHardDiskSettingData in
Msvm_ImageManagementService.

Co-Authored-By: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
Change-Id: I830b07efb657acc1486f86a475310f5f4e584a37
Closes-Bug: #1376883
Pass expected_attrs to instance_get_active_by_window_joined

This change sends the expected_attrs from the instance object
API down into the DB API so the client can filter on which
columns he actually needs to join when getting all instances
in a given time window.

The simple-tenant-usage API and _instance_usage_audit periodic
task are the only things calling this API and they already
provide specific expected_attrs so there is no risk of
regression due to the change. The DB API is backwards
compatible if columns_to_join is None, and expected_attrs
defaults to None already.

Change-Id: I3d8b5a1fd58783e465001bb5f10b5b87d69198d9
Partial-Bug: #1383469
Fix bulk floating ip ext to show uuid and fixed_ip

The bulk floating ip extension was not showing the instance_uuid
or the fixed_ip properly due to a missing join and an ommision
when the extension was first created. This updates the extension
to display all of the relevant data.

Change-Id: I81c2c742a7eed134b5452c19da0cc55811c009ab
Closes-Bug: #1360426
Convert service v3 plugin to v2.1 API

Changes required to have v3 plugin natively support the V2.1
API

Remove the 1st level dict of service in the body param

Partially implements blueprint v2-on-v3-api
Co-Authored-by: Chris Yeoh <cyeoh@au1.ibm.com>
Change-Id: Ida59f00e3cf4640b63add1d6350aa7c30529807e
Port volume_attachments extension to v2.1 API

This patch ports v2 volume_attachments & volume_attachment_update
extension to v2.1.
Unittest code modified to share testing with both v2/v2.1.
API sample file and their tests have been added.

Partially implements blueprint v2-on-v3-api

Change-Id: Icf63529f317bc61debc665641d1c9d9f2e45bcec
initialize objects with context in cells

These changes aim to clean up the pattern of passing a context in
object member functions create/destroy/refresh/save and instead
initialize the object with the context when it's constructed.

Related to blueprint kilo-objects

Change-Id: I5a7e3c1da6f9e2efaf296dd392e5ce9942c5729c
initialize objects with context in server groups api

These changes aim to clean up the pattern of passing a context in
object member functions create/destroy/refresh/save and instead
initialize the object with the context when it's constructed.

Related to blueprint kilo-objects

Change-Id: Ieb405b5cf8de40024a175771fba2f4c296af9e78
Clean the test cases for service plugins

Make HTTPRequestV3 to HTTPRequest in test_services functions.

Partially implements blueprint v2-on-v3-api

Change-Id: I8e96060051f1ef3e037602007a2bf127f9b334ee
Use common get_instance call in API plugins part 3

Cleanup v2.1 API to use common get_instance call which
automatically does exception handling. Although most of
the v2.1 API was cleaned up a while back, some recent
ports of v2 API code has resulted in some cases creeping
backing in.

Change-Id: I8271a2805fe9fdfae40df43183a5251fddbe4c13
initialize objects with context in resource tracker

These changes aim to clean up the pattern of passing a context in
object member functions create/destroy/refresh/save and instead
initialize the object with the context when it's constructed.

Related to blueprint kilo-objects

Change-Id: I47c25c144d1f970781d6288073041501966f0178
initialize objects with context in compute api

These changes aim to clean up the pattern of passing a context in
object member functions create/destroy/refresh/save and instead
initialize the object with the context when it's constructed.

Related to blueprint kilo-objects

Change-Id: I3781bd5fb7de0ff578ea4342be5cb68eef52c43d
Add API validation schema for services v2.1 plugin

This patch adds API validation schema for 'services' plugin
for V2.1.

Partially implements blueprint v2-on-v3-api

Change-Id: Ife11459bf53e097b0bd21e008785a5222eff0092
Make get_next_device_name() handle an instance object

This utility method is passed an object, but does things that assume it
is a dict. This fixes that, and updates the tests to match.

Related to blueprint flavor-from-sysmeta-to-blob

Change-Id: I7041b8ffae100463eafe45926f0d16d00165ba73
Load extension 2 times fix load sequence issue

Some extensions such as volumes need to inherit servers, however
the extension load sequence can't be guaranted. If the servers
extension is loaded after volumes, the controller of volumes will
be None and lead to problem.

Change-Id: Iec1e759f5c1f570a6b0ac65fb357b4f15102499c
Closes-Bug: #1373238
Adapting pylint runner to the new message format

Pareseable output format and --include-ids parameter are deprecated
and ignored in the pylint version used on the gate.
These functions are replaced by the --msg-template parameter.

This patch changes the runner to use the new parameter so that the
job can run properly on the gate

Closes-Bug: #1394606
Change-Id: I1de424bae4c2b634cd0bc804cb7e81624c96a195
Retry ebtables on race

Calls to ebtables can race with libvirt and cause nova, or libvirt
to fail to apply ebtables rules.

The goal of this patch is to provide a simple fix to improve the
stability of the gate.

We now call ebtables in a simple loop that retries on failure.
Long term we want to update nova to make use of the --concurrent
flag in newer versions of ebtables. The --concurrent flag
implements a lock to prevent multiple invocations of ebtables from
racing. This will require a newer libvirt and the ability to
timeout long running execs (--concurrent can block forever if it
never gets the lock).

A future patch is forthcoming to add support for --concurrent.

DocImpact
Add ebtables_exec_attempts option (default=3).

Change-Id: I3e04782ac4678581462f9bee4bb10d5f3b223457
Partial-Bug: #1316621
Remove havana compat from nova.cert.rpcapi

Since we only support upgrading from N-1 to N, there's no need to keep
around this older upgrade related code.

Change-Id: Ie13f98da84f3d631efea2670fbc926b69b405284
Fix for extra_specs KeyError

During _cold_migrate, there is a code path when
extra_specs is not present in the request_spec['instance_type']
bag. Identified one test case where removing extra_specs
causes the same error as reported in the bug below. We
just need to tolerate this by using a default value for pop()

Closes-Bug: #1394569

Change-Id: I9d4d02069322af1a1f0b84c1e86d2e586c6712d8
Adds new RT unit tests for _sync_compute_node

Adds new unit tests for the resource tracker's _sync_compute_node()
method. These new unit tests should make the objectification of the
resource tracker easier to do, since the old unit tests in
test_resource_tracker.py are brittle and hard to change.

Change-Id: I3e8d179d8c3856084fee595c8b0396a8a5db8aa4
Blueprint: make-resource-tracker-use-objects
Merge "Fix for extra_specs KeyError"