diff --git a/dragonflow/controller/df_local_controller.py b/dragonflow/controller/df_local_controller.py index 7b2df26bc..134d23da1 100644 --- a/dragonflow/controller/df_local_controller.py +++ b/dragonflow/controller/df_local_controller.py @@ -450,12 +450,7 @@ def floatingip_updated(self, floatingip): if floatingip.get_lport_id(): if self.db_store.get_local_port(floatingip.get_lport_id()) is None: return - if floatingip.get_lrouter_id(): - lrouter = self.db_store.get_router(floatingip.get_lrouter_id()) - # Currently, to implement DNAT for DVR on compute node only - # if distributed is False, DNAT is done on centralized vrouter - if not lrouter.is_distributed(): - return + old_floatingip = self.db_store.get_floatingip(floatingip.get_id()) if old_floatingip is None: # The new floatingip should be associated with a lport diff --git a/dragonflow/db/api_nb.py b/dragonflow/db/api_nb.py index fa553258c..cc7e98bc2 100644 --- a/dragonflow/db/api_nb.py +++ b/dragonflow/db/api_nb.py @@ -914,9 +914,6 @@ def get_ports(self): res.append(LogicalRouterPort(port)) return res - def is_distributed(self): - return self.lrouter.get('distributed', False) - def get_topic(self): return self.lrouter.get('topic') diff --git a/dragonflow/neutron/plugin.py b/dragonflow/neutron/plugin.py index d6b722aa1..32fd3acaa 100644 --- a/dragonflow/neutron/plugin.py +++ b/dragonflow/neutron/plugin.py @@ -765,11 +765,9 @@ def create_router(self, context, router): router_id = router['id'] tenant_id = router['tenant_id'] - is_distributed = router.get('distributed', False) router_name = router.get('name', df_const.DF_ROUTER_DEFAULT_NAME) self.nb_api.create_lrouter(router_id, topic=tenant_id, name=router_name, - distributed=is_distributed, version=router_version, ports=[]) return router @@ -783,11 +781,9 @@ def update_router(self, context, id, router): context.session, id) tenant_id = router['tenant_id'] - is_distributed = router.get('distributed', False) router_name = router.get('name', df_const.DF_ROUTER_DEFAULT_NAME) self.nb_api.update_lrouter(id, topic=tenant_id, name=router_name, - distributed=is_distributed, version=router_version) return router