- Timestamp:
- 07/11/05 23:12:27 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/ldapstorage.py
r2302 r2358 1206 1206 1207 1207 def deletePrinter(self, printer) : 1208 """Completely deletes a n user from the Quota Storage."""1208 """Completely deletes a printer from the Quota Storage.""" 1209 1209 result = self.doSearch("(&(objectClass=pykotaLastJob)(pykotaPrinterName=%s))" % printer.Name, base=self.info["lastjobbase"]) 1210 1210 for (ident, fields) in result : … … 1239 1239 self.doDelete(printer.ident) 1240 1240 1241 def deleteBillingCode(self, code) : 1242 """Deletes a billing code from the Quota Storage (no entries are deleted from the history)""" 1243 self.doDelete(code.ident) 1244 1241 1245 def extractPrinters(self, extractonly={}) : 1242 1246 """Extracts all printer records.""" … … 1257 1261 for entry in entries : 1258 1262 result.append((entry.ident, entry.Name, entry.AccountBalance, entry.LifeTimePaid, entry.LimitBy, entry.Email)) 1263 return result 1264 1265 def extractBillingcodes(self, extractonly={}) : 1266 """Extracts all billing codes records.""" 1267 billingcode = extractonly.get("billingcode") 1268 entries = [b for b in [self.getBillingCode(label) for label in self.getAllBillingCodes(billingcode)] if b.Exists] 1269 if entries : 1270 result = [ ("dn", "billingcode", "balance", "pagecounter", "description") ] 1271 for entry in entries : 1272 result.append((entry.ident, entry.BillingCode, entry.Balance, entry.PageCounter, entry.Description)) 1259 1273 return result 1260 1274 … … 1350 1364 for entry in entries : 1351 1365 result.append((entry.UserName, entry.PrinterName, entry.ident, entry.JobId, entry.PrinterPageCounter, entry.JobSize, entry.JobAction, entry.JobDate, entry.JobFileName, entry.JobTitle, entry.JobCopies, entry.JobOptions, entry.JobPrice, entry.JobHostName, entry.JobSizeBytes, entry.JobMD5Sum, entry.JobPages, entry.JobBillingCode)) 1352 return result 1366 return result 1367 1368 1369 # def getBillingCodeFromBackend(self, label) : 1370 # def getMatchingBillingCodes(self, billingcodepattern) : 1371 # def addBillingCode(self, label) : 1372 # def writeBillingCodeDescription(self, code) : 1373 # def setBillingCodeValues(self, code, newbalance, newpagecounter) : 1374 # def consumeBillingCode(self, code, balance, pagecounter) : 1375