2828
2929from .base_pssh import BaseParallelSSHClient # noqa: E402
3030from .exceptions import HostArgumentException # noqa: E402
31- from .constants import DEFAULT_RETRIES # noqa: E402
31+ from .constants import DEFAULT_RETRIES , RETRY_DELAY # noqa: E402
3232from .ssh_client import SSHClient # noqa: E402
3333
3434
@@ -43,7 +43,7 @@ def __init__(self, hosts, user=None, password=None, port=None, pkey=None,
4343 timeout = 120 , pool_size = 10 , proxy_host = None , proxy_port = 22 ,
4444 proxy_user = None , proxy_password = None , proxy_pkey = None ,
4545 agent = None , allow_agent = True , host_config = None ,
46- channel_timeout = None ):
46+ channel_timeout = None , retry_delay = RETRY_DELAY ):
4747 """
4848 :param hosts: Hosts to connect to
4949 :type hosts: list(str)
@@ -61,6 +61,9 @@ def __init__(self, hosts, user=None, password=None, port=None, pkey=None,
6161 :param num_retries: (Optional) Number of retries for connection attempts
6262 before the client gives up. Defaults to 3.
6363 :type num_retries: int
64+ :param retry_delay: Number of seconds to wait between retries. Defaults
65+ to :py:class:`pssh.constants.RETRY_DELAY`
66+ :type retry_delay: int
6467 :param timeout: (Optional) Number of seconds to wait before connection
6568 and authentication attempt times out. Note that total time before
6669 timeout will be
@@ -111,7 +114,7 @@ def __init__(self, hosts, user=None, password=None, port=None, pkey=None,
111114 self , hosts , user = user , password = password , port = port , pkey = pkey ,
112115 allow_agent = allow_agent , num_retries = num_retries ,
113116 timeout = timeout , pool_size = pool_size ,
114- host_config = host_config )
117+ host_config = host_config , retry_delay = retry_delay )
115118 self .forward_ssh_agent = forward_ssh_agent
116119 self .proxy_host , self .proxy_port , self .proxy_user , \
117120 self .proxy_password , self .proxy_pkey = proxy_host , proxy_port , \
0 commit comments