예제 #1
0
 def __init__(self, module_number, file_object, kt_object, hostname):
     Cmd.__init__(self)
     self.prompt = hostname + '#'
     self.module = module_number
     self.file_object = file_object
     self.kt_object = kt_object
     self.kt_object.file_path = self.file_object.file_path
     self.terminal_length = False
     self.kt = False
     self.cli_option_flag = False
     self.cli_option = []
     self.interface_list = [[]]
     self.init_running_interface = defaultdict(list)
     self.init_interface_list()
     self.init_runningconfig_interface()
예제 #2
0
 def __init__(self, file_object, kt_object, hostname):
     Cmd.__init__(self)
     self.page_length, self.line_length = get_screen_size()
     self.windows_size_change_signal = 1
     signal.signal(signal.SIGWINCH, self.windows_size_change)
     self.prompt = hostname + '#'
     self.file_object = file_object
     self.kt_object = kt_object
     self.kt_object.file_path = self.file_object.file_path
     self.terminal_length = False
     #kt add/print flag
     self.kt = False
     self.cli_option_flag = False
     self.cli_option = []
     self.interface_list = [[]]
     self.init_running_interface = defaultdict(list)
     self.init_interface_list()
     self.init_runningconfig_interface()