Loadbalancer class

Change-Id: Id787834fcfa6d723bf843a5cbcc41d057973935b
Generate the haproxy configuration

Change-Id: I02053792b7e133edf9a7fe667d92dcdba154089d
Set dest_vn in route to floating-ip VN

1. Set dest_vn in route for floating-ip to VN of borrowed VN
2. Add UT

Change-Id: I401f5a2c7761f6c42556ee873c27faba0df6a55f
Change to derive flow information from route

Changes to get vn-name, sg-id-list and route-prefix-len from the route
This is phase-1 of changes to support handling of route-add in flow

Change-Id: Ibccf0863410913dc92d4a0b2c705b2dbb06016d5
Fix couple of concurrency issues in TCP library

TcpServer::AcceptHandlerInternal inserts the new session into the
SesesionMap, releases the mutex and checks if the session has been
closed. If so, it subsequently calls DeleteSession on the session.
This can result in a duplicate delete if the application deletes
the session (by calling DeleteSession or ClearSessions) after the
mutex is released and also returns false from AcceptSession.

Fix is to not insert the session into SessionMap if AcceptSession
returns false.  Just need to make sure that we close the session.
Also ensure that we close the session if we are unable to make it
non-blocking.

TcpServer::ConnectHandler inserts the session into the SesesionMap,
releases the mutex and checks if the session has been closed.  If
so, it erases it from the SessionMap using the iterator returned
by the insert operation.  The iterator may not be valid anymore if
the application deletes the session (by calling DeleteSession or
ClearSessions) after the mutex is released.

Fix is to not use the iterator and instead erase from the SessionMap
by finding the session again.

Change-Id: I6c1754e75e46e29b37fd64fd89a12ffd572fa97e
Make bgp_server_test more robust

Terminate the BgpSessionManager when BgpServer is destroyed instead
of calling ClearSessions directly from ~BgpSessionManager. Doing so
takes care of a deadlock wherein ClearSessions could get called when
a session is being destroyed from a call to DeleteSession.

Make sure that BgpSessionManager does not accept any sessions after
it has called ClearSessions.  Otherwise those sessions get added to
the SessionSet and prevent BgpSessionManager from getting deleted.

Do not delete a BgpPeer till the state machine WorkQueue has been
drained completely.  This prevents an EvTcpDleteSession event from
getting deleted without being processed, hence preventing a leak of
the BgpSession.  The session would otherwise get deleted only when
the BgpSessionManager itself is terminated.

Fix an issue in state machine wherein a BgpOpen received on a stale
session caused a FSM error. A BgpOpen should cause a FSM error only
if it's received on the session currently being used by Established
peer.

Add a few more tests to bgp_server_test. Cleanup to consistently use
counts >= 3 in all tests that wait for specific counters to go up.

Sprinkle const in order make WorkQueue::IsQueueEmpty a const method.

Change-Id: Id1761667d68fe293ab0ddc099db1f508f8504769
Bug 1348909:

For quota apis, we use vnc_api lib which reads its config from its own
config file vnc_api_lib.ini. However this file can only be read by
root and neutron runs as user name neutron. As a result, it cannot
read this file and reverts to default values of auth host/port. This
works on single node setups, but on multi node setups, if keystone is
not running locally, it fails. With this commit, we are providing a
way to pass auth parameters while creating api lib connection. With
this, our quota driver can pass these values correctly.

Change-Id: I368a7ab5dc6d4eb1ded2bd2b86877c0570a9550d
Use staticmethod call to convert the function

Change-Id: I3931eb5c4926fcf4f4098b6b30007fbac15b798d
Bug 1352281: set status to DOWN if admin state is down

Change-Id: Ida5fd3dd5045e9e9568b35ba234c5fa6396585b2
EventManager must NOT be static. During termination, SandeshSession, SandeshClient, SandeshClientSM and its Timers are deleted as part of EventManager destruction. The Timer and TcpSession Client APIs rely on sets of intrusive ptrs, which are also static. We will crash if these sets are deleted before the SandeshSession or Timer objects. This is happening for SandeshClientSM timers during analytics systemless test, and was making the test fail.
Change-Id: If15544364371d9efb8cdca064f17b725ef55af36
Add a service vm test

Change-Id: I3b352ee78d8ea17ef8d08db957a3e8ae725c5c91
Need to allow for python requests package 2.x

Change-Id: Ia1779670f51bfd0b3ca0ce8de9235dd41e6115a3
set port status to PORT_STATUS_ACTIVE if device-id is
specified else PORT_STATUS_DOWN

get contrail:ipam_fq_name from subnet_q only if its present and
not None or ''

Change-Id: I4c852ce72232555350f1e42dbfc9a5391e1f2348
Make bgp_peer_membership_test nore robust

Change-Id: If54e06d850341704c814ad52281375bac9c02857
Changes for bug fix https://bugs.launchpad.net/juniperopenstack/+bug/1344476

Change-Id: Iadb153bdd9ffd7444126c961408e61de30ec17e0
Closes-Bug: #1349796
'virsh cpu-stats' command is not available on Ubuntu. Instead use 'virsh dominfo' to fetch cpu time as this command is available on both Ubuntu and Centos. Also fix command to fetch pid so that it works on both centos and ubuntu.
Change-Id: I05f4b70a8621a90dd8899cdcf26205ff28f17b5d
merge : Vn admin state - make all the relevant interfaces inactive when vn admin is down

Change-Id: Ib95d8f7b8bd398ec15b78a312ca1e4a650ad09b2
Merge : Fix 1350843 : remove references to vn from dns floating ip list, upon vn delete

Change-Id: I3f687ab027ad79a8051b93844e6b84a2e0eaf60d
1. Add proper path for inclusion of svc_mon_introspect.sandesh
   when calling sandesh init_generator. This changed with the console
   script change.
2. Cleanup schema transformer SConscript.
3. Remove not present sandesh directory from list of directories
   to search for when calling sandesh init_generator in api
   server.

Change-Id: Iad1a5bcaed1fde97e9e19e211d0e7dd31aaec5c3
Closes-Bug: #1352791
Update version info to 1.11 from 1.10main

Change-Id: Ib445a0e308dfb2cbbe4424eeb2512db297cbe5f4