Sabari Kumar Murugesan 3f842f49dc Fix re-create session during transient failures
When invoke_api fails due to VimConnectionException it does not
always mean an expired vim session. It could be due to other
transient failures where the socket gets closed by the server.
To make it worse, vcenter doesn't support login call when a session
is already active. As a result, the re-create session may instead
fail.

This fix checks to see if the session is active before re-creating
the same.

Closes-Bug: #1398502

Change-Id: Id28217f8fe63c23767c66221a68ec944c9b27807
2014-12-04 00:33:14 -08:00
..
2014-02-24 04:17:29 -05:00