class Log_box: root = tk.Tk() ######################### # Connect to JunOS # ######################### config = str(JunOS_Connection().show() ) #return self.dev_Connect.cli("show configuration") ######################### # Create ScrolledText # ######################### textarea = tkst.ScrolledText(root, width=50, height=20) textarea.grid(row=0, column=0) ######################### # EMPTY TEXT AREA # ######################### textarea.delete(0.0, "end") #### 0.0 = row0, column0 #### Specify which row to delete ######################### # Insert to Text Area # ######################### textarea.insert("insert", config) ######################### # Write to Document # ######################### with open("Configuration.config", "w") as text_file: text_file.write(config) text_file.close() ###Run Inter root.mainloop()
def test_fw(self): c=JunOS_Connection() c.firewall(filter_name, term, from1, from2, then)
def test_IPv6(self): c=JunOS_Connection() c.ipV6(v4, interface, unit, mask)
def test_vr(self): c=JunOS_Connection() c.vr(vr_var,int_var,unit_var)
def test_vlan(self): c=JunOS_Connection() c.vlan_Command(vlan,interface)
def test_dhcp(self): c=JunOS_Connection() c.dhcp(router,add_range)
def test_ntp(self): c=JunOS_Connection() c.ntp(boot,ntp)
def test_ftp(self): c=JunOS_Connection() c.ftp()
def test_telnet(self): c=JunOS_Connection() c.telnet()
def test_ssh(self): c=JunOS_Connection() c.ssh()
def test_hostcommit(self): c = JunOS_Connection() c.hostcommit( testHostname )
def test_user(self): c=JunOS_Connection() c.users(user, class_Name, pass1)
def test_Classes(self): c=JunOS_Connection() c.classes(name,action,detail)