Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
Merge "DF allways consider the lroutre as distributed"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 31, 2016
2 parents 78932a0 + 07cbc4a commit ae0e0f7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
7 changes: 1 addition & 6 deletions dragonflow/controller/df_local_controller.py
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions dragonflow/db/api_nb.py
Expand Up @@ -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')

Expand Down
4 changes: 0 additions & 4 deletions dragonflow/neutron/plugin.py
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit ae0e0f7

Please sign in to comment.