- Timestamp:
- 12/26/04 15:50:51 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1993 r1995 24 24 - 1.21alpha15 : 25 25 26 - Normalized field names between LDAP and PostgreSQL backends 27 in dumpykota's output. 28 26 29 - dumpykota filtering capabilities are now supported within 27 30 the LDAP backend too. -
pykota/trunk/pykota/storages/ldapstorage.py
r1993 r1995 22 22 # 23 23 # $Log$ 24 # Revision 1.92 2004/12/26 14:50:51 jalet 25 # Normalized fields names in dumpykota's output so that an LDAP or PostgreSQL 26 # dump is parseable the same way. 27 # 24 28 # Revision 1.91 2004/12/21 16:46:25 jalet 25 29 # dumpykota's filtering capabilities are now supported within the LDAP … … 1419 1423 entries = [p for p in [self.getPrinter(name) for name in self.getAllPrintersNames(pname)] if p.Exists] 1420 1424 if entries : 1421 result = [ ("dn", "p ykotaPrinterName", "pykotaPricePerPage", "pykotaPricePerPage", "description") ]1425 result = [ ("dn", "printername", "priceperpage", "priceperjob", "description") ] 1422 1426 for entry in entries : 1423 1427 result.append((entry.ident, entry.Name, entry.PricePerPage, entry.PricePerJob, entry.Description)) … … 1429 1433 entries = [u for u in [self.getUser(name) for name in self.getAllUsersNames(uname)] if u.Exists] 1430 1434 if entries : 1431 result = [ ("dn", " pykotaUserName", self.info["usermail"], "pykotaBalance", "pykotaLifeTimePaid", "pykotaLimitBy") ]1435 result = [ ("dn", "username", "balance", "lifetimepaid", "limitby", "email") ] 1432 1436 for entry in entries : 1433 result.append((entry.ident, entry.Name, entry. Email, entry.AccountBalance, entry.LifeTimePaid, entry.LimitBy))1437 result.append((entry.ident, entry.Name, entry.AccountBalance, entry.LifeTimePaid, entry.LimitBy, entry.Email)) 1434 1438 return result 1435 1439 … … 1439 1443 entries = [g for g in [self.getGroup(name) for name in self.getAllGroupsNames(gname)] if g.Exists] 1440 1444 if entries : 1441 result = [ ("dn", " pykotaGroupName", "pykotaBalance", "pykotaLifeTimePaid", "pykotaLimitBy") ]1445 result = [ ("dn", "groupname", "limitby", "balance", "lifetimepaid") ] 1442 1446 for entry in entries : 1443 result.append((entry.ident, entry.Name, entry. AccountBalance, entry.LifeTimePaid, entry.LimitBy))1447 result.append((entry.ident, entry.Name, entry.LimitBy, entry.AccountBalance, entry.LifeTimePaid)) 1444 1448 return result 1445 1449 … … 1449 1453 entries = [u for u in [self.getUser(name) for name in self.getAllUsersNames(uname)] if u.Exists] 1450 1454 if entries : 1451 result = [ (" pykotaUserName", "date", "amount") ]1455 result = [ ("username", "amount", "date") ] 1452 1456 for entry in entries : 1453 1457 for (date, amount) in entry.Payments : 1454 result.append((entry.Name, date, amount))1458 result.append((entry.Name, amount, date)) 1455 1459 return result 1456 1460 … … 1460 1464 entries = [p for p in [self.getPrinter(name) for name in self.getAllPrintersNames(pname)] if p.Exists] 1461 1465 if entries : 1462 result = [ (" pykotaUserName", "pykotaPrinterName", "dn", "userdn", "printerdn", "pykotaLifePageCounter", "pykotaPageCounter", "pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit") ]1466 result = [ ("username", "printername", "dn", "userdn", "printerdn", "lifepagecounter", "pagecounter", "softlimit", "hardlimit", "datelimit") ] 1463 1467 uname = extraconly.get("username") 1464 1468 for entry in entries : … … 1473 1477 entries = [p for p in [self.getPrinter(name) for name in self.getAllPrintersNames(pname)] if p.Exists] 1474 1478 if entries : 1475 result = [ (" pykotaGroupName", "pykotaPrinterName", "dn", "groupdn", "printerdn", "pykotaLifePageCounter", "pykotaPageCounter", "pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit") ]1479 result = [ ("groupname", "printername", "dn", "groupdn", "printerdn", "lifepagecounter", "pagecounter", "softlimit", "hardlimit", "datelimit") ] 1476 1480 gname = extractonly.get("groupname") 1477 1481 for entry in entries : … … 1486 1490 entries = [g for g in [self.getGroup(name) for name in self.getAllGroupsNames(gname)] if g.Exists] 1487 1491 if entries : 1488 result = [ (" pykotaGroupName", "pykotaUserName", "groupdn", "userdn") ]1492 result = [ ("groupname", "username", "groupdn", "userdn") ] 1489 1493 uname = extractonly.get("username") 1490 1494 for entry in entries : … … 1499 1503 entries = [p for p in [self.getPrinter(name) for name in self.getAllPrintersNames(pname)] if p.Exists] 1500 1504 if entries : 1501 result = [ ("p ykotaPGroupName", "pykotaPrinterName", "pgroupdn", "printerdn") ]1505 result = [ ("pgroupname", "printername", "pgroupdn", "printerdn") ] 1502 1506 pgname = extractonly.get("pgroupname") 1503 1507 for entry in entries : … … 1521 1525 entries = self.retrieveHistory(user, printer, limit=None) 1522 1526 if entries : 1523 result = [ (" pykotaUserName", "pykotaPrinterName", "dn", "pykotaJobId", "pykotaPrinterPageCounter", "pykotaJobSize", "pykotaAction", "createTimeStamp", "pykotaFileName", "pykotaTitle", "pykotaCopies", "pykotaOptions", "pykotaJobPrice", "pykotaHostName", "pykotaJobSizeBytes") ]1527 result = [ ("username", "printername", "dn", "jobid", "pagecounter", "jobsize", "action", "jobdate", "filename", "title", "copies", "options", "jobprice", "hostname", "jobsizebytes") ] 1524 1528 for entry in entries : 1525 1529 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))