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
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
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
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"
Introduce a .z version element for backportable objects

This makes the object versioning code tolerate a .Z element to the version.
It is ignored for the purposes of triggering a backport, which means that we
can backport additive changes to a stable tree, denoted by the .Z element,
but which will not cause version comparisons to consider them incompatible.

There isn't actually much to change to make this work properly, aside from
avoiding a backport for only a .z in NovaObjectSerializer. Most of this patch
is actually just adding unit tests to prove that we tolerate the .z in the
version element in our compares, as well as confirming that extra stuff in
the data portion is ignored if our local object implementation doesn't know
about it.

Change-Id: Ic71268c036432c42f0d0ce7dfcb427abb65a24b4
Merge "Make get_next_device_name() handle an instance object"
Prevent admin role leak in context.elevated

context.elevated was creating a copy of the current context then adding
'admin' to the roles of that context. This should be a deepcopy, otherwise
'admin' is added to the original context too.

Change-Id: I8ab00c88a8e76a14fb9f4ae96dfdb5f018fc2d0f
Closes-bug: 1386932
Merge "Adapting pylint runner to the new message format"
Merge "Use common get_instance call in API plugins part 3"
Merge "Adds new RT unit tests for _sync_compute_node"
Merge "Remove havana compat from nova.cert.rpcapi"
objects: make instance numa topology versioned in db

Makes data stored in the database for numa topology
versioned by using object framework.

Change-Id: I0e8ca96296fb88aa7a26fae1e476275a23e0c6bb
objects: Add test for instance _save methods

7335af1ea fixes a bug with the instance save() and when it would call
the related _save methods for related objects.

This patch adds a test for it so that we are sure it does not regress.

Change-Id: Ie4b731b4b419725482b64b7aa1f19e7c5474c349
Merge "Introduce a .z version element for backportable objects"
Merge "objects: Add test for instance _save methods"
Merge "Prevent admin role leak in context.elevated"