Comment 103 for bug 1464016

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/23825
Committed: http://github.org/Juniper/contrail-controller/commit/6b17e4f39b2719fe2803f8db1ac514aa4fe00b82
Submitter: Zuul
Branch: master

commit 6b17e4f39b2719fe2803f8db1ac514aa4fe00b82
Author: Ananth Suryanarayana <email address hidden>
Date: Thu Sep 1 12:25:20 2016 -0700

Delete routes before unsubscribing from an instance

Production code agent does this and control-node expects this as well, from
any subscribed agent (mock or otherwise). Otherwise routes can remain undeleted
in the control-node's table (until the session flaps), or routes are explicitly
deleted.

But some tests still need routes not to be deleted during unsubscribe. Add an
argument to support this functionality to Unsubscribe() API of the mock agent
and use it in tests as necessary.

Also add security-group id to advertised routes. One can set --nsgids to a
desired number. route-id % nsgids is used as the actual sgid advertised. By
increasing nsgids, one can get different sgids across a given set of routes.

Mock-agent code also does not run eor timers (but uses BgpXmppChannel object)
Add necessary protection while cancelling the timer

Change-Id: Ic4f7ed2f0645151a7521130c09bb378418bc605a
Partial-Bug: #1464016