def __init__(self, hostname, username, password, timeout=<NUM_LIT>, optional_args=None):
if optional_args is None:<EOL><INDENT>optional_args = {}<EOL><DEDENT>self.hostname = hostname<EOL>self.username = username<EOL>self.password = password<EOL>self.timeout = timeout<EOL>self.transport = optional_args.get('<STR_LIT>', '<STR_LIT>')<EOL>self.candidate_cfg = optional_args.get('<STR_LIT>', '<STR_LIT>')<EOL>self.merge_cfg = optional_args.get('<STR_LIT>', '<STR_LIT>')<EOL>self.rollback_cfg = optional_args.get('<STR_LIT>', '<STR_LIT>')<EOL>self.inline_transfer = optional_args.get('<STR_LIT>', False)<EOL>if self.transport == '<STR_LIT>':<EOL><INDENT>self.inline_transfer = True<EOL><DEDENT>self._dest_file_system = optional_args.get('<STR_LIT>', None)<EOL>self.auto_rollback_on_error = optional_args.get('<STR_LIT>', True)<EOL>netmiko_argument_map = {<EOL>'<STR_LIT:port>': None,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT>': <NUM_LIT:30>,<EOL>'<STR_LIT>': <NUM_LIT:1>,<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': False,<EOL>}<EOL>self.netmiko_optional_args = {}<EOL>for k, v in netmiko_argument_map.items():<EOL><INDENT>try:<EOL><INDENT>self.netmiko_optional_args[k] = optional_args[k]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>default_port = {<EOL>'<STR_LIT>': <NUM_LIT>,<EOL>'<STR_LIT>': <NUM_LIT><EOL>}<EOL>self.port = optional_args.get('<STR_LIT:port>', default_port[self.transport])<EOL>self.device = None<EOL>self.config_replace = False<EOL>self.interface_map = {}<EOL>self.profile = ["<STR_LIT>"]<EOL>
NAPALM Cisco IOS Handler.