From f5097732b4664b9482500f3a9d2f068ae04a8bfe Mon Sep 17 00:00:00 2001 From: "vikram.choudhary" Date: Fri, 25 Sep 2015 20:57:34 +0530 Subject: [PATCH] Fixing traces of "Replace prt variable by port" The fix for https://review.openstack.org/#/c/218350/ has few more occurrences. This patch addresses those and also changes "local_port" from "port" in order not to confuse the parameter with method argument. Change-Id: I60bfeb9e33f0f69153afec083a2c05ee862fcee2 --- .../drivers/openvswitch/agent/ovs_dvr_neutron_agent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py index 729e3b903..f69b5d6a9 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py @@ -404,9 +404,9 @@ class OVSDVRNeutronAgent(object): "get_ports_on_host_by_subnet %s", local_compute_ports) vif_by_id = self.int_br.get_vifs_by_ids( - [prt['id'] for prt in local_compute_ports]) - for prt in local_compute_ports: - vif = vif_by_id.get(prt['id']) + [local_port['id'] for local_port in local_compute_ports]) + for local_port in local_compute_ports: + vif = vif_by_id.get(local_port['id']) if not vif: continue ldm.add_compute_ofport(vif.vif_id, vif.ofport) @@ -420,7 +420,7 @@ class OVSDVRNeutronAgent(object): # the compute port is discovered first here that its on # a dvr routed subnet queue this subnet to that port comp_ovsport = OVSPort(vif.vif_id, vif.ofport, - vif.vif_mac, prt['device_owner']) + vif.vif_mac, local_port['device_owner']) comp_ovsport.add_subnet(subnet_uuid) self.local_ports[vif.vif_id] = comp_ovsport # create rule for just this vm port -- 2.45.2