Skip to content

Commit

Permalink
Doc update (#204)
Browse files Browse the repository at this point in the history
* Updated host config documentation
* Updated license documents, added GPL to COPYING. Added license and copying files to package files.
* Updated copyright notices
  • Loading branch information
pkittenis authored Aug 20, 2020
1 parent 89985ce commit 9a298a7
Show file tree
Hide file tree
Showing 27 changed files with 1,362 additions and 490 deletions.
654 changes: 268 additions & 386 deletions COPYING

Large diffs are not rendered by default.

458 changes: 458 additions & 0 deletions COPYING.LESSER

Large diffs are not rendered by default.

504 changes: 504 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions LICENSE.txt

This file was deleted.

3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include versioneer.py
include pssh/_version.py
include LICENSE
include COPYING
include COPYING.LESSER
recursive-exclude tests *
include pssh/native/*.c
include pssh/native/*.pyx
41 changes: 29 additions & 12 deletions doc/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,10 @@ Sometimes, different hosts require different configuration like user names and p
host_config = {'host1' : {'user': 'user1', 'password': 'pass',
'port': 2222,
'private_key': load_private_key(
'my_key.pem')},
'private_key': 'my_key.pem'},
'host2' : {'user': 'user2', 'password': 'pass',
'port': 2223,
'private_key': load_private_key(
open('my_other_key.pem'))},
'private_key': 'my_other_key.pem'},
}
hosts = host_config.keys()
Expand All @@ -268,7 +266,8 @@ In the above example, ``host1`` will use user name ``user1`` and private key fro

.. note::

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

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


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

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

.. code-block:: python
output = client.run_command('%s %s',
host_args = (('host1_cmd1', 'host1_cmd2'),
('host2_cmd1', 'host2_cmd2'),
('host3_cmd1', 'host3_cmd2'),))
output = client.run_command(
'%s %s',
host_args=(('host1_cmd1', 'host1_cmd2'),
('host2_cmd1', 'host2_cmd2'),
('host3_cmd1', 'host3_cmd2'),))
This expands to the following per host commands:

.. code-block:: bash
host1: 'host1_cmd1 host1_cmd2'
host2: 'host2_cmd1 host2_cmd2'
host3: 'host3_cmd1 host3_cmd2'
A list of dictionaries can also be used as ``host_args`` for named argument substitution.

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

.. code-block:: python
host_args = [{'cmd': 'host-index-%s' % (i,)}
host_args = [{'cmd': 'echo command-%s' % (i,)}
for i in range(len(client.hosts))]
output = client.run_command('%(cmd)s', host_args=host_args)
This expands to the following per host commands:

.. code-block:: bash
host1: 'echo command-0'
host2: 'echo command-1'
host3: 'echo command-2'
Run command features and options
*********************************

Expand Down
2 changes: 1 addition & 1 deletion pssh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of parallel-ssh.

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

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
11 changes: 6 additions & 5 deletions pssh/agent.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


"""SSH agent module of parallel-ssh"""

import paramiko.agent
Expand Down
10 changes: 5 additions & 5 deletions pssh/clients/base_pssh.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis and contributors.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
10 changes: 5 additions & 5 deletions pssh/clients/miko/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
10 changes: 5 additions & 5 deletions pssh/clients/miko/parallel.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis and contributors.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
10 changes: 5 additions & 5 deletions pssh/clients/miko/single.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis and contributors.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
10 changes: 5 additions & 5 deletions pssh/clients/native/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
2 changes: 1 addition & 1 deletion pssh/clients/native/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of parallel-ssh.
#
# Copyright (C) 2014-2018 Panos Kittenis.
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
10 changes: 5 additions & 5 deletions pssh/clients/native/parallel.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
2 changes: 1 addition & 1 deletion pssh/clients/native/single.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of parallel-ssh.
#
# Copyright (C) 2014-2018 Panos Kittenis.
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion pssh/clients/native/tunnel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of parallel-ssh.
#
# Copyright (C) 2014-2018 Panos Kittenis.
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
11 changes: 6 additions & 5 deletions pssh/constants.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


"""Constants definitions for pssh package"""

DEFAULT_RETRIES = 3
Expand Down
10 changes: 5 additions & 5 deletions pssh/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis and contributors.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
2 changes: 1 addition & 1 deletion pssh/native/_ssh2.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of parallel-ssh.
#
# Copyright (C) 2014-2018 Panos Kittenis.
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
10 changes: 5 additions & 5 deletions pssh/output.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis and contributors.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
10 changes: 5 additions & 5 deletions pssh/pssh2_client.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This file is part of parallel-ssh.

# Copyright (C) 2014-2018 Panos Kittenis.

#
# Copyright (C) 2014-2020 Panos Kittenis.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
Loading

0 comments on commit 9a298a7

Please sign in to comment.