Add connection hooks.
Merge pull request #1851 from mrunalp/dev/pythonv2

Merged by openshift-bot