示例#1
0
    def __init__(self,
                 host,
                 username,
                 password,
                 port=None,
                 on_session_start=None,
                 pkey=None,
                 *args,
                 **kwargs):
        ConnectionParams.__init__(self,
                                  host,
                                  port=port,
                                  on_session_start=on_session_start,
                                  pkey=pkey)
        ExpectSession.__init__(self, *args, **kwargs)

        if hasattr(self, 'port') and self.port is None:
            self.port = 22

        self.username = username
        self.password = password
        self.pkey = pkey

        self._handler = None
        self._current_channel = None
        self._buffer_size = self.BUFFER_SIZE
    def __init__(self, host, port, on_session_start=None, *args, **kwargs):
        ConnectionParams.__init__(
            self, host=host, port=port, on_session_start=on_session_start
        )
        ExpectSession.__init__(self, *args, **kwargs)

        self._buffer_size = self.BUFFER_SIZE
        self._handler = None
示例#3
0
    def __init__(self,
                 host,
                 username,
                 password,
                 port=None,
                 on_session_start=None,
                 *args,
                 **kwargs):
        ConnectionParams.__init__(self,
                                  host,
                                  port=port,
                                  on_session_start=on_session_start)
        ExpectSession.__init__(self, *args, **kwargs)

        if hasattr(self, 'port') and self.port is None:
            self.port = 23

        self.username = username
        self.password = password

        self._handler = None