Update invalid state error message on reboot API

This change adds more detail to the error message
when a request to soft reboot an instance in an
invalid state fails, indicating that specifically
soft reboot is the request that failed, when
a hard reboot might still succeed.

Closes-Bug: 1365683

Change-Id: I4b12aa261d1c4fa05bacd5311793ed6e0478e59b
Add unit test to os-agent API

This patch adds unit tests for os-agent API to test updating
and deleting a agent with not existing agent id.

Change-Id: Id266b0449deff6bd3715cbd2b5403031a2e34eeb
Fixes AttributeError with api sample test fail

Avoid AttributeError which could be raised with api sample tests
when a string is expected but a non string type is returned
instead. This makes debugging api sample test failures easier as
the expected and actual values are displayed in the error message
rather than an AttributeError exception.

Change-Id: I4d124e4d80779c4431926619f0ca876a513a8462
libvirt: Unnecessary instance.save(s) called

When spawning an instance there may a considerable amount of
instance.save() called. This is not necessary as the compute
manager will update the instance after the spawn method has
successfully completed.

Change-Id: I61610b3869caeb7822eab3f2d09335744b75db28
Closes-bug: #1366548
FIX: Fail to remove the logical volume

The logical volume can not be removed when delete VM error. I look at the
code, found that parameter is a list in the libvirt's lvm, but in
imagebackend, parameters passed is a string.

Change-Id: I222f6c5cfe5be63105f2fd8afd7ccd209ca2e5f7
Closes-Bug: #1358552
Address nits in I6b4123590

This addresses the alignment and log message
comments in change I6b4123590.

Change-Id: Ic1490bdbe660d8594538a1480eb03311edf00d83
Merge "Address nits in I6b4123590"
Revert "libvirt: reworks configdrive creation"

This reverts commit 228d0221763b12f11ecbacde4db38b1151f96e31.

This commit introduced bug 1369627 (a security vulnerability), as
well as misunderstanding how our image caching works for libvirt.
I think we can achieve the same thing in a much simpler manner.

Change-Id: I7ede9b0f77710869197d9b48c6dd6bbc3087738c
Merge "Add unit test to os-agent API"
Merge "Fixes AttributeError with api sample test fail"
Merge "libvirt: Unnecessary instance.save(s) called"
Merge "FIX: Fail to remove the logical volume"
Merge "Revert "libvirt: reworks configdrive creation""
Merge "Update invalid state error message on reboot API"