diff --git a/neutron/db/db_base_plugin_common.py b/neutron/db/db_base_plugin_common.py index 444171b4ec4..9eb0a9d2d35 100644 --- a/neutron/db/db_base_plugin_common.py +++ b/neutron/db/db_base_plugin_common.py @@ -252,15 +252,6 @@ class DbBasePluginCommon(object): raise exceptions.NetworkNotFound(net_id=id) return network - def _get_subnet(self, context, id): - # TODO(slaweq): remove this method when all will be switched to use OVO - # objects only - try: - subnet = model_query.get_by_id(context, models_v2.Subnet, id) - except exc.NoResultFound: - raise exceptions.SubnetNotFound(subnet_id=id) - return subnet - def _get_subnet_object(self, context, id): subnet = subnet_obj.Subnet.get_object(context, id=id) if not subnet: diff --git a/neutron/tests/unit/db/test_db_base_plugin_v2.py b/neutron/tests/unit/db/test_db_base_plugin_v2.py index f6964638760..a2e13b3c818 100644 --- a/neutron/tests/unit/db/test_db_base_plugin_v2.py +++ b/neutron/tests/unit/db/test_db_base_plugin_v2.py @@ -4525,9 +4525,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase): 'cidr': 'fe80::/64', 'gateway_ip': 'fe80::1', 'tenant_id': v4_subnet['subnet']['tenant_id']} - mock.patch.object(db_base_plugin_common.DbBasePluginCommon, - '_get_subnet', - return_value=v6_subnet).start() # Add an IPv6 auto-address subnet to the network with mock.patch.object(directory.get_plugin(), 'update_port') as mock_updated_port: