Move ImageTooLarge check to Compute API

The existing ImageTooLarge check is in the compute manager, meaning that a
validation error puts the instance into an ERROR state without the ability to
communicate the fault back to the user.

This patch moves the check to the API where we can return the appropriate
error to the user.

Change-Id: I2183449351e3b70f98d0552ea247184a3641d85a
Remove ImageTooLarge exception

InstanceTypeDiskTooSmall and ImageTooLarge are really two sides of the same
coin; an image is larger than the root_gb of the instance_type. Rather than
have two exceptions for this, this patch consolidates down to just
InstanceTypeDiskTooSmall.

Change-Id: I401205072c111a960beb2932c6c1889141ae03c3
xenapi: Disable VDI size check when root_gb=0

Nova uses root_gb=0 to indicate that we should use the image as-is without
trying to resize the root disk. Currently the xenapi virt-driver doesn't
properly implement this behavior.

This patch gets us a step closer by disabling the VDI size check when
root_gb=0. We still need to ensure that the disk-resize code handle root_gb=0
as well.

References bug 1155113

Change-Id: If91963e079e197a1315c48b8643f3419b42b0b2c
xenapi: Moving tests under tests/virt/xenapi/

We have both a tests/xenapi/ and a tests/virt/xenapi/ directory which
is confusing. This patch standardizes on tests/virt/xenapi/ which
matches the nova/ directory layout.

Change-Id: I324a4730e2477aa1863b17c7ea404ce2932a681c
Make a few places tolerant of sys_meta being a dict

This will be necessary as we start to introduce objects with
real dicts in system_metadata. These are the common spots that
need to be ready ahead of time. The rest are at the actual use
sites and can/will be replaced when individual uses are
converted to objects.

Related to bp/unified-internal-objects

Change-Id: I8314e0d52ec2ae800765f60ce58ce9b309d7d513
Remove locals() usage from nova.virt.libvirt.volume.

Change-Id: Idda3c0c447bd1f6394805cd6230a32dc22bb6268
Fix UnboundLocalError in powervm lvm cleanup code

During spawn, if a local volume for the backing block device fails to
be created, the cleanup operation for the volume can fail with a
"UnboundLocalError: local variable 'disk_name' referenced before
assignment" error.

The fix is to assign to disk_name earlier and check for None before
running cleanup.

This patch also adds tests to cover the failure case.

Fixes bug 1180955

Change-Id: I0f32df1586d7bd87eccb674fec2a9597b1ce351d
Merge "Remove locals() usage from nova.virt.libvirt.volume."
Merge "Move ImageTooLarge check to Compute API"
Merge "Remove ImageTooLarge exception"
Merge "xenapi: Disable VDI size check when root_gb=0"
Merge "xenapi: Moving tests under tests/virt/xenapi/"
virt: Move generic virt tests to nova/tests/virt/

In the interest of better organization, this patch moves generic virt testing
code into nova/tests/virt.

Change-Id: I79473726a848f0abbcb13865efe30e02aea09ae5
Merge "Fix UnboundLocalError in powervm lvm cleanup code"
Better error message on malformed request url

The existing error message just said 'malformed url' which isn't
super-helpful. The new version expalins that the project ID in the URL is not
matching what's being passed in with the context.

Change-Id: I8e5b71fcd51ab3628425b53356f9671f3a2402c0
Imported Translations from Transifex

Change-Id: I0e289eba0a37f9d6068491aefb9261ac81968a02
Merge "Better error message on malformed request url"
Merge "virt: Move generic virt tests to nova/tests/virt/"
Merge "Make a few places tolerant of sys_meta being a dict"