History | View | Annotate | Download (12.3 kB)
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.
quotaholder: Unify accept and reject commission code
Incorporate accept/reject functions in resolve_pending_commissions,in order to enforce a total ordering on locking holdings.Add a wrapper (resolve_pending_commission) that operates on a singleserial.
Merge branch 'develop' into feature-quotas
Conflicts: snf-astakos-app/astakos/im/api/service.py snf-quotaholder-app/quotaholder_django/quotaholder_app/callpoint.py
Cleanup obsolete quota code
Prepare quotaholder calls for the new API
- {accept, reject}_commission take a single serial- resolve_pending_commissions takes a set of serials to accept and a set of serials to reject- commission exceptions record the provision on which they are raised...
Turn holding into a counter
The role of Holding is now only to keep track of usage againsta limit. There is no more exporting of resources and thus no needfor the stock counters.
Rename capacity to limit
New quota functions in astakos
Handle quotas as nested dictionaries indexed by:user uuid, source, resource name
wip Remove import_limit and export_limit from policy
If needed, they can be simulated by importing from special resources.
Default quotaholder input to empty list
Keyword arguments in quotaholder calls defaulted to empty pair,although they were actually expecting a list.
Redesign quota holding
A Holding now tracks the current usage (amount imported)and the amount available to export (stock).
Counters come in pairs (imported_min, imported_max andstock_min, stock_max respectively) to allow for a two-stepcommission.
For example, issuing a commission to import some quantity...
Merge Policy model into Holding
Since the removal of quantity, Policy was left with only one value:capacity. To simplify things, we directly include capacity in Holding.
This makes obsolete the following functions, which are removed:get_limits, set_limits, get_holding, set_holding.
Import resource from no source
Since quantity (initial supply) has been removed from Policy,there is no direct way to set the initial available resource,for example the total available VMs for holding cyclades.
This is now achieved by issuing (and accepting) a commission...
wip Merge quotaholder into astakos
quotaholder_django/quotaholder_app becomes astakos/quotaholderquotaholder_django/test becomes astakos/quotaholder/test
Delete obsolete code
wip Remove dependency from commissioning
Define exceptions locally
wip Remove Entity model
wip Rename entity into holder
Return a holding as a tuple rather than list
wip Remove CallSerial model and related calls