Merge "Remove DbBasePluginCommon._get_subnet unused method"
This commit is contained in:
commit
9700ca7dad
|
@ -252,15 +252,6 @@ class DbBasePluginCommon(object):
|
||||||
raise exceptions.NetworkNotFound(net_id=id)
|
raise exceptions.NetworkNotFound(net_id=id)
|
||||||
return network
|
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):
|
def _get_subnet_object(self, context, id):
|
||||||
subnet = subnet_obj.Subnet.get_object(context, id=id)
|
subnet = subnet_obj.Subnet.get_object(context, id=id)
|
||||||
if not subnet:
|
if not subnet:
|
||||||
|
|
|
@ -4525,9 +4525,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
||||||
'cidr': 'fe80::/64',
|
'cidr': 'fe80::/64',
|
||||||
'gateway_ip': 'fe80::1',
|
'gateway_ip': 'fe80::1',
|
||||||
'tenant_id': v4_subnet['subnet']['tenant_id']}
|
'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
|
# Add an IPv6 auto-address subnet to the network
|
||||||
with mock.patch.object(directory.get_plugin(),
|
with mock.patch.object(directory.get_plugin(),
|
||||||
'update_port') as mock_updated_port:
|
'update_port') as mock_updated_port:
|
||||||
|
|
Loading…
Reference in New Issue