Add unit tests for customization module

Fixes bug #1077744

Change-Id: I06776131f746e0c3b5f95fed629cb3a60eb1f3d5
Add ability to create a volume from an image

Currently there is no way to get data onto a volume through the
dashboard without taking manual steps in a guest. It's possible to
create a volume from a snapshot, but there's no way to get data onto a
volume to create the snapshot in the first place. Creating a volume
from an image is particularly useful when booting from a volume. This
was implemented in cinder and nova-volume in Folsom. Expose this to
dashboard users as well.

Create a new action for this on the images panel, reusing the 'Create
Volume' form. Also make this possible from the volumes panel, by
adding a 'source type' field to the 'Create Volume' form. This lets
users choose among no source (the default), snapshot, and image, hiding
the lists of snapshots and images when the corresponding source type
is not selected, similar to the 'image type' field in the 'Launch
Instance' workflow.

Use the same infrastructure as creating from a snapshot to update the
size and name based on the image size and name.

Extract the image listing code out of the instance panel, into a
generic utility module. Also add a size conversion function, since
image sizes are reported by glance in bytes, while volumes are
specified in gigabytes.

Change-Id: I8314ab011734d80d5f611b338ed6e2538e6bab7e
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge "Add ability to create a volume from an image"
Merge "Add unit tests for customization module"