astakos: Handle source correctly in initial_quotas
astakos: Remove obsolete fields of AstakosUserQuota
Remove quantity, import_limit, export_limit.Update user-set-initial-quota management command.
astakos: Remove obsolete project-related model fields
Several fields of models Project and ProjectMembership were relatedto the external syncing to quotaholder and have become obsolete sincethe inclusion of quotaholder in astakos.
Move resource data away from astakos settings
UI-related presentation data go to presentation.py.Remove load_service_resources call and related astakos-initmanagement command.
Make resource name independent of service name
Also remove unused ResourceMetadata model.
Import resources from definition and config files
Register a service's resources giving option --json <file>.The json file is expected to represent a dictionary with keys"service" and "resources".
Currently the default base quota (uplimit) for each resource is read...
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...
Cleanup CLRF's
Remove resource/service model dependencies
- Remove foreign key dependency between Service/Resource model. Replace it with a service CharField to keep track of the service identifier that the resource was registered from.- Remove all references to resource service name in resource lookups
Use updated resource models in projects views
Update resource-list management command
Modify resource limit from the command line
Services api/presentation logic cleanup
- Remove presentation information from Service model (order, icon)- To access the list of services filled with both presentation and api data use Service.catalog(). The method fills a dict with service identifiers and service metadata through the following steps...
Astakos missing Service model migrations
New call astakos/api/service_quotas
Returns quotas for all resources associated with the service that makesthe call.
astakos: update service-add and service-list
astakos: fix default empty dict setting
Make astakos-quota robust on missing base quotas
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.
Remove quotaholder views and urls files
No more needed, since quotaholder is integrated in astakos.
Move astakos webproject hooks
move astakos.im.synnefo_settings to astakos.synnefo_settings and makethe appropriate changes in setup.py
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
Merge branch 'feature-snf-django' into develop
Conflicts: docs/older/Changelog.pithos-app snf-astakos-app/astakos/im/api/__init__.py snf-pithos-app/pithos/api/util.py
Merge branch 'release-0.13' into develop
Conflicts: snf-astakos-app/astakos/im/messages.py
Force query to list before passing as argument
An unevaluated query ends up being used as an argument of intended listtype to another query, which fails in the case of an EmptyQuerySet, whichis not iterable.
Astakos dashboard url change
landing instead of user profile
Fix url typo
Make pending project options more descriptive
Fix description for resource `ram' in settings
Remove client_key parameter from quotas API
It is not necessary, since the service token in used for authorization.The api_method decorator is modified so that it passes to the methodthe service data through the request object.
API call for resources
API calls for quotas and commissions
Do not register resources in quotaholder
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...
Merge branch 'release-0.13' of https://code.grnet.gr/git/synnefo into release-0.13
Correct company url in Astakos footer template
Revert unknown account message
Move common test code to snf_django.lib.testing
Use common 'api_method' decorator to astakos api
Update all astakos API methods to use the new common 'api_method'decorator. The 'api_method' decorator 'user_required' optionauthenticates uses by their token through astakos. Consequently,astakos methods can not use this option. Instead, two custom...
Add fault.xml template to pithos and astakos
Move cloud faults to 'snf_django.lib.api.faults'
Gather all faults from all synnefo projects into common'snf_django.lib.api.faults'.
Adjust astakos to new holding design
Simplifications due to removal of quantity and merging capacity into holding.Also make sure that holders and resources are represented as strings inquotaholder calls.
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
Compute and show quotas by source
Adjust astakos code to the new nested dict structure of quotas.
Move quota-related code out of models.py
Intention is to collect all quota-related code to a single file.
Pass user.id in project join/leave operations
This is done for reasons of uniformity.
Sync to quotaholder by recomputing user quotas
On a user joining/leaving a project or on a project definition change,we used to compute quota diffs for affected users and add them upto existing values in quotaholder.
We now switch to recomputing all quotas for affected users and resetting...
Remove unused code
wip Update astakos.im to use local quotaholder
Import directly quotaholder.callpoint in endpoint/qh.pyinstead of an HTTP client.Remove code related to entities, such as registering users and services.Remove sync_projects logic.
wip Remove check whether membership is pending sync
It is not needed any more, syncing to quotaholder will happenin a single transaction along with the call initiating the change.
wip Remove check is_active on projects and memberships
Remove second phase of (de)activation, not needed any more,since syncing to quotaholder will happen in the same transactionas the call initiating the syncing.
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.
wip Update astakos.im to simplified quotaholder policy
wip New, simplified syncing to quotaholder
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 Restructure astakos views
Replace custom transaction context with:
- decorator `commit_on_success_strict', which uses transaction.commit_manually and ensures that the transaction rolls back on any exception
- context ExceptionHandler, which logs and...
wip Merge quotaholder into astakos
quotaholder_django/quotaholder_app becomes astakos/quotaholderquotaholder_django/test becomes astakos/quotaholder/test
Delete obsolete testing files
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
Register quotaholder in synnefo settings
wip Remove CallSerial model and related calls
Update quotaholder unit tests
Update stress test to use the new transaction decorator
Execute astakos-init and user-update in a transaction
Remove PROJECT_DEACTIVATED state from ProjectMembership
astakos api: remove statements of no effect
Fix invite view
Invite view and function had the same name.
Conflicts: snf-astakos-app/astakos/im/messages.py snf-astakos-app/astakos/im/views.py version
Update astakos tests
handle new email recipients
Merge branch 'tmp-common-email-recipients' into develop
Sync astakos migrations
apply authpolicies migrations on top of recently added astakos migrations indevelop branch.
change default project application limit to 0
By default projects are not visible in the UI,therefore it makes sense to adjust the defaultpending application limit to 0, too.
Reasonable project application cancel url
direct user to the project's index view
Additional confirm widgets for join/leave actions
Also deny GET requests for those actions
Deny GET requests for project actions requests
Add a reason parameter in project deny requests
if not set, None is passed
Astakos project details user actions improvenets
- Split actions partial in a separate template.- Convert simple A html links to confirm forms and do action requests using POST.- Use a common tempalte tag ``confirm_link`` to prompt user an additional step of action confirmation....
Let admin see project status just like its owner
Admin is interested in projects `Pending for review'. They appearedas `Unknown' in the project list before. With the current change,the status of an admin being a member of a project is hidden,since we don't present combined project/membership states.
Astakos email notification improvements
- Use project setting SERVER_EMAIL as sender to all email notifications.- Remove astakos specific DEFAULT_CONTAC_EMAIL in favor of snf-common's CONTACT_EMAIL setting.- Remove DEFAULT_CONTACT_EMAIL and ADMINS astakos specific settings in favor of...
Delegate cyclades ui feedback calls to astakos
Mimic pithos app/ui feedback handling to avoid duplicating boilerplatecode.
New settings:CYCLADES_USER_FEEDBACK_URL
Deprecated (removed) settings:FEEDBACK_CONTACTSFEEDBACK_EMAIL_FROM
Fix user-set-initial-quota command
Do not display unnecessary message:"Please use either `--from-file' or `--set-capacity' options" while importing quotas from file.
Fix send mail error handling
Fix verbose_name for network.private resource
Preserve owner info when modifying project
An admin can modify a project, i.e. create an application based ona previous application. We distinguish the initial applicant, calledthe `owner', from the user who submitted the current application,called the `applicant'....
Impose pending application limit on owner
We used to check the limit on applicant; however we would like toto control pending applications per the original applicant, i.e theowner. The check is ignored when the applicant is a project admin.
Log project actions
Optionally display projects in astakos menu
New ASTAKOS_PROJECTS_VISIBLE setting (defaults to False) added tocontrol whether the projects menu should be visible in astakos userviews.
Merge branch 'release-0.13' into feature-astakos-authpolicies