BgpConfig code is too aggressive in treating nodes as deleted.

BgpPeers sometimes do not come up when repeatedly doing delete
and add in the bgp_stress_test via [DELETE|ADD]_BGP_PEER events.

Root cause is that the config code does not look at IFMap nodes
that have no neighbors in the graph i.e. it considers them to
be deleted.  This can cause a problem if a bgp-router node is
added and processed before parent link to the routing-instance
has been processed.  In this case, the BgpProtocolConfig that
corresponds to the bgp-router is not created.

Fix is to not consider IFMap nodes without neighbors as deleted.

Also fix minor issue wherein the creation of a BgpPeeringConfig
would get logged as a create and an update.

Change-Id: I44c1d6de17a7a495cc18a5ddd20a05dde8b8b3fb
Report traceback with details only in the case where unexpected exception occurs in api-server
(i.e ignore reporting tracebacks details for bottle.abort). Add unit test for same.

Fixes bug: 1346459

Change-Id: I5dbb2387d4046210958191845f2a66675284ad55
[Schema transformer] Catch NoIdError exception

Change-Id: I6b0a417b3adf6372f86b9a851d60966f9a1d1a28
Fix corner case in TcpServer accept handler.

If the TcpServer accept handler gets called after the the server
has been shut down i.e. acceptor_ is NULL, it sets session state
to established and then allows the newly allocated session to get
destroyed when the scoped pointer is destroyed.  This causes the
assertion in ~TcpSession on !established to fail.

Fix is to check if acceptor is NULL before marking the session as
established.

Change-Id: Iffa2dd96769100a77162ed771d66ca975eecdfb5
Fix concurrency issue in processing passive BgpSessions.

The code in BgpSessionManager::AcceptSession is called from the IO
thread. It acessses RoutingInstances and BgpPeers to determine if
we have a configured BgpPeer corresponding to the session. This is
clearly a problem since the RoutingInstance and BgpPeer maps are
modified from the bgp::Config task which is not exclusive with the
IO thread.

Fix is to have BgpSessionManager::AcceptSession queue the session
and process it from the context of the bgp::Config task.

Also tweak a couple of tests to check error counts for received open
messages instead of notifications that are sent in respose to those
errors and received on the other side.

Change-Id: I5a17ecc34f2e36f914cffda259af3957f527a8d6
merge from R1.06 : Append tenant name to floating ip DNS record

Change-Id: I956883a44906e84feeb27fd2efcb915a9c613333
Merge from R1.06 : Update pending DNS records upon VDNS creation

Change-Id: I6adea84c45e8cd3112bc4cf566a0516ba5a66afc
Run unit-test code as env.UnitTest

Enable memory check for agent unit-tests
Fix unit-test memory leak errors
Move failing tests to flaky_test_list

Change-Id: Ifa8a4b17f6d672a13604277265337006ea64fe82
bfd: schema: fix a typo in ietf-bfd-schema

The typo broke scons controller/src/schema, but compiling controller by running
scons without arguments did not catch the error.

Change-Id: I9d71707b9d07a1773a760376646118a993e3ee17
Signed-off-by: Mateusz Zalega <mateusz.zalega@codilime.com>
bfd: schema: make link with bgp-router a complex type

Data associated with an IFMap link had to be made a complex type in order for
autogen scripts to work.

Change-Id: Ic60d8afb87c3b9ec395e4cb1fc6176be7c587ba6
Signed-off-by: Mateusz Zalega <mateusz.zalega@codilime.com>
bfd: schema: fix invalid Property statement

Wrong argument order broke IFMap code autogeneration (build/debug/schema/), but
compilation errors weren't caught by scons.

Change-Id: I099cdcca201e9fce5d1cb67c3ad1548f8e88dd09
Signed-off-by: Mateusz Zalega <mateusz.zalega@codilime.com>
Merge "merge from R1.06 : Append tenant name to floating ip DNS record"
Merge "Merge from R1.06 : Update pending DNS records upon VDNS creation"
Merge "bfd: schema: fix a typo in ietf-bfd-schema"
Merge "Report traceback with details only in the case where unexpected exception occurs in api-server (i.e ignore reporting tracebacks details for bottle.abort). Add unit test for same."
Flap all XMPP connections if the ASN changes.

The ASN is embedded in a few extended communities such as OriginVn and
SecurityGroup.  If the ASN changes, we need to update all XMPP learnt
routes to have these extended communities based on the new ASN.  Since
an ASN change is expeceted to be a very infrequent event, we choose to
handle it by flapping all the connections instead of updating all the
routes.

Change-Id: I333decdeaaf70f5f58b84bdc85fe447bb82c8737
Merge "bfd: schema: make link with bgp-router a complex type"
Merge "bfd: schema: fix invalid Property statement"
Fix compilation broken due to change in xmpp-server api and because
ifmap_xmpp_test is in flaky list.

Change-Id: I1f9cc3ad41dd4019aa006bae675e2cf3e34415a9
Merge "BgpConfig code is too aggressive in treating nodes as deleted."