Contrail analytics support (squashed / cherry-picked from #36)

This patch is a squash / cherry-pick from Ted branch (PR #36)