def check_agent_status(self): output = volttronFunc.agent_status(self.project_path) if output == '': tkMessageBox.showerror(title="Notification", message='Sorry, volttron is not running in your virtual environment.', parent=self.frame1) return else: self.VOL_text.configure(state='normal') self.VOL_text.delete('1.0', Tkinter.END) self.VOL_text.insert('1.0', output) self.VOL_text.configure(state='disabled')
def check_agent_status(self): if self.passwd is None: self.get_passwd() else: output = volttronFunc.agent_status(self.passwd) if output == '': tkMessageBox.showerror(title="Notification", message='Sorry, the password is incorrect, please try again.', parent=self.passwd_window) self.passwd = None return else: self.VOL_text.configure(state='normal') self.VOL_text.delete('1.0', Tkinter.END) self.VOL_text.insert('1.0', output) self.VOL_text.configure(state='disabled')
def check_agent_status(self): if self.passwd is None: self.get_passwd() else: output = volttronFunc.agent_status(self.passwd) if output == '': tkMessageBox.showerror( title="Notification", message= 'Sorry, the password is incorrect, please try again.', parent=self.passwd_window) self.passwd = None return else: self.VOL_text.configure(state='normal') self.VOL_text.delete('1.0', Tkinter.END) self.VOL_text.insert('1.0', output) self.VOL_text.configure(state='disabled')
def search_running_agent(self, target): output = volttronFunc.agent_status(self.passwd) try: output1 = output.split('\n') running_agent = list() dis_agent = list() target += 'agent' for item in output1: item_decom = item.split(' ') item_decom_short = [id for id in item_decom if id] if target in item: running_agent.append(item_decom_short) if 'devicediscoveryagent' in item: dis_agent = item_decom_short[0] return running_agent, dis_agent except Exception as er: print er
def search_running_agent(self, target): output = volttronFunc.agent_status(self.project_path) try: output1 = output.split('\n') running_agent = list() target += 'agent' platform_agent = None for item in output1: item_decom = item.split(' ') item_decom_short = [id for id in item_decom if id] if target in item: running_agent.append(item_decom_short) if 'platformmonitoragent' in item: platform_agent = item_decom_short[0] return running_agent, platform_agent except Exception as er: print er
def pwconfirm(self): self.passwd = self.pswd.get() if self.passwd is not None: output = volttronFunc.agent_status(self.passwd) try: if output == '': # pop up a window: remind the user to check his password. tkMessageBox.showerror(title="Notification", message='Sorry, the password is incorrect, please try again.', parent=self.passwd_window) self.passwd = None self.passwd_window.state('withdrawn') else: self.passwd_window.state('withdrawn') self.VOL_text.configure(state='normal') self.VOL_text.delete('1.0', Tkinter.END) self.VOL_text.insert('1.0', output) self.VOL_text.configure(state='disabled') self.passwd_window.withdraw() except Exception as er: print er print('Error @ pwconfirm.')
def pwconfirm(self): self.passwd = self.pswd.get() if self.passwd is not None: output = volttronFunc.agent_status(self.passwd) try: if output == '': # pop up a window: remind the user to check his password. tkMessageBox.showerror( title="Notification", message= 'Sorry, the password is incorrect, please try again.', parent=self.passwd_window) self.passwd = None self.passwd_window.state('withdrawn') else: self.passwd_window.state('withdrawn') self.VOL_text.configure(state='normal') self.VOL_text.delete('1.0', Tkinter.END) self.VOL_text.insert('1.0', output) self.VOL_text.configure(state='disabled') self.passwd_window.withdraw() except Exception as er: print er print('Error @ pwconfirm.')