Make SecurityGroupAPI use Object instead of instance_get_by_uuid()

This patch makes the SecurityGroupAPI use the SecurityGroup object
for querying the list of security group names instead of pulling
the instance by id, and then following the ['groups'] link.

This is part of a set aimed at deprecating the instance_get_by_uuid()
method on conductor.

Related to blueprint compute-manager-objects-juno

Change-Id: Id69c2019e934cef72c9b06caa503ea74f28720ce
libvirt: Use os_command_line when kernel_id is set

Patch Iad53c687053bdb5469baad4331ea55f428c170b0 breaks libvirt with
"-append only allowed with -kernel option" when using images without an
explicit boot kernel set because the -kernel option (kernel_id in nova)
isn't supplied for those image types.

This patch reads the os_command_line property from the image metadata
only when using images with an explicit boot kernel set and ignores it
otherwise.

Closes-bug: 1300861

Change-Id: I06c2d9930e0f36a0d7057b6a0f5c9c591caac43f
Treat instance objects like objects in set_admin_password flow

The set_admin_password API path uses instance objects but does a direct
database update in nova.compute.api and accesses fields on the object
like a dict.

This patch changes the code to update the database via the
Instance.save() method and accesses fields on the object using dot
notation.

Part of blueprint compute-manager-objects-juno

Change-Id: Iff82b19ba4ea007930d20d26a613687484392861
Remove unnecessary else block in compute manager set_admin_password

The else block is useless since the conditional block before it raises
an exception, so remove the else.

Change-Id: I1cd859a3f20b1ab9ab2502967526d306ebca9961
Don't translate debug level logs in nova.virt

Our translation policy
(https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation) calls
for not translating debug level logs. This is to help prioritize log
translation. Furthermore translation has a performance overhead, even if
the log isn't used (since nova doesn't support lazy translation yet).

Change-Id: I524b48f530d8afd59a067074332e3964426e4d70
Remove variability from object change detection unit test

Insure hashes of object representations are consistent by normalizing
data using sorted lists (as compared to dictionaries whose keys and
values are listed in an arbitrary, variable, dependent order:
https://docs.python.org/2/library/stdtypes.html#dict.items).

Closes-Bug: #1325246

Change-Id: I1344a820263683a024818d181ec6ee08e5e18984
Merge "libvirt: Use os_command_line when kernel_id is set"
Merge "Don't translate debug level logs in nova.virt"
Merge "Make SecurityGroupAPI use Object instead of instance_get_by_uuid()"
Merge "Remove variability from object change detection unit test"
Merge "Treat instance objects like objects in set_admin_password flow"
Merge "Remove unnecessary else block in compute manager set_admin_password"