From 0f44a874b421e7dc055f409cffddbe52ca96b956 Mon Sep 17 00:00:00 2001 From: Swaminathan Vasudevan Date: Thu, 10 Sep 2015 13:48:46 -0700 Subject: [PATCH] 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 --- neutron/agent/l3/dvr_edge_router.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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']) -- 2.45.2