Merge "Remove DbBasePluginCommon._get_subnet unused method"

This commit is contained in:
Zuul 2020-07-28 11:27:34 +00:00 committed by Gerrit Code Review
commit 9700ca7dad
2 changed files with 0 additions and 12 deletions

View File

@ -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:

View File

@ -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: