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')