def removeData(self, answer ): if answer is not None and answer: ixpowerUt.removePC(self.retValue) ixpowerUt.writePCsConfig() ixpowerUt.getRemotePCPoints() self.showPCsList() self.session.open(MessageBox, _("PC has been removed..."), type = MessageBox.TYPE_INFO, timeout = 2)
def applyConfig(self, ret=False): # new record if (ret == True): data = { 'name': False, 'ip': False, 'mac': False, 'system': False, 'username': False, 'password': False, 'bqdn': False } data['name'] = cfg.name.value data['ip'] = cfg.ip.getText() data['mac'] = cfg.mac.value data['system'] = cfg.system.value data['user'] = cfg.user.value data['passwd'] = cfg.passwd.value data['bqdn'] = cfg.bqdn.value self.session.openWithCallback(self.applyFinished, MessageBox, _("Your new PC has been added."), type=MessageBox.TYPE_INFO, timeout=2) ixpowerUt.remotepc[cfg.name.value] = data ixpowerUt.writePCsConfig() ixpowerUt.configActualized = True else: self.close()
def updateConfig(self, ret=False): # update record if (ret == True): ixpowerUt.setRemotePCAttribute(cfg.name.value, "name", cfg.name.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "ip", cfg.ip.getText()) ixpowerUt.setRemotePCAttribute(cfg.name.value, "mac", cfg.mac.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "system", cfg.system.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "user", cfg.user.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "passwd", cfg.passwd.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "bqdn", cfg.bqdn.value) self.session.openWithCallback(self.updateFinished, MessageBox, _("Your PC has been updated..."), type=MessageBox.TYPE_INFO, timeout=2) ixpowerUt.writePCsConfig() cfg.close.save() ixpowerUt.configActualized = True else: self.close()
def removeData(self, answer): if answer is not None and answer: ixpowerUt.removePC(self.retValue) ixpowerUt.writePCsConfig() ixpowerUt.getRemotePCPoints() self.showPCsList() self.session.open(MessageBox, _("PC has been removed..."), type=MessageBox.TYPE_INFO, timeout=2)
def updateConfig(self, ret = False): # update record if (ret == True): ixpowerUt.setRemotePCAttribute(cfg.name.value, "name", cfg.name.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "ip", cfg.ip.getText()) ixpowerUt.setRemotePCAttribute(cfg.name.value, "mac", cfg.mac.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "system", cfg.system.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "user", cfg.user.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "passwd", cfg.passwd.value) ixpowerUt.setRemotePCAttribute(cfg.name.value, "bqdn", cfg.bqdn.value) self.session.openWithCallback(self.updateFinished, MessageBox, _("Your PC has been updated..."), type = MessageBox.TYPE_INFO, timeout = 2) ixpowerUt.writePCsConfig() cfg.close.save() ixpowerUt.configActualized = True else: self.close()
def applyConfig(self, ret = False): # new record if (ret == True): data = { 'name': False, 'ip': False, 'mac': False, 'system': False, 'username': False, 'password': False, 'bqdn': False } data['name'] = cfg.name.value data['ip'] = cfg.ip.getText() data['mac'] = cfg.mac.value data['system'] = cfg.system.value data['user'] = cfg.user.value data['passwd'] = cfg.passwd.value data['bqdn'] = cfg.bqdn.value self.session.openWithCallback(self.applyFinished, MessageBox, _("Your new PC has been added."), type = MessageBox.TYPE_INFO, timeout = 2) ixpowerUt.remotepc[cfg.name.value] = data ixpowerUt.writePCsConfig() ixpowerUt.configActualized = True else: self.close()