Skip to content

Commit 607666f

Browse files
committed
Updated travis yaml. Updated documentation
1 parent 0605351 commit 607666f

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ python:
33
- "2.6"
44
- "2.7"
55
install:
6-
- pip install -r requirements.txt --use-mirrors
6+
- pip install -r requirements.txt
77
script: nosetests
88
notifications:
99
email:

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
# built documents.
5757
#
5858
# The short X.Y version.
59-
version = '0.3'
59+
version = '0.4'
6060
# The full version, including alpha/beta/rc tags.
61-
release = '0.3'
61+
release = '0.4'
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.

pssh.py

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

214214
class 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

Comments
 (0)