Iterate over glance API servers

The configuration option CONF.glance.glance_api_servers is meant to
be a list of Glance API servers, and should behave similar to its use
in Nova and Cinder: that each time a Glance API server is wanted, one
of the servers in the list is returned.

This changes CONF.glance.glance_api_servers to be a list instead of
a string. The list is randomly shuffled, and an iterator is
used to cycle through the list of servers.

This is backwards compatible and handles the case where the
user may have set [glance]/glance_api_servers = 'host:port' (or
'host1:port1, host2:port2'). The configuration library will
convert that to the corresponding list.

Closes-Bug: #1381135

Change-Id: Ic7cab502f38407aa0c282203804023dfa45b6623
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"
Merge "Iterate over glance API servers"