def __init__(self, hostname, username, password, timeout=<NUM_LIT>, optional_args=None):
self.hostname = hostname<EOL>self.username = username<EOL>self.password = password<EOL>self.timeout = timeout<EOL>self.config_replace = False<EOL>self.locked = False<EOL>if optional_args is None:<EOL><INDENT>optional_args = {}<EOL><DEDENT>self.config_lock = optional_args.get('<STR_LIT>', False)<EOL>self.port = optional_args.get('<STR_LIT:port>', <NUM_LIT>)<EOL>self.key_file = optional_args.get('<STR_LIT>', None)<EOL>self.keepalive = optional_args.get('<STR_LIT>', <NUM_LIT:30>)<EOL>self.ssh_config_file = optional_args.get('<STR_LIT>', None)<EOL>self.ignore_warning = optional_args.get('<STR_LIT>', False)<EOL>if self.key_file:<EOL><INDENT>self.device = Device(hostname,<EOL>user=username,<EOL>password=password,<EOL>ssh_private_key_file=self.key_file,<EOL>ssh_config=self.ssh_config_file,<EOL>port=self.port)<EOL><DEDENT>else:<EOL><INDENT>self.device = Device(hostname,<EOL>user=username,<EOL>password=password,<EOL>port=self.port,<EOL>ssh_config=self.ssh_config_file)<EOL><DEDENT>self.profile = ["<STR_LIT>"]<EOL>
Initialise JunOS driver.

Optional args:
    * config_lock (True/False): lock configuration DB after the connection is established.
    * port (int): custom port
    * key_file (string): SSH key file path
    * keepalive (int): Keepalive interval
    * ignore_warning (boolean): not generate warning exceptions