Use a more specific error reporting invalid disk hardware
Instead of using NovaException for reporting invalid user specified disk hardware, use UnsupportedHardware and UnsupportedVirtType exceptions. Change-Id: I68ed1c0569bd0c0679e9fff3ffd436197f78a9f0 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -421,7 +421,7 @@ class LibvirtBlockInfoTest(test.TestCase):
|
||||
self.assertEqual(bus, 'usb')
|
||||
|
||||
image_meta = {'properties': {'disk_bus': 'xen'}}
|
||||
self.assertRaises(exception.NovaException,
|
||||
self.assertRaises(exception.UnsupportedHardware,
|
||||
blockinfo.get_disk_bus_for_device_type,
|
||||
'kvm',
|
||||
image_meta)
|
||||
|
||||
Reference in New Issue
Block a user