]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fixing traces of "Replace prt variable by port"
authorvikram.choudhary <vikram.choudhary@huawei.com>
Fri, 25 Sep 2015 15:27:34 +0000 (20:57 +0530)
committervikram.choudhary <vikram.choudhary@huawei.com>
Fri, 25 Sep 2015 15:29:52 +0000 (20:59 +0530)
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

neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py

index 729e3b90325b8f213029afde95e38fbfe0b8411f..f69b5d6a90a1412bcc5a3e298681bd604828844a 100644 (file)
@@ -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