History | View | Annotate | Download (10 kB)
astakos: Remove some unused imports
Also add a missing import in quotas.py
astakos: Lock chain for projects, user for syncing
Lock project's chain for every operation affecting either a project oran application. Subsequently, lock user when needing to sync or to issuecommission to update pending_app quota.
In views, replace locking qh_add_pending_app with check_pending_app_quota,...
astakos: Let qh errors through when issuing commission
When registering pending apps, catch only NoCapacityError. No otherQuotaholderError is expected and should not be treated here.
astakos: Force query eval when used in __in filter
Related to commit aee9a38
Also fix call of qh_sync_users in migration script.
astakos: Improve quota syncing
- Split code that lists and syncs quotas - Merge the latter with qh_sync_users - Move qh_sync_projects in quotas.py; sync only active members - Add missing select for update in project suspend - Clean up quotas.py
astakos: Return empty dict when no user quotas found
astakos: Remove command user-set-initial-quota
To change base quota for a specified user: snf-manage user-modify user --set-base-quota resource limit
To import base quota in batch from a file: snf-manage astakos-quota --import-base-quota filename
Rename `initial' to `base quota' in command output....
astakos: accept commission immediately after issue
Unify these operations when registering a pending application,in order to make sure no commission can be left pending.
Revert quotaholder's name to quotaholder_app
In order to facilitate migrations.
quotaholder: Rename counters to usage_min, usage_max
quotaholder: Impose non-null commission name
Default to empty string
astakos: Rename get_service_quotas to service_get_quotas
So that it follows the naming scheme of other astakosclient calls.
Handle max pending applications as a quotable resource
Assume a resource `astakos.pending_app' related to service `astakos'.On submitting an application, issue a commission that will update therelated counter if possible, and accept the commission on success....
Turn callpoint into a module of functions
Class structure is no more needed; there is no need for initialization,since the code is used internally.
astakos: Reintroduce foreign key from Resource to Service
Also merge all migrations from 0026 to 0032.
astakos: Move helper function from qh to quotas.py
astakos: Move get_resources in resources.py
Rename users_quotas to astakos_users_quotas
astakos: Move quota syncing code in quotas.py
astakos: Decouple listing from syncing quotas code
Respect user-specific quota when changing resource default
Do not update holding limit if there exist user-specific base quotafor the particular resource.
astakos: Change response for API call `quotas'
The following indicators are returned for each holding:"limit": the quota limit (as before)"usage": the current usage (pessimistically, includes any pending allocations)"pending": the difference of max and min allocation, indicates...
astakos: Add user parameter in service_quotas API call
Using this parameter, the service can query the quotas of a specificuser.
astakos: Handle source correctly in initial_quotas
Sync quotas efficiently when importing resources
When changing the default base quota (uplimit) for a preexisting resource,do a bulk update of the related holdings.When importing a new resource, create the new related holdings.
Prompt the admin for the uplimit in the management command, if a config...
New call astakos/api/service_quotas
Returns quotas for all resources associated with the service that makesthe call.
API call for resources
New quota functions in astakos
Handle quotas as nested dictionaries indexed by:user uuid, source, resource name
Move quota-related code out of models.py
Intention is to collect all quota-related code to a single file.