Use the new attribute 'port_type' of the vrouter thrift API

Change-Id: Icbcbe7bc6ef7a88c8f3a4aa11b36034e36dca0f5
1) Filter clause is set incorrectly in the query when filter option is specified by the user in contrail-logs resulting in QueryEngine crash.
2) Filter operation should be LEQ instead GEQ.
Closes-Bug: #1353624

Change-Id: I8a9f2bfe4d3e842f92c90ad3eac1dc8282f9beef
1. Do not hold the static HttpSession::mutex_ when doing a
HttpSession::Send() in HttpSession::SessionSend()
since the send can fail and call the session close handler -
HttpSession::OnSessionEvent() which again tries to acquire the
HttpSession::mutex_ resulting in a deadlock. This was added as
part of commit 943e011 on bitbucket, to prevent the session
from getting deleted in another thread. To prevent the same
store HttpSessionPtr in the HttpSession map instead of the raw
pointer. Rename HttpSession::mutex_ to map_mutex_.
2. Remove code to acquire HttpSession::mutex_ in OnRead(),
destructor, and FromQ since it was being used to protect the
request_queue_ which is a concurrent queue and hence there is
no need to protect it using mutex.

Closes-Bug: #1359183
Change-Id: I682ec60f4570a8b9c9e277e06c896af62d7f3c18
Fix UVE test cases and make them non-flaky
Remove test_stats.cc as it is replaced by test_stats_mock.cc

Change-Id: Ib37f1ea033f02af1cd46eb475aec99f20912cd01
enable consistently passing UTs

Change-Id: I6e12558413ccd4a7479fb95cb2958b5309d16864
Fix tenant_id filtering

This patch is the cherry pick of
https://github.com/Juniper/contrail-neutron-plugin/commit/ec0378ea0f9fd45a192dcc45008b50dce4c61ee3

Change-Id: If2634df81f93a17e1e50e99bb9c14d56d3131427
Merge "Use the new attribute 'port_type' of the vrouter thrift API"
[SVC monitor] Fix some introspect and UVE bugs

Change-Id: I45f0572d2cda5941f85b541dfa7cb9dd371c215d
Merge "1) Filter clause is set incorrectly in the query when filter option is specified by the user in contrail-logs resulting in QueryEngine crash. 2) Filter operation should be LEQ instead GEQ. Closes-Bug: #1353624"
Loadbalancer fixes and whitelist changes

Change-Id: I73aa4d3b28dce8c542becbf38be75dfd2bb1e13a
Enable netns script in agent configuration

Change-Id: I1a3c8c68f98e44267c15b7fd62f03cf44ccb04ff
Merge "Fix UVE test cases and make them non-flaky Remove test_stats.cc as it is replaced by test_stats_mock.cc"
* Upon deactivation of floating ip and service vlan, release the
  reference to vrf, so that vrf deletion can proceed.
* Test case for same
Closes-bug: #1359320

Change-Id: Ib68d8696f4cae795da3c2b170c6366705c5e835e
* Pickup nat destination vrf as source vrf for setting egress composite
  NH, while DNAT is happening.
* Test case for same

Change-Id: I566fe4c16f5112f1dea228498441333921a4112d
Add availability zone enable/disable support in service template.
Also check if svc_monitor conf has availability zone

Change-Id: I876f2be5948e51698e7f8913890df6cac89ef6ff
Fix contrail-status for python 2.6 - centos. Also handle
socket.timeout exception in addition to requests.Timeout, CI systest
failed due to the unhandled exception.

Change-Id: I33f070b80e3bcf88a54fb2fa67b947c99624b02d
(cherry picked from commit 60025d4cbd3d6368790c0fd8e3a35b2fdcdb7bd1)
* Set tunnel for vlan route to mpls only, if vxlan was enabled
  then agent was publishing the route with mpls label 0.

Change-Id: Iafbbe40c3d2f8ec25204e6ce48d40401bac6c367
Merge "1. Do not hold the static HttpSession::mutex_ when doing a HttpSession::Send() in HttpSession::SessionSend() since the send can fail and call the session close handler - HttpSession::OnSessionEvent() which again tries to acquire the HttpSession::mutex_ resulting in a deadlock. This was added as part of commit 943e011 on bitbucket, to prevent the session from getting deleted in another thread. To prevent the same store HttpSessionPtr in the HttpSession map instead of the raw pointer. Rename HttpSession::mutex_ to map_mutex_. 2. Remove code to acquire HttpSession::mutex_ in OnRead(), destructor, and FromQ since it was being used to protect the request_queue_ which is a concurrent queue and hence there is no need to protect it using mutex."
Add more tests and fix concurrency bug in RTargetGroupMgr

The previous logic of keeping just 2 RouteTargetTriggerLists, current
and one pending, sometimes did not work as desired.  We would start
DB::PartitionCount() TaskTriggers to process the current list and use
an atomic int to keep track of when the last TaskTrigger has finished
processing the list. The TaskTriggers would be kicked off again when
the last one is done.

The issue was that some TaskTriggers could still be running when we
detect that the last one has "finished" - the atomic would haven been
decremented by all the TaskTriggers, but they may not have returned
from the Run function.  When we try to kick the TaskTriggers again,
some would not be restarted as they are still running.

Fixed this by using DB::PartitionCount() RouteTargetTriggerLists and
adding the RouteTarget to all the lists. This approach is simpler and
and also has the advantage that all the DB partition tasks can work in
parallel i.e. there's no synchronization point where some partitions
have to wait for others to finish processing RouteTargetTriggerList.

Change-Id: I24e7e504c052d68ae524a49fe0f27758133eb0fa
Merge "Fix contrail-status for python 2.6 - centos. Also handle socket.timeout exception in addition to requests.Timeout, CI systest failed due to the unhandled exception."