yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #08528
[Bug 1265132] Re: neutron code redundancy
** Changed in: neutron
Status: Fix Committed => Fix Released
** Changed in: neutron
Milestone: None => icehouse-2
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1265132
Title:
neutron code redundancy
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
I found the code in l3_db.py is redundant,the code is below:
in function _update_router_gw_info:
if gw_port and gw_port['network_id'] != network_id:
fip_count = self.get_floatingips_count(context.elevated(),
{'router_id': [router_id]})
if fip_count:
raise l3.RouterExternalGatewayInUseByFloatingIp(
router_id=router_id, net_id=gw_port['network_id'])
if gw_port and gw_port['network_id'] != network_id:
with context.session.begin(subtransactions=True):
router.gw_port = None
context.session.add(router)
self._core_plugin.delete_port(context.elevated(),
gw_port['id'],
l3_port_check=False)
it does not need the third if!
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1265132/+subscriptions
References