Add script to set nameserver IPs on a network IPAM

Change-Id: I64c8ef427df7fe7356dc77c96ae69bb5edc1945e
Signed-off-by: Édouard Thuleau <edouard.thuleau@cloudwatt.com>
Add list command to service_instance.py

Change-Id: I66026a098184daaa1ca37806e9e09155ab91e546
Create framework for unittests

Change-Id: Ic3abbeb7022269f72b4fc77c70b1cd282e1c8e81
Revert "Improves api server startup time significantly by pushing data from cassandra to ifmap"

This reverts commit e6836b5fe17cff72d5369710092efc3a2f00c84f.

Change-Id: Id7f440a16888244d6e00181450d2d14c8a4b87b0
Reproduce unicode string encoding issue

Change-Id: I8d1d073c0c8a1f278da60e6b014eecc5c94bd320
Allow port deletion even if it is not in internal dict

delete_port function should catch the KeyError or
use pop function when deleting the port from the
internal dictionary.
Otherwise it is not possible to the delete the port
if add_port is called in one process/context and
delete_port is called in another process/context. In these
scenarious, the _port dictionary will always be empty.

Change-Id: I3596489d42ae2c17f8be31edd8a97ede2edd30d3
Introduce a signal manager

This patch introduce a signal manager which is
in charge all the signals handling in order to
avoid concurrency issues.

This patch is a part of the patches that will come
for the SNAT.

Change-Id: I6e8c56d661308054b3d7ecc5ece835fc9c2ad6ea
Fix issues in XmppConnection cleanup on XmppServer side.

https://review.opencontrail.org/#/c/601/

Couple of issues in XmppConnection cleanup have been identified when
trying to stabilize bgp_stress_test and bgp_xmpp_deferq_test:

o LifetimeManager is not used correctly - actor is enqueued to the
manager directly from the ManagedDelete method instead of invoking
the LifetimeActor Delete method. Given the right sequence of events
this causes problems when the connection is deleted from both above
(due to test TearDown) and below (the mock agent bringing down the
session)

o XmppConnections that are rejected during dequeue (because there's
already a connection from same IP) are not tracked properly.  This
causes problems such as deletion of a different incarnation of the
connection (i.e. same IP but not the same data structure).

Both the above result in assertions in the LifetimeActor destructor.

Following fixes have been implemented:

- Modify ManagedDelete to call Delete on the LifetimeActor. Do this
for both XmppClientConnection and XmppServerConnection.
- Introduce RetryDelete method to put the LifetimeActor back on the
LifetimeManager queue so that deletion is attempted again. Use this
rather than calling ManagedDelete when a lightweight dependent gets
cleaned up.
- Maintain an XmppConnectionSet to keep track of deleted connections
in the XmppServer.  If a connection is rejected in DequeueConnection
because there's a pre-existing connection to the same end point, it
it added to the XmppConnectionSet. A connection that's accepted is
inserted into the XmppConnectionMap. It is migrated from the map to
the set when the LifetimeManager invokes Shutdown. A connection is
erased from the set when it's destroyed.
- Change the XmppConnectionMap in XmppServer from boost::ptr_map to
a std::map since former doesn't allow entries to be removed without
destroying them.
- Remove is_deleted_ from XmppConnection and use the LifetimeActor
deleted state instead.
- Modify XmppConnection::Shutdown to be an alias for ManagedDelete.
- Tweak xmpp_server_sm_test to pass cleanly with new cleanup code.
- Make bgp_stress_test use XmppStateMachineTest for shorter timers.

Incidental changes:

- Rename McastTreeManager's MayResumeDelete to RetryDelete.
- Rename DBTable::MayResumeDelete to RetryDelete for consistency.
- Remove assertion in UpdatePeerRefCount as there's a problem with
it. The underlying problem will be debugged and fixed separately.

Change-Id: I1e51772a5532d23f34b7fba6d62058ba501adbe2
Promote a few bgp tests from the flaky list to good.

Change-Id: If62fe9c7274e0b6bcbba672c571d3962aeddeaad
Merge "Revert "Improves api server startup time significantly by pushing data from cassandra to ifmap""
Merge "Introduce a signal manager"
Merge "Promote a few bgp tests from the flaky list to good."
Merge "Reproduce unicode string encoding issue"
Merge "Allow port deletion even if it is not in internal dict"
Merge "Add list command to service_instance.py"
Merge "Add script to set nameserver IPs on a network IPAM"
Merge "Create framework for unittests"
Adding check for reverse flow to be present for an ECMP flow,
in case when an etablished ECMP flow gets converted to NAT flow
one of the residual flow with type ECMP(marked short flow) will
not have the reverse flow ptr.

Adding test case for the same.

Change-Id: Iaf463c877d9bc7e647598d95e5e29b509fd1bc3d
Send missing VM name in VirtualMachineStatsTrace UVE.
Change-Id: I66355aae9282e05ee734e6787ac6851031f7addf
Define different identifiers to represent to represent different possible actions taken while applying network policy rules and sg rules. Export these identifiers in flow log message

Change-Id: Ia33d0ce7458f5663f0b3817edd6f3d35f22a034c