yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #51846
[Bug 1588281] Re: db_base_plugin_v2: id used instead of subnet_id
Reviewed: https://review.openstack.org/324344
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6f30217b42e178492f37f8619866e7c743868aa8
Submitter: Jenkins
Branch: master
commit 6f30217b42e178492f37f8619866e7c743868aa8
Author: Artur Korzeniewski <artur.korzeniewski@xxxxxxxxx>
Date: Thu Jun 2 12:28:33 2016 +0200
DB base plugin: correct typo id to subnet_id.
Code is referring to not declared variable 'id'. It was working before
because the 'id' was defined in place where
_subnet_check_ip_allocations_internal_router_ports() was invoked.
Closes-bug: #1588281
Change-Id: I2d9331171bf59e5e375e0c4fd0eeec25f4ebff30
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1588281
Title:
db_base_plugin_v2: id used instead of subnet_id
Status in neutron:
Fix Released
Bug description:
In db_base_plugin_v2 _subnet_check_ip_allocations_internal_router_ports(self, context, subnet_id)
code is referring to not declared variable 'id'. It was working before because the 'id' was defined in place where _subnet_check_ip_allocations_internal_router_ports() was invoked.
def _subnet_check_ip_allocations_internal_router_ports(self, context,
subnet_id):
# Do not delete the subnet if IP allocations for internal
# router ports still exist
allocs = context.session.query(models_v2.IPAllocation).filter_by(
subnet_id=subnet_id).join(models_v2.Port).filter(
models_v2.Port.device_owner.in_(
constants.ROUTER_INTERFACE_OWNERS)
).first()
if allocs:
LOG.debug("Subnet %s still has internal router ports, "
"cannot delete", subnet_id)
raise exc.SubnetInUse(subnet_id=id)
the last line should be subnet_id=subnet_id.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1588281/+subscriptions
References