History | View | Annotate | Download (10 kB)
quotaholder: Rename counters to usage_min, usage_max
quotaholder: Explicitly set commission's issue_time
Avoid function call as a default value in model.
astakos: Set and return commission names in API calls
Support issue_commission's `name' parameter for an optional descriptionof the commission. Include this field in the dict returned byget_commission.
Change astakosclient accordingly.
quotaholder: Remove default values in required args
Also remove unused `context' argument and replace empty list defaultvalues with None.
quotaholder: Remove unused utils and api.py
quotaholder: Change provisions argument to list
It is the API code's task to transform the input dict to list.
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: Move helper function from qh to quotas.py
Respect user-specific quota when changing resource default
Do not update holding limit if there exist user-specific base quotafor the particular resource.
quotaholder: Do no side effect on failed commissions
Make sure that no Commission or Provision entry is created whenissue_commission fails, even if the transaction is committed.
quotaholder: Fix printing of holding key
astakos: Add user parameter in service_quotas API call
Using this parameter, the service can query the quotas of a specificuser.
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