Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     """
     Constructor of the SSHDetect class
     """
     if kwargs["device_type"] != "autodetect":
         raise ValueError("The connection device_type must be 'autodetect'")
     self.connection = ConnectHandler(*args, **kwargs)
     # Call the _test_channel_read() in base to clear initial data
     output = BaseConnection._test_channel_read(self.connection)
     self.initial_buffer = output
     self.potential_matches = {}
     self._results_cache = {}
Exemplo n.º 2
0
 def __init__(self, *args: Any, **kwargs: Any) -> None:
     """
     Constructor of the SSHDetect class
     """
     if kwargs["device_type"] != "autodetect":
         raise ValueError("The connection device_type must be 'autodetect'")
     # Always set cmd_verify to False for autodetect
     kwargs["global_cmd_verify"] = False
     self.connection = ConnectHandler(*args, **kwargs)
     # Call the _test_channel_read() in base to clear initial data
     output = BaseConnection._test_channel_read(self.connection)
     self.initial_buffer = output
     self.potential_matches: Dict[str, int] = {}
     self._results_cache: Dict[str, str] = {}