Invoke a Connect thrift call to Agent whenever the connection to Agent is re-established. This is required to ensure that Agent audit of previous port configuration happens.

Change-Id: Id46a49525e2db53282409b599a535eb0edb0274a
This commit makes following change:
Set default cassandra connection timeout in TSocket thrift class to 3 seconds.

Reason for this change:
Currently when a pool of cassandra servers is used for Contrail Analytics service and one or more cassandra servers are down, sometimes query through UI or other clients might fail.
We see 403 http error returned by the analytics rest api. Basically issue is that
1) Query engine upon receiving query connects to cassandra servers through a socket pool.
2) Socket pool code tries connecting to one cassandra server and then moves to next if the connection attempt fails.
3) Connection failure if a server is down takes a long time. By default timeout is way more than 10s of seconds.
4) While query engine threads are stuck trying to connect to a dead cassandra server, for new queries query engine does not even acknowledge back to opserver (contrail-analytics-api).
5) Opserver (contrail-analytics-api) hence times out (it has a timeout of 10 seconds) and returns 403 error to REST api invokers.

With the change in this commit, query engine will not be stuck waiting for timeout connecting to the cassandra server.

Closes-PR: 1398239
Closes-Bug: 1398239

Change-Id: I8ff3047468a294123839cc40854171c0de0f0650
Revert 60c8ba47e4dee05305d2c9ff68f57d91aabbbdc6 as contrail-api/ifmap fate share still.

If contrail-api is stopped after advertising ifmap to discovery, further updates
received by other api-servers is not reflected to local ifmap server.
If control-nodes are connected to this ifmap server they never get
these updates.

Closes-Bug: #1395949

Change-Id: I7845a16b01e24a7c333cba9ebc8575c29ddb3c88
1. Increase the receive buffer for protobuf udp server to 32k to
   accomodate fabric_message sent from MX
2. Include the protobuf message name in the message statistics in
   addition to the endpoint name
3. Add a GetReceivedMessageStatistics() function that returns just
   the received protobuf message stats without doing a diff with
   the old received message stats
Closes-Bug: #1398584

Change-Id: If61a186bafbbae4e0bd0815842ed2ebb7b9e4430
As part of contrail-vrouter-agent NodeStatus UVE, send the status as NON-FUNCTIONAL only when all the agent's connection to control-node is down. In all other cases, agent reports the state as FUNCTIONAL.
Add UT cases.
Closes-Bug: #1396164

Change-Id: I3336bfb9eae9810307619ccb08e52a76322a24bf
Delete the lb configuration files during cleanup

The issue is seen because boost::filesystem::remove
is used to delete the lb pool configuration directory.
Since the directory is not empty, it is failing.

This patch fixes the issue by calling
boost::filesystem::remove_all instead of delete
the files if the directory is not empty.

Change-Id: I48ced8fc1ef86063127ff50d42a40592082d27cb
Closes-bug: #1399241
Commit of the underlay/overlay mapping code
This is bringing code from rajreddy underlay repos, but because
of rebase problems, we are bringing this as a single commit
2 main components with this commit are
- snmp collector code
- topology calculation code
- ipfix receiver code

Adding 2 missing files from earlier commit..

Change-Id: If23b1c4d26c195791f388561736481a9ce6654ee
When collector is configured in agent config file, InitGenerator is invoked before ConnectionStateManager::GetInstance(). This resuls in agent crash because of the restriction enforced by commit https://github.com/Juniper/contrail-controller/commit/03133839a5e6e11000bd339e6ec6dd0e2812334f which requires ConnectionStateManager::GetInstance() to be invoked before InitGenerator.

Fix agent initialization so that ConnectionStateManager::GetInstance() is invoked before InitGenerator.
Closes-Bug: #1399521

Change-Id: I069a485dd060cc3892c16b7fe822a2eebdb8c992
For classic user security-group-rule_list does not work properly

Without any filters, when a classic user tries to list the
security-group-rules from a config-api server which has
multi-tenancy enabled will not work properly.

This patch attempts to fix that bug.

Change-Id: I99004b5114848542b915c6aef65e73fe2b446218
Closes-bug: #1399571
update provision_linklocal script to take admin name as argument

Change-Id: I2fd39da6c0122ed8c126868476b075c648901006
Merge "As part of contrail-vrouter-agent NodeStatus UVE, send the status as NON-FUNCTIONAL only when all the agent's connection to control-node is down. In all other cases, agent reports the state as FUNCTIONAL. Add UT cases. Closes-Bug: #1396164"
Merge "Commit of the underlay/overlay mapping code This is bringing code from rajreddy underlay repos, but because of rebase problems, we are bringing this as a single commit 2 main components with this commit are - snmp collector code - topology calculation code - ipfix receiver code"
Merge "1. Increase the receive buffer for protobuf udp server to 32k to    accomodate fabric_message sent from MX 2. Include the protobuf message name in the message statistics in    addition to the endpoint name 3. Add a GetReceivedMessageStatistics() function that returns just    the received protobuf message stats without doing a diff with    the old received message stats Closes-Bug: #1398584"
Trigger subscription from discovery client for faster convergence

o Trigger subscribe from discovery client instead of relying on the discovery client library to resend
  subscribe on ttl expiry. This is added for faster convergence.
o Discovery Server takes atleast 15secs to mark the services down, during with the discovery client(vrouter)
  can attempt connecting to older control-node's advertised by discovery server.
o Xmpp StateMachine support to trigger the connection attempt failure information to the Xmpp Clients
  to take action i.e trigger subscribe to Discovery Server.
o Add a jitter while attempting reconnects.
o Cleanup stale Xmpp and DNS servers after getting updates from discovery, this will avoid indefinite
  reconnects to Servers that are down.

Change-Id: I6f204c8ee269c2c8a31757dc10aa90bcdf3723eb
Closes-Bug: 1395099
Merge "For classic user security-group-rule_list does not work properly"
Merge "Revert 60c8ba47e4dee05305d2c9ff68f57d91aabbbdc6 as contrail-api/ifmap fate share still."
Merge "update provision_linklocal script to take admin name as argument"
Merge "This commit makes following change: Set default cassandra connection timeout in TSocket thrift class to 3 seconds."
Merge "Delete the lb configuration files during cleanup"
Merge "Invoke a Connect thrift call to Agent whenever the connection to Agent is re-established. This is required to ensure that Agent audit of previous port configuration happens."