]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove unnecessary port deletion
authorGary Kotton <gkotton@redhat.com>
Mon, 10 Dec 2012 06:59:30 +0000 (06:59 +0000)
committerGary Kotton <gkotton@redhat.com>
Mon, 10 Dec 2012 07:14:02 +0000 (07:14 +0000)
Fixes bug 1088368

Change-Id: I41b816a8d72d09740ea7d063172a75cedffb8d6d

quantum/db/l3_db.py
quantum/tests/unit/test_l3_plugin.py

index 04a7a8f228323c27218d6fb47a580adf4d70f89b..26a29136981c5ea15a0c737573aef61c236846d1 100644 (file)
@@ -857,7 +857,6 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
             if len(fixed_ips) > 1:
                 LOG.error(_("Ignoring multiple IPs on router port %s") %
                           port['id'])
-                ports.remove(port)
                 continue
             # Empty fixed_ips should not happen
             fixed_ip = fixed_ips[0]
index ddc807caf19edf0e4a2cd09024ba73de25d0081a..f628f733a4307fc299f0a15d7d2ec0a92b72a7c9 100644 (file)
@@ -1363,7 +1363,7 @@ class L3NatDBTestCase(test_db_plugin.QuantumDbPluginV2TestCase):
                     routers = plugin.get_sync_data(ctx, None)
                     self.assertEqual(1, len(routers))
                     interfaces = routers[0].get(l3_constants.INTERFACE_KEY, [])
-                    self.assertEqual(0, len(interfaces))
+                    self.assertEqual(1, len(interfaces))
                     # clean-up
                     self._router_interface_action('remove',
                                                   r['router']['id'],