The cinder.ssh_utils Module

Utilities related to SSH connection management.

class SSHPool(ip, port, conn_timeout, login, password=None, privatekey=None, *args, **kwargs)

Bases: eventlet.pools.Pool

A simple eventlet pool to hold ssh connections.

create()
get()

Return an item from the pool, when one is available.

This may cause the calling greenthread to block. Check if a connection is active before returning it.

For dead connections create and return a new connection.

remove(ssh)

Close an ssh client and remove it from free_items.