quotaholder: Do not check provision integrity
The API is responsible to provide valid data to the backend.
quotaholder: Merge similar provisions
Make sure that issue_commission handles a single provision per (holder,source, resource) tuple by merging similar provisions.
astakos: Improve printing in quota-verify
Also add option to delete project and user holdings that do not correspondto actual astakos entities.
quotaholder: Migrate holdings for pool projects
Recreate quota holdings for all initialized projects and memberships.
quotaholder: Delete holdings of non-accepted users
Delete all holdings with a holder that does not correspond to an accepteduser uuid. This is expected to affect only holdings with zero usage, becausean astakos migration has previously accepted users with non-zero usage for...
quotaholder: Revert holding deletion
Revert deletion of holdings for non accepted users, introduced in cfc934f.
Users would previously acquire quotas on email verification; this is nowdone on user acceptance. We delete holdings for non-moderated and forrejected users.
quotaholder: Reuse holding IDs in set_quota
For efficiency reasons, commit 20c6de3 deletes and recreates holdingsinstead of updating them one by one. In order not to exhaust the IDs, wereuse the deleted ones.
astakos: Enhance quota listing
Enable filtering quota by resource, over limit status, usage andlimit values.
astakos: Speed up setting quota for one resource
When registering a new resource or updating base quota for a singleresource, compute and set holdings just for this resource.
quotaholder: Speed up set_quota with bulk_create
Instead of updating every single holding, delete all after loading them,then reinsert them updated with bulk_create.
astakos: Recompute quota when updating a resource
Avoid stateful update of holdings when a resource limit changes; ratherrecompute and set all affected users' quota.
astakos: Replace decimal field with bigint
Any values that happen to be greater than the new max (2**63-1)are reduced to this value.
astakos: Remove custom ForUpdateManager
Remove custom manager that implemented select_for_update(), since thisis already implemented in Django 1.4.
Fix stale import statements
Commit 7cfc0ce moved code from webproject to snf_django. This commitfixes some stale imports that skipped renaming.
snf-django: Move ListCommand to snf-django
snf-webproject contained the generic ListCommand, and because of this ithad a dependency from snf-django-lib. This commit moves this command fromsnf-webproject to snf-django-lib and removes this dependency. Also,...
quotaholder: Revert migration of log timestamps
Because migrating the timestamp fields of model ProvisionLog from stringto datetime takes too long, we keep them in string format.
Alter migrations 0005 through 0007 introduced in commit 164e64d.
quotaholder: Add management commands for commissions
Add commands `commission-list' and `commission-show' to displaypending commissions. The former supports option `--overdue' torestrict the age of pending commissions.
Refs #3557
quotaholder: Store timestamps using DateTimeField
Add new fields issue_datetime in Commission and issue_datetime,log_datetime in ProvisionLog. Migrate away from custom string-basedissue_time and log_time fields.
quotaholder: pep8 fixes
quotaholder: Lock holdings in a single query
Order by primary key when selecting multiple holdings for update;this most probably ensures that locking will happen in that order.
As per commit 2f90645, we select all holdings for the given holders,rather that specifying all tuples (holder, source, resource), in order...
astakos: Remove some unused imports
Also add a missing import in quotas.py
quotaholder: Ignore force option when releasing
Since negative usage makes no sense, we always check this lowerboundary when issuing a commission.
astakos: Adapt tests to 2.6-style unittest
Define assertGreater, assertIn, assertRaises in snf_django.utils.testing
quotaholder: Unify included data in overLimit errors
Replace `available' with `usage' and `limit' in NoQuantityErrorto make it similar to NoCapacityError.
quotaholder: Allow resolving empty commissions
When resolving a pending commission, handle the case where the commissionhas been issued with no provisions.
quotaholder: Add migrations
Migration 0001 should be faked on an existing database.Migration 0002 adds new fields.Migration 0003 populates the new fields based on the old ones.Migration 0004 deletes unneeded fields and tables.
Revert quotaholder's name to quotaholder_app
In order to facilitate migrations.