From 6e4dda522678512d23ddf50291e8bbd5f6a3c9b8 Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Mon, 11 Jul 2011 07:49:34 -0700 Subject: [PATCH] pre trunk merge --- nova/exception.py | 4 ++++ nova/tests/test_network.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nova/exception.py b/nova/exception.py index a6776b64f..988940d6a 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -377,6 +377,10 @@ class FixedIpNotFoundForInstance(FixedIpNotFound): message = _("Instance %(instance_id)s has zero fixed ips.") +class FixedIpNotFoundForSpecificInstance(FixedIpNotFound): + message = _("Instance %(instance_id)s doesn't have fixed ip '%(ip)s'.") + + class FixedIpNotFoundForVirtualInterface(FixedIpNotFound): message = _("Virtual interface %(vif_id)s has zero associated fixed ips.") diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py index d5cab47cf..b09021e13 100644 --- a/nova/tests/test_network.py +++ b/nova/tests/test_network.py @@ -268,6 +268,6 @@ class CommonNetworkTestCase(test.TestCase): def test_remove_fixed_ip_from_instance_bad_input(self): manager = self.FakeNetworkManager() - self.assertRaises(exception.FixedIpNotFound, + self.assertRaises(exception.FixedIpNotFoundForSpecificInstance, manager.remove_fixed_ip_from_instance, None, 99, 'bad input')