Method nxos_connect (in nexus_network_driver.py) sets up SSH sessions to a switch once (whenever its first needed) and saves the connection state in connections[nexus_host]. It “hopes” that the session will perpetually remain up and hence all subsequent calls to the method use this saved state. There seems to be no way to detect if the SSH session is still alive and hence it is possible that the saved state and real state of the SSH session can go out of sync. In summary, if the SSH session drops for any reason, all subsequent communication with the switch (in _get_config and _edit_config) will lead to this kind of error.
Method nxos_connect (in nexus_network_ driver. py) sets up SSH sessions to a switch once (whenever its first needed) and saves the connection state in connections[ nexus_host] . It “hopes” that the session will perpetually remain up and hence all subsequent calls to the method use this saved state. There seems to be no way to detect if the SSH session is still alive and hence it is possible that the saved state and real state of the SSH session can go out of sync. In summary, if the SSH session drops for any reason, all subsequent communication with the switch (in _get_config and _edit_config) will lead to this kind of error.