Prevent unnecessary database read by l3 agent
Fixes bug 1088129 Change-Id: I887facf321f3267c16c101a1448827f6c046bb2c
This commit is contained in:
parent
61a5870b71
commit
340684b4dd
@ -864,6 +864,8 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
|
||||
my_ports = subnet_id_ports_dict.get(fixed_ip['subnet_id'], [])
|
||||
my_ports.append(port)
|
||||
subnet_id_ports_dict[fixed_ip['subnet_id']] = my_ports
|
||||
if not subnet_id_ports_dict:
|
||||
return
|
||||
filters = {'id': subnet_id_ports_dict.keys()}
|
||||
fields = ['id', 'cidr', 'gateway_ip']
|
||||
subnet_dicts = self.get_subnets(context, filters, fields)
|
||||
|
Loading…
Reference in New Issue
Block a user