Prevent caller from specifying id during ComputeNode.create()

The patch is to remove id when it was set before creating a compute
node in objects, so it can be generated automatically.

And check if the node exists before it is created.

Related to blueprint icehouse-objects.

Change-Id: Ib808643bff24b683ef330b5a1be5bc68ece30184
Prevent caller from specifying id during Service.create()

The patch is to remove id when it was set before creating a service
in objects, and check if the service exists before it is created.

Related to blueprint icehouse-objects.

Change-Id: I688bfc98234f4bc27fb15474e05c7f25753efaf7
Prevent caller from specifying id during KeyPair.create()

The patch is to remove id when it was set before creating a key pair
in objects, and check if the key pair exists before it is created.

Related to blueprint icehouse-objects.

Change-Id: I07609500e1135f54929265e06193c48e1bb083db
Prevent caller from specifying id during Migration.create()

The patch is to remove id when it was set before creating a migration
in objects, and check if the migration exists before it is created.

Related to blueprint icehouse-objects.

Change-Id: I37ff279f5f74d17ce9c173458ff35826fb10f143
Fix bad log formatting

Oslo blueprint logging-handleerror-raise-exception, will allow us to raise
exceptions raised during logging, using that code these are two outstanding logs
that have incorrect formatting.

Change-Id: Iea26bb9905cd7501094eaef8d932e78627cdbd5d
Rewrite InstanceAction object test cases using mock

This change rewrites the InstanceAction object test cases as a
groundwork for other InstanceAction changes to come.

This is a part of: blueprint make-instance-action-use-objects

Change-Id: I73eafa778bc0b558fe3c3497ec6892f52e8088db
libvirt-volume: improve unit test time

A number of tests would invoke code that would sleep. This
patch adds a mocked function for the sleep.

Change-Id: I804a86e3b8b750919cf7a9547ef514f833a5fd49
Related-bug: #1279820
Add resource tracking to unshelve_instance()

When unshelving an offloaded instance, a new host is scheduled for
the instance. However, the call to unshelve the instance on the new
host does not go through the resource tracker, which may lead to
over-allocation of the hosts resources.

This change adds resource tracking to unshelve_instance().

Change-Id: I682713c8ebc6276ac49822db5c8efc373d5b8f4d
Closes-Bug: #1241017
Merge "Fix bad log formatting"
Merge "Prevent caller from specifying id during ComputeNode.create()"
Merge "Prevent caller from specifying id during Service.create()"
Merge "Prevent caller from specifying id during KeyPair.create()"
Merge "Prevent caller from specifying id during Migration.create()"
Merge "Rewrite InstanceAction object test cases using mock"
Merge "libvirt-volume: improve unit test time"
Merge "Add resource tracking to unshelve_instance()"