From: armando-migliaccio Date: Wed, 9 Jul 2014 23:02:59 +0000 (-0700) Subject: Remove dead helper function from test_l3_plugin X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e0b3bf02508e8d60239e61945e834fde226242b8;p=openstack-build%2Fneutron-build.git Remove dead helper function from test_l3_plugin This code is no longer used anywhere, so it can be safely removed. Change-Id: I23cc2e2cafda2408c98e052a6667cd303335331f --- diff --git a/neutron/tests/unit/test_l3_plugin.py b/neutron/tests/unit/test_l3_plugin.py index 4eb80d0d3..1097d4d60 100644 --- a/neutron/tests/unit/test_l3_plugin.py +++ b/neutron/tests/unit/test_l3_plugin.py @@ -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: