]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Replace is_this_snat_host validation with internal function
authorSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Thu, 10 Sep 2015 20:48:46 +0000 (13:48 -0700)
committerSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Thu, 10 Sep 2015 20:56:12 +0000 (13:56 -0700)
There is already a function to validate if it is an snat
host or not. So just use that function instead of additional
validation.

Change-Id: I004d94d1d4b632880ed289ccdc9bf45cffc0e095

neutron/agent/l3/dvr_edge_router.py

index 353f6eb315656aee53d9e946c2d217a75dd76c66..2d4bd20e31ac802c12d7b2badf18b2c406f2ccae 100644 (file)
@@ -105,9 +105,7 @@ class DvrEdgeRouter(dvr_local_router.DvrLocalRouter):
         if not sn_port:
             return
 
-        is_this_snat_host = ('binding:host_id' in self.ex_gw_port) and (
-            self.ex_gw_port['binding:host_id'] == self.host)
-        if not is_this_snat_host:
+        if not self._is_this_snat_host():
             return
 
         snat_interface = self._get_snat_int_device_name(sn_port['id'])