|
| 1 | +#!/usr/bin/env python |
| 2 | + |
| 3 | +# This file is part of parallel-ssh. |
| 4 | + |
| 5 | +# Copyright (C) 2015 Panos Kittenis |
| 6 | + |
| 7 | +# This library is free software; you can redistribute it and/or |
| 8 | +# modify it under the terms of the GNU Lesser General Public |
| 9 | +# License as published by the Free Software Foundation, version 2.1. |
| 10 | + |
| 11 | +# This library is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | +# Lesser General Public License for more details. |
| 15 | + |
| 16 | +# You should have received a copy of the GNU Lesser General Public |
| 17 | +# License along with this library; if not, write to the Free Software |
| 18 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | + |
| 20 | +"""Asynchronous parallel SSH library |
| 21 | +
|
| 22 | +parallel-ssh uses asychronous network requests - there is *no* multi-threading nor multi-processing used. |
| 23 | +
|
| 24 | +This is a *requirement* for commands on many (hundreds/thousands/hundreds of thousands) of hosts which would grind a system to a halt simply by having so many processes/threads all wanting to execute if done with multi-threading/processing. |
| 25 | +
|
| 26 | +The `libev event loop library <http://software.schmorp.de/pkg/libev.html>`_ is utilised on nix systems. Windows is not supported. |
| 27 | +
|
| 28 | +See :mod:`pssh.ParallelSSHClient` and :mod:`pssh.SSHClient` for class documentation. |
| 29 | +""" |
| 30 | +import logging |
| 31 | +from .utils import enable_host_logger |
| 32 | +from .pssh_client import ParallelSSHClient |
| 33 | +from .ssh_client import SSHClient |
| 34 | +from .exceptions import UnknownHostException, \ |
| 35 | + AuthenticationException, ConnectionErrorException, SSHException |
| 36 | + |
| 37 | + |
| 38 | +host_logger = logging.getLogger('pssh.host_logger') |
| 39 | +logger = logging.getLogger('pssh') |
0 commit comments