Skip to content

Commit 9a298a7

Browse files
authored
Doc update (#204)
* Updated host config documentation * Updated license documents, added GPL to COPYING. Added license and copying files to package files. * Updated copyright notices
1 parent 89985ce commit 9a298a7

27 files changed

+1362
-490
lines changed

COPYING

+268-386
Large diffs are not rendered by default.

COPYING.LESSER

+458
Large diffs are not rendered by default.

LICENSE

+504
Large diffs are not rendered by default.

LICENSE.txt

-12
This file was deleted.

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
include versioneer.py
22
include pssh/_version.py
3+
include LICENSE
4+
include COPYING
5+
include COPYING.LESSER
36
recursive-exclude tests *
47
include pssh/native/*.c
58
include pssh/native/*.pyx

doc/advanced.rst

+29-12
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,10 @@ Sometimes, different hosts require different configuration like user names and p
251251
252252
host_config = {'host1' : {'user': 'user1', 'password': 'pass',
253253
'port': 2222,
254-
'private_key': load_private_key(
255-
'my_key.pem')},
254+
'private_key': 'my_key.pem'},
256255
'host2' : {'user': 'user2', 'password': 'pass',
257256
'port': 2223,
258-
'private_key': load_private_key(
259-
open('my_other_key.pem'))},
257+
'private_key': 'my_other_key.pem'},
260258
}
261259
hosts = host_config.keys()
262260
@@ -268,7 +266,8 @@ In the above example, ``host1`` will use user name ``user1`` and private key fro
268266

269267
.. note::
270268

271-
Proxy host cannot be provided via per-host configuration at this time.
269+
Proxy host configuration is per `ParallelSSHClient` and cannot be provided via per-host configuration.
270+
Multiple clients can be used to make use of multiple proxy hosts.
272271

273272
Per-Host Command substitution
274273
******************************
@@ -282,7 +281,7 @@ Number of ``host_args`` items should be at least as many as number of hosts.
282281
Any Python string format specification characters may be used in command string.
283282

284283

285-
In the following example, first host in hosts list will use cmd ``host1_cmd`` second host ``host2_cmd`` and so on
284+
In the following example, first host in hosts list will use cmd ``host1_cmd`` second host ``host2_cmd`` and so on:
286285

287286
.. code-block:: python
288287
@@ -294,22 +293,40 @@ Command can also have multiple arguments to be substituted.
294293

295294
.. code-block:: python
296295
297-
output = client.run_command('%s %s',
298-
host_args = (('host1_cmd1', 'host1_cmd2'),
299-
('host2_cmd1', 'host2_cmd2'),
300-
('host3_cmd1', 'host3_cmd2'),))
296+
output = client.run_command(
297+
'%s %s',
298+
host_args=(('host1_cmd1', 'host1_cmd2'),
299+
('host2_cmd1', 'host2_cmd2'),
300+
('host3_cmd1', 'host3_cmd2'),))
301+
302+
This expands to the following per host commands:
303+
304+
.. code-block:: bash
305+
306+
host1: 'host1_cmd1 host1_cmd2'
307+
host2: 'host2_cmd1 host2_cmd2'
308+
host3: 'host3_cmd1 host3_cmd2'
301309
302310
A list of dictionaries can also be used as ``host_args`` for named argument substitution.
303311

304-
In the following example, first host in host list will use cmd ``host-index-0``, second host ``host-index-1`` and so on.
312+
In the following example, first host in host list will use cmd ``echo command-1``, second host ``echo command-2`` and so on.
305313

306314
.. code-block:: python
307315
308-
host_args = [{'cmd': 'host-index-%s' % (i,)}
316+
host_args = [{'cmd': 'echo command-%s' % (i,)}
309317
for i in range(len(client.hosts))]
310318
output = client.run_command('%(cmd)s', host_args=host_args)
311319
312320
321+
This expands to the following per host commands:
322+
323+
.. code-block:: bash
324+
325+
host1: 'echo command-0'
326+
host2: 'echo command-1'
327+
host3: 'echo command-2'
328+
329+
313330
Run command features and options
314331
*********************************
315332

pssh/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of parallel-ssh.
22

3-
# Copyright (C) 2014-2018 Panos Kittenis.
3+
# Copyright (C) 2014-2020 Panos Kittenis.
44

55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public

pssh/agent.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1717

18+
1819
"""SSH agent module of parallel-ssh"""
1920

2021
import paramiko.agent

pssh/clients/base_pssh.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis and contributors.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/clients/miko/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/clients/miko/parallel.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis and contributors.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/clients/miko/single.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis and contributors.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/clients/native/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/clients/native/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of parallel-ssh.
22
#
3-
# Copyright (C) 2014-2018 Panos Kittenis.
3+
# Copyright (C) 2014-2020 Panos Kittenis.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public

pssh/clients/native/parallel.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/clients/native/single.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of parallel-ssh.
22
#
3-
# Copyright (C) 2014-2018 Panos Kittenis.
3+
# Copyright (C) 2014-2020 Panos Kittenis.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public

pssh/clients/native/tunnel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of parallel-ssh.
22
#
3-
# Copyright (C) 2014-2018 Panos Kittenis.
3+
# Copyright (C) 2014-2020 Panos Kittenis.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public

pssh/constants.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1717

18+
1819
"""Constants definitions for pssh package"""
1920

2021
DEFAULT_RETRIES = 3

pssh/exceptions.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis and contributors.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/native/_ssh2.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of parallel-ssh.
22
#
3-
# Copyright (C) 2014-2018 Panos Kittenis.
3+
# Copyright (C) 2014-2020 Panos Kittenis.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public

pssh/output.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis and contributors.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

pssh/pssh2_client.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This file is part of parallel-ssh.
2-
3-
# Copyright (C) 2014-2018 Panos Kittenis.
4-
2+
#
3+
# Copyright (C) 2014-2020 Panos Kittenis.
4+
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
77
# License as published by the Free Software Foundation, version 2.1.
8-
8+
#
99
# This library is distributed in the hope that it will be useful,
1010
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
# Lesser General Public License for more details.
13-
13+
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

0 commit comments

Comments
 (0)