Merge "Compute: ensure that InvalidDiskFormat is handled correctly"

This commit is contained in:
Jenkins 2016-09-11 21:35:07 +00:00 committed by Gerrit Code Review
commit ec2e03f908
2 changed files with 5 additions and 0 deletions

View File

@ -1962,6 +1962,7 @@ class ComputeManager(manager.Manager):
exception.ImageNotActive,
exception.ImageUnacceptable,
exception.InvalidDiskInfo,
exception.InvalidDiskFormat,
exception.SignatureVerificationError) as e:
self._notify_about_instance_usage(context, instance,
'create.error', fault=e)

View File

@ -3902,6 +3902,10 @@ class ComputeManagerBuildInstanceTestCase(test.NoDBTestCase):
self._test_build_and_run_spawn_exceptions(
exception.InvalidDiskInfo(reason=""))
def test_build_and_run_invalid_disk_format_exception(self):
self._test_build_and_run_spawn_exceptions(
exception.InvalidDiskFormat(disk_format=""))
def test_build_and_run_signature_verification_error(self):
self._test_build_and_run_spawn_exceptions(
exception.SignatureVerificationError(reason=""))