def ssh_in_new_tab(self, host, username, password, prompt_endings=("#", ">")): """ Pretends to open a new tab. Since this is being run directly and no tabs exist, the function really does nothing but return a new Session object. :param host: The IP address of DNS name for the device to connect (only for API compatibility - not used) :type host: str :param username: The username to login to the device with (only for API compatibility - not used) :type username: str :param password: The password that goes with the provided username. If a password is not specified, the user will be prompted for one. (only for API compatibility - not used) :type password: str :param prompt_endings: A list of strings that are possible prompt endings to watch for. The default is for Cisco devices (">" and "#"), but may need to be changed if connecting to another type of device (for example "$" for some linux hosts). (only for API compatibility - not used) :type prompt_endings: list """ return sessions.DebugSession(self)
def __init__(self, full_script_path): super(DebugScript, self).__init__(full_script_path) self.logger.debug("<INIT> Building DirectExecution Object") self.main_session = sessions.DebugSession(self)