Change the force_raw_image config usage

The force_raw_image comes from nova side as a
fix for https://bugs.launchpad.net/nova/+bug/1383465.

The reason of the flag is, after all images are forced
to be raw because of security reason
(https://bugs.launchpad.net/nova/+bug/853330), this flag
is added later so that deployer can still select using raw images or
compressed images.

Currently this flag is used in the deeper of functions like image_to_raw() or
converted_size(). For example, image_to_raw() will convert the image
to be raw format only if the force_raw_image flag is set, that means
the caller totally have no idea if the image returned is a raw image or not.

This is possibly ok for libvirt since libvirt does not care for qcow2
or raw, but it's different for ironic, since we will take different action
for qcow2/raw format. A flag in such deeper layer is not so good.

This patch changes these functions, so that the caller in image cache level
accept parameter from deploy level like iscsi_deploy or pxe, which make
decision based on the config.

Change-Id: I118c9d8edcc13d15762593c254eaf27792d6c55f
Related-Bug: #1382164
Merge "Change the force_raw_image config usage"
Add logging to driver vendor_passthru functions

Since the drivers' vendor_passthru are async. calls, any exceptions
raised by them won't be handled. So all exceptions, even non-Ironic
exceptions should be logged.

This patch adds a decorator that can be used to wrap passthru function
calls and ensure that any exceptions get logged correctly, also adds
unit tests to ensure decorators functionality.

Change-Id: I17006611fd59d5f4dc78fdaefdf802e9fb7caff2
Implements: blueprint extended-vendor-passthru
Closes-Bug: 1372979
Merge "Add logging to driver vendor_passthru functions"