def Save(self): ttl=int(timeToFloat(self.TTL)) rds=None for value in self.Value.splitlines(): value=value.strip() if not value: continue if self.dataclass == list: value=removeSmartQuote(value) data=shlexSplit(value, ' ') else: data=self.dataclass(value) if not rds: rds=Rdataset(ttl, rdataclass.IN, self.rdtype, data) else: rds.add(Rdata(rds, data), ttl) return self._save(rds)
def Save(self): ttl = int(timeToFloat(self.TTL)) rds = None for value in self.Value.splitlines(): value = value.strip() if not value: continue if self.dataclass == list: value = removeSmartQuote(value) data = shlexSplit(value, ' ') else: data = self.dataclass(value) if not rds: rds = Rdataset(ttl, rdataclass.IN, self.rdtype, data) else: rds.add(Rdata(rds, data), ttl) return self._save(rds)
def Save(self): self.grid.SaveEditControlValue() ttl=int(timeToFloat(self.TTL)) rds=None for row in range(self.grid.GetNumberRows()-1): vals=[] for col in range(self.grid.GetNumberCols()): val=self.grid.GetCellValue(row, col).strip() coltype=type(self.slotvals[col]) if coltype == Name: vals.append(DnsName(val)) elif coltype == list: vals.append(val.split(' ')) else: vals.append(coltype(val)) if not rds: rds=Rdataset(ttl, rdataclass.IN, self.rdtype, *tuple(vals)) else: rds.add(Rdata(rds, *tuple(vals)), ttl) return self._save(rds)
def Save(self): self.grid.SaveEditControlValue() ttl = int(timeToFloat(self.TTL)) rds = None for row in range(self.grid.GetNumberRows() - 1): vals = [] for col in range(self.grid.GetNumberCols()): val = self.grid.GetCellValue(row, col).strip() coltype = type(self.slotvals[col]) if coltype == Name: vals.append(DnsName(val)) elif coltype == list: vals.append(val.split(' ')) else: vals.append(coltype(val)) if not rds: rds = Rdataset(ttl, rdataclass.IN, self.rdtype, *tuple(vals)) else: rds.add(Rdata(rds, *tuple(vals)), ttl) return self._save(rds)