def actionTestSSHAuth(self, widget, data= None): """ persy environment test action. uses PersySSH to check the server authentification """ persyssh = PersySSH(self.config, self.log) if persyssh.checkSSHAuth(): pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.config.getAttribute('ICON_OK'), 24, 24) thewidget = self.wTree.get_widget('imageServerConnection') thewidget.set_tooltip_text(_('all ok')) else: pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.config.getAttribute('ICON_ERROR'), 24, 24) thewidget = self.wTree.get_widget('imageServerConnection') thewidget.set_tooltip_text(_('the connection to the server was not possible. please check your settings above and if you have published your ssh public key to the server. if not, you can run the "publish" action')) textGeneralName = self.wTree.get_widget('imageServerConnection') textGeneralName.set_from_pixbuf(pixbuf)
def actionTestLocalSSHKey(self, widget, data= None): """ persy environment test action. uses PersySSH to check if local ssh keys do exist """ persyssh = PersySSH(self.config, self.log) if persyssh.localSSHKeysExist(): pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.config.getAttribute('ICON_OK'), 24, 24) thewidget = self.wTree.get_widget('imageLocalSSHKey') thewidget.set_tooltip_text(_('all ok')) else: pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.config.getAttribute('ICON_ERROR'), 24, 24) thewidget = self.wTree.get_widget('imageLocalSSHKey') thewidget.set_tooltip_text(_('no local ssh keys are present. these are important for a serverconnection. you may want to run the "create" action to create these')) textGeneralName = self.wTree.get_widget('imageLocalSSHKey') textGeneralName.set_from_pixbuf(pixbuf)
def actionTestRemoteServer(self, widget, data= None): """ persy environment test action. uses PersySSH to check the remote Server """ persyssh = PersySSH(self.config, self.log) if persyssh.checkRemoteServer(): pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.config.getAttribute('ICON_OK'), 24, 24) thewidget = self.wTree.get_widget('imageRemoteRepository') thewidget.set_tooltip_text(_('all ok')) else: pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.config.getAttribute('ICON_ERROR'), 24, 24) thewidget = self.wTree.get_widget('imageRemoteRepository') thewidget.set_tooltip_text(_('the remote repository is not ok. maybe the path on the server is incorrect or it is not initialized. run the "initialize" action to do so')) textGeneralName = self.wTree.get_widget('imageRemoteRepository') textGeneralName.set_from_pixbuf(pixbuf)