Browse Source

Merge "Remove DbBasePluginCommon._get_subnet unused method"

changes/77/743577/2
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
9700ca7dad
2 changed files with 0 additions and 12 deletions
  1. +0
    -9
      neutron/db/db_base_plugin_common.py
  2. +0
    -3
      neutron/tests/unit/db/test_db_base_plugin_v2.py

+ 0
- 9
neutron/db/db_base_plugin_common.py 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:


+ 0
- 3
neutron/tests/unit/db/test_db_base_plugin_v2.py 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:


Loading…
Cancel
Save