Discover the device details.

        This method discover several device attributes.

        Args:
            logfile (file): Optional file descriptor for session logging. The file must be open for write.
                The session is logged only if ``log_session=True`` was passed to the constructor.
                It the parameter is not passed then the default *session.log* file is created in `log_dir`.

def discovery(self, logfile=None, tracefile=None):
        """Discover the device details.

        This method discover several device attributes.

        Args:
            logfile (file): Optional file descriptor for session logging. The file must be open for write.
                The session is logged only if ``log_session=True`` was passed to the constructor.
                It the parameter is not passed then the default *session.log* file is created in `log_dir`.

        """
        self._enable_logging(logfile=logfile, tracefile=tracefile)

        self.log("'discovery' method is deprecated. Please 'connect' with force_discovery=True.")
        self.log("Device discovery process started")
        self.connect(logfile=logfile, force_discovery=True, tracefile=tracefile)
        self.disconnect()