]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove dead helper function from test_l3_plugin
authorarmando-migliaccio <armamig@gmail.com>
Wed, 9 Jul 2014 23:02:59 +0000 (16:02 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Wed, 9 Jul 2014 23:02:59 +0000 (16:02 -0700)
This code is no longer used anywhere, so it
can be safely removed.

Change-Id: I23cc2e2cafda2408c98e052a6667cd303335331f

neutron/tests/unit/test_l3_plugin.py

index 4eb80d0d33dfb3d6941b29e834804ddf8fed5632..1097d4d60ba539a90319e248c45029363024fd3b 100644 (file)
@@ -1261,42 +1261,6 @@ class L3NatTestCaseBase(L3NatTestCaseMixin):
         self._test_floatingip_with_assoc_fails(
             'neutron.db.l3_db.L3_NAT_db_mixin')
 
-    def _test_floatingip_with_ip_generation_failure(self, plugin_class):
-        with self.subnet(cidr='200.0.0.0/24') as public_sub:
-            self._set_net_external(public_sub['subnet']['network_id'])
-            with self.port() as private_port:
-                with self.router() as r:
-                    sid = private_port['port']['fixed_ips'][0]['subnet_id']
-                    private_sub = {'subnet': {'id': sid}}
-                    self._add_external_gateway_to_router(
-                        r['router']['id'],
-                        public_sub['subnet']['network_id'])
-                    self._router_interface_action('add', r['router']['id'],
-                                                  private_sub['subnet']['id'],
-                                                  None)
-                    method = plugin_class + '._update_fip_assoc'
-                    with mock.patch(method) as pl:
-                        pl.side_effect = n_exc.IpAddressGenerationFailure(
-                            net_id='netid')
-                        res = self._create_floatingip(
-                            self.fmt,
-                            public_sub['subnet']['network_id'],
-                            port_id=private_port['port']['id'])
-                        self.assertEqual(res.status_int, exc.HTTPConflict.code)
-
-                    for p in self._list('ports')['ports']:
-                        if (p['device_owner'] ==
-                            l3_constants.DEVICE_OWNER_FLOATINGIP):
-                            self.fail('garbage port is not deleted')
-
-                    self._remove_external_gateway_from_router(
-                        r['router']['id'],
-                        public_sub['subnet']['network_id'])
-                    self._router_interface_action('remove',
-                                                  r['router']['id'],
-                                                  private_sub['subnet']['id'],
-                                                  None)
-
     def test_floatingip_update(
         self, expected_status=l3_constants.FLOATINGIP_STATUS_ACTIVE):
         with self.port() as p: