Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / quotas.py @ d9f634a2

History | View | Annotate | Download (10.2 kB)

# Date Author Comment
0e08e08e 06/04/2013 06:19 pm Giorgos Korfiatis

astakos: Record the service originating a resource

Add field service_origin in model Resource as well as in the
resource definitions, indicating the service where the resource
comes from. It is not a foreign key, in order to allow deleting
a component/service, without affecting registered resources and...

bea584e1 06/03/2013 12:00 pm Giorgos Korfiatis

astakos: Lift old-style services to components

Add model Component and migrate services along with their token
and UI URL to this new model. Rename service to component where
needed.

Add field service_type in Resource and fill it based on the name
of the service that used to own the resource.

2e7924de 05/20/2013 03:14 pm Giorgos Korfiatis

astakos: Remove some unused imports

Also add a missing import in quotas.py

3c22bad0 05/20/2013 03:14 pm Giorgos Korfiatis

astakos: Lock chain for projects, user for syncing

Lock project's chain for every operation affecting either a project or
an application. Subsequently, lock user when needing to sync or to issue
commission to update pending_app quota.

In views, replace locking qh_add_pending_app with check_pending_app_quota,...

369628b8 05/16/2013 06:41 pm Giorgos Korfiatis

astakos: Let qh errors through when issuing commission

When registering pending apps, catch only NoCapacityError. No other
QuotaholderError is expected and should not be treated here.

103086a4 05/16/2013 06:41 pm Giorgos Korfiatis

astakos: Force query eval when used in __in filter

Related to commit aee9a38

Also fix call of qh_sync_users in migration script.

e336910f 05/15/2013 06:49 pm Giorgos Korfiatis

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
1e361a6d 05/14/2013 05:14 pm Giorgos Korfiatis

astakos: Return empty dict when no user quotas found

764d99c4 05/14/2013 10:41 am Giorgos Korfiatis

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....

9e3af524 04/29/2013 05:11 pm Giorgos Korfiatis

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.

ec5e00aa 04/29/2013 12:13 pm Giorgos Korfiatis

Revert quotaholder's name to quotaholder_app

In order to facilitate migrations.

68b991bc 04/29/2013 12:12 pm Giorgos Korfiatis

quotaholder: Rename counters to usage_min, usage_max

f6e7a826 04/29/2013 11:14 am Giorgos Korfiatis

quotaholder: Impose non-null commission name

Default to empty string

271d2c4c 04/23/2013 03:40 pm Giorgos Korfiatis

astakos: Rename get_service_quotas to service_get_quotas

So that it follows the naming scheme of other astakosclient calls.

9770ba6c 04/23/2013 02:50 pm Giorgos Korfiatis

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 the
related counter if possible, and accept the commission on success....

948e15bc 04/22/2013 06:47 pm Giorgos Korfiatis

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.

a0b34382 04/22/2013 06:33 pm Giorgos Korfiatis

astakos: Reintroduce foreign key from Resource to Service

Also merge all migrations from 0026 to 0032.

9b126f13 04/22/2013 05:50 pm Giorgos Korfiatis

astakos: Move helper function from qh to quotas.py

08043775 04/22/2013 04:14 pm Giorgos Korfiatis

astakos: Move get_resources in resources.py

cb14cc6c 04/22/2013 04:07 pm Giorgos Korfiatis

Rename users_quotas to astakos_users_quotas

44104cd3 04/22/2013 04:02 pm Giorgos Korfiatis

astakos: Move quota syncing code in quotas.py

3adbd562 04/22/2013 03:51 pm Giorgos Korfiatis

astakos: Decouple listing from syncing quotas code

ae16bcad 04/22/2013 02:18 pm Giorgos Korfiatis

Respect user-specific quota when changing resource default

Do not update holding limit if there exist user-specific base quota
for the particular resource.

480974e6 04/19/2013 06:32 pm Giorgos Korfiatis

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...

5afce44d 04/19/2013 01:28 pm Giorgos Korfiatis

astakos: Add user parameter in service_quotas API call

Using this parameter, the service can query the quotas of a specific
user.

003909e3 04/18/2013 06:45 pm Giorgos Korfiatis

astakos: Handle source correctly in initial_quotas

9747707e 04/18/2013 12:20 pm Giorgos Korfiatis

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...

bb005bc2 04/18/2013 12:20 pm Giorgos Korfiatis

New call astakos/api/service_quotas

Returns quotas for all resources associated with the service that makes
the call.

1028e568 04/08/2013 01:43 pm Giorgos Korfiatis

API call for resources

dc9da5b9 04/05/2013 06:49 pm Giorgos Korfiatis

New quota functions in astakos

Handle quotas as nested dictionaries indexed by:
user uuid, source, resource name

aa27f246 04/05/2013 06:49 pm Giorgos Korfiatis

Move quota-related code out of models.py

Intention is to collect all quota-related code to a single file.