From c62f698ef1f1e69bd5eb3c6544ee305f96488d42 Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Thu, 4 Apr 2013 13:51:47 -0700 Subject: Cannot boot vm if quantum plugin does not support L3 api Fixes bug 1163670 Change-Id: I87f0b73e5040b5f9cf7d8c30aa16a2a33faca14f --- nova/tests/network/test_quantumv2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/network/test_quantumv2.py b/nova/tests/network/test_quantumv2.py index 991a0149a..6a3b31412 100644 --- a/nova/tests/network/test_quantumv2.py +++ b/nova/tests/network/test_quantumv2.py @@ -1210,6 +1210,18 @@ class TestQuantumv2(test.TestCase): self.mox.ReplayAll() api.remove_fixed_ip_from_instance(self.context, self.instance, address) + def test_list_floating_ips_without_l3_support(self): + api = quantumapi.API() + QuantumNotFound = quantumv2.exceptions.QuantumClientException( + status_code=404) + self.moxed_client.list_floatingips( + fixed_ip_address='1.1.1.1', port_id=1).AndRaise(QuantumNotFound) + self.mox.ReplayAll() + quantumv2.get_client('fake') + floatingips = api._get_floating_ips_by_fixed_and_port( + self.moxed_client, '1.1.1.1', 1) + self.assertEqual(floatingips, []) + class TestQuantumv2ModuleMethods(test.TestCase): def test_ensure_requested_network_ordering_no_preference_ids(self): -- cgit