Skip to content

Commit

Permalink
ST: Route Table routes need to be set properly when update happened
Browse files Browse the repository at this point in the history
Change-Id: Ia9c33706eef48d09424f2c9042165bd4c38a5f88
Closes-Bug: #1548893
  • Loading branch information
sbalineni committed Feb 26, 2016
1 parent 241c8b1 commit 6a29eec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config/schema-transformer/config_db.py
Expand Up @@ -1571,6 +1571,7 @@ def __init__(self, name, obj=None):

def update(self, obj=None):
self.obj = obj or self.read_vnc_obj(fq_name=self.name)
self.routes = []
routes = self.obj.get_routes()
if routes:
self.routes = routes.get_route() or []
Expand Down
7 changes: 6 additions & 1 deletion src/config/schema-transformer/test/test_service.py
Expand Up @@ -1366,7 +1366,6 @@ def _match_route_table(vn, prefix, next_hop, should_present=True):
rt.set_routes(routes)
self._vnc_lib.route_table_update(rt)

gevent.sleep(10)
_match_route_table(vn1, "2.2.2.2/0", "20.20.20.20", False)
_match_route_table(vn2, "2.2.2.2/0", "20.20.20.20", False)

Expand All @@ -1383,6 +1382,12 @@ def _match_route_table_cleanup(vn):
_match_route_table(vn1, "1.1.1.1/0", "10.10.10.10")
_match_route_table_cleanup(vn2)

# delete first route and check vn ri sr entries
rt.set_routes(None)
self._vnc_lib.route_table_update(rt)

_match_route_table(vn1, "1.1.1.1/0", "10.10.10.10", False)

vn1.del_route_table(rt)
self._vnc_lib.virtual_network_update(vn1)
_match_route_table_cleanup(vn1)
Expand Down

0 comments on commit 6a29eec

Please sign in to comment.