From 65d9f80b5bfe9e94323f31f2d109670798774466 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 18 Dec 2012 09:55:46 -0500 Subject: Update exceptions to pass correct kwargs. Updates a variety of Nova exceptions so that they pass the correct kwargs for proper exception message formatting. Previously these exceptions would work but have incorrect error messages because of how NovaException handled exception formatting errors. Change-Id: I9601d3884a72d53a8ad742cf6610399968747cea --- nova/virt/fake.py | 2 +- nova/virt/libvirt/driver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/virt') diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 28d0fd95d..37d06bf0e 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -124,7 +124,7 @@ class FakeDriver(driver.ComputeDriver): def snapshot(self, context, instance, name): if not instance['name'] in self.instances: - raise exception.InstanceNotRunning() + raise exception.InstanceNotRunning(instance_id=instance['uuid']) def reboot(self, instance, network_info, reboot_type, block_device_info=None): diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 263fd5ca4..2a0d76ab8 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -815,7 +815,7 @@ class LibvirtDriver(driver.ComputeDriver): try: virt_dom = self._lookup_by_name(instance['name']) except exception.InstanceNotFound: - raise exception.InstanceNotRunning() + raise exception.InstanceNotRunning(instance_id=instance['uuid']) (image_service, image_id) = glance.get_remote_image_service( context, instance['image_ref']) -- cgit