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.
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
Merge branch 'release-0.13' into develop
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
Specify reason when denying project application
Add field `response' in ProjectApplication model.Add option `-m' in project-control command.
Refs #3493
Change helper function to allow multiple arguments
Move managers.py in synnefo.lib.db
This makes it easier to maintain, since it is used in multiple applications(astakos.im and quotaholder_app).
Change output of astakos-quota --sync
Inform specifically which users, if any, have been synced, instead oflisting the whole diff. The latter can be recovered by giving theoption --verify.
Sync only quotas that differ
Refs #3479
Database stack limit issue was triggered by syncing quotas forall users. It is much faster to compare quotas locally and sendfor sync to quotaholder only those that differ.
Authentication providers improvements
Major authentication provider refactoring to support
- Modular and easily configurable messages with common context- Fine grained provider policies to support appling specific policies to users and/or groups
Key points:...
Handle activation of unmoderated users
do not allow users that have not been moderated to activate themselvesusing activation url
Astakos logging improvements
use the common user_log display method accross logging calls
Auth providers fix
properly iterate through overridden provider module policies
properly remove groups in add_groups_policy
Auth providers improvements
- Improved logging- Messages changes- Fixes in local module login/add policies handling
Auth providers tests additions/updates
Avoid logout of unauthenticated users
Fix shibboleth logging
Fix+move HTTP quotaholder client in synnefo.lib
Allow per-service configuration of the (http) quotaholder client.Kamaki is no longer needed in service (or ganeti) nodes,because the client has been moved to snf-common.
Also fix the default quotaholder settings for pithos backend to be disabled...
Inform user we are working in the background
Print a message about astakos-quota calculating all user quotas,which on a big system takes some time.
Astakos activation fix
Additional check to avoid verified inactive users reactivation
Classic login form fix
hide prompt for additional login methods if no such methods exist
Astakos logging fixes
Removed with_logging wrapper which inconsistently extracted user/requestarguments. Logging statements placed explicitly within login/logoutmethods.
Fix admin notification logging
Include auth providers basic logging support
Add logging statements on some important auth providers operations.
Complete auth providers logging support will be merged from thefeature-astakos-authpolicies branch which also includes additional authproviders improvements.
astakos-quota: allow syncing with --user
Add 'default' capacity to user-set-initial-quota
pep8 fixes
List quotas for a specified user
Refs #3389
Fix calculation of initial quotas
Also add all_quotas method in AstakosUser
Refs #3388
Merge branch 'tmp-quota-opt2' into release-0.13
Improve performance of quota operations
Rename option --force to --no-confirm for clarity
Astakos feedback form fixes
- Include uuid in email- Response redirect after on successful form submission
Revert astakos authenticated api
Include groups, auth_token information in authenticated api response.These attributes are required by cyclades helpdesk app.
Set initial user quota from the command line
Refs #3373
Add option --set-capacity in user-set-initial-quota that setsinitial quota for a specified user/resource pair.
Importing from a file requires option --from-file.
Add display options in user-list
Refs #3374
Add options --uuid, --displayname, --active, and --filter-by.filter_results() is copied locally to avoid importing from cyclades.
Improve performance of user-list
Prefetch auth providers for all users and store themin a per-user dictionary.
Classic signup form fix
Expand form content by default when classic module is the only one set.
Fix astakos stale session messages
Consume session messages in get_services api response. When get_services isloaded from an astakos page, messages should have already been consumedin the html response. When get_services is loaded from anotherdomain/service we consume them in get_services view so that no stale...
New setting to redirect after successful login
redirect to ASTAKOS_LOGIN_SUCCESS_URL after successful login when nonext parameter is set. Defaults to /im/landing
Reverse view typo
astakos.im.views.home does not exist
fix and better document quota export/import
Optimize computation of astakos user quotas
Speed up project-list
Verbal updates wrt help texts of astakos forms
Fix some messages
Add per-user limit on pending applications
Add UserSettings model for storing integer-valued settings.If an entry is missing, a default synnefo setting is consulted.
The limit can be set/unset with snf-manage user-update.
Prevent changes of readonly user profile fields
some user profile properties require special actions to be performed bythe user in order to be altered. Additional workflows are provided forthese properties to be changed (e.g. email verification urls/views for...
Bypass call to quotaholder on an empty input
Remove astakos logger from astakos settings
Loggers for all synnefo components should be configured insnf-webproject setting file '10-snf-webproject-logging.conf'.
Fix reference of management command in template