@@ -70,9 +70,9 @@ def __init__(self, host,
7070 :type port: int
7171 :param pkey: (Optional) Client's private key to be used to connect with
7272 :type pkey: :mod:`paramiko.PKey`
73- :raises: AuthenticationException on authentication error
74- :raises: UnknownHostException on DNS resolution error
75- :raises: ConnectionErrorException on error connecting"""
73+ :raises: :mod:`pssh. AuthenticationException` on authentication error
74+ :raises: :mod:`pssh. UnknownHostException` on DNS resolution error
75+ :raises: :mod:`pssh. ConnectionErrorException` on error connecting"""
7676 ssh_config = paramiko .SSHConfig ()
7777 _ssh_config_file = os .path .sep .join ([os .path .expanduser ('~' ),
7878 '.ssh' ,
@@ -213,7 +213,11 @@ def copy_file(self, local_file, remote_file):
213213
214214class ParallelSSHClient (object ):
215215 """Uses :mod:`pssh.SSHClient`, performs tasks over SSH on multiple hosts in \
216- parallel"""
216+ parallel.
217+
218+ Connections to hosts are established in parallel when an object of this class \
219+ is created, therefor any connection and/or authentication failures will happen \
220+ on creation and need to be caught."""
217221
218222 def __init__ (self , hosts ,
219223 user = None , password = None , port = None , pkey = None ,
@@ -237,9 +241,9 @@ def __init__(self, hosts,
237241 :param pool_size: (Optional) Greenlet pool size. Controls on how many\
238242 hosts to execute tasks in parallel. Defaults to 10
239243 :type pool_size: int
240- :raises: AuthenticationException on authentication error
241- :raises: UnknownHostException on DNS resolution error
242- :raises: ConnectionErrorException on error connecting
244+ :raises: :mod:`pssh. AuthenticationException` on authentication error
245+ :raises: :mod:`pssh. UnknownHostException` on DNS resolution error
246+ :raises: :mod:`pssh. ConnectionErrorException` on error connecting
243247
244248 **Example**
245249
@@ -333,19 +337,20 @@ def _exec_command(self, host, *args, **kwargs):
333337
334338 def get_stdout (self , greenlet ):
335339 """Print stdout from greenlet and return exit code for host
336- :param greenlet: Greenlet object containing an \
337- SSH channel reference, hostname, stdout and stderr buffers
338- :type greenlet: :mod:`gevent.Greenlet`
339-
340- :mod:`pssh.get_stdout` will close the open SSH channel but this does **not**
341- close the established connection to the remote host, only the
340+
341+ :mod:`pssh.get_stdout` will close the open SSH channel but this does
342+ **not** close the established connection to the remote host, only the
342343 authenticated SSH channel within it. This is standard practise
343344 in SSH when a command has finished executing. A new command
344345 will open a new channel which is very fast on already established
345346 connections.
346347
347- :rtype: Dictionary containing {host: {'exit_code': exit code}} entry \
348- for example {'myhost1': {'exit_code': 0}}
348+ :param greenlet: Greenlet object containing an \
349+ SSH channel reference, hostname, stdout and stderr buffers
350+ :type greenlet: :mod:`gevent.Greenlet`
351+
352+ :rtype: Dictionary containing ``{host: {'exit_code': exit code}}`` entry \
353+ for example ``{'myhost1': {'exit_code': 0}}``
349354 """
350355 channel , host , stdout , stderr = greenlet .get ()
351356 for line in stdout :
0 commit comments