From: Swaminathan Vasudevan Date: Thu, 10 Sep 2015 20:48:46 +0000 (-0700) Subject: Replace is_this_snat_host validation with internal function X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0f44a874b421e7dc055f409cffddbe52ca96b956;p=openstack-build%2Fneutron-build.git Replace is_this_snat_host validation with internal function 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 --- diff --git a/neutron/agent/l3/dvr_edge_router.py b/neutron/agent/l3/dvr_edge_router.py index 353f6eb31..2d4bd20e3 100644 --- a/neutron/agent/l3/dvr_edge_router.py +++ b/neutron/agent/l3/dvr_edge_router.py @@ -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'])