astakos: Migrate service and resource names
- Rename 'pithos+' to 'pithos'- Prepend resource names with 'service_name.'
Merge branch 'feature-change-astakos-commands' into feature-quotas
Conflicts: snf-astakos-app/astakos/im/management/commands/resource-list.py snf-astakos-app/astakos/im/management/commands/service-list.py snf-astakos-app/astakos/im/management/commands/service-modify.py...
Merge branch 'develop' into feature-quotas
Conflicts: astakosclient/astakosclient/__init__.py astakosclient/astakosclient/errors.py astakosclient/astakosclient/tests.py docs/index.rst
astakos: Separate importing resources from setting limits
`snf-manage resource-import' does not provide a way to change thedefault base quota any more. When importing a resource for the firsttime, it sets the limit to zero.
Use `snf-manage resource-modify' to change limits. It supports both...
astakos: Update projects tests
astakos: Define and export local resources
astakos: Replace some explicit settings imports
importing setting names explicitly makes it hard to write tests thatdepend on specific setting values and polutes the module namespace.
In this commit only settings that are currently used in tests whererefactored.
astakos: Initial tests for project views
astakos: Rename get_service_quotas to service_get_quotas
So that it follows the naming scheme of other astakosclient calls.
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 therelated counter if possible, and accept the commission on success....
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: Reintroduce foreign key from Resource to Service
Also merge all migrations from 0026 to 0032.
astakos: Move helper function from qh to quotas.py
astakos: Use `with' to open file in management command
astakos: Sync users when importing base quotas from file
astakos: Standardize arguments of project calls
All calls take a request_user (of type AstakosUser) argument.
pep8 and style changes
astakos: Enroll in project even if request is pending
astakos: Move get_resources in resources.py
Rename users_quotas to astakos_users_quotas
astakos: Move quota syncing code in quotas.py
astakos: Decouple listing from syncing quotas code
Sync user after changing base quota
Respect user-specific quota when changing resource default
Do not update holding limit if there exist user-specific base quotafor the particular resource.
astakos: remove js debug statement
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...
Service catalog fix
also include services for which no existing presentation data exist.Admin can use ASTAKOS_SERVICE_META setting to customize the servicepresentation metadata.
Store service access url in database
Astakos: ui minor fixes
Refs: #3573Correct onclick functionality in project create page.Discover missing div tag in project details page.
Update astakos usage view
Update view to use the introduced astakos quotas api.
astakos: Add user parameter in service_quotas API call
Using this parameter, the service can query the quotas of a specificuser.
Move transaction.py to snf_django package
Move intdecimalfield.py to snf_django package
Rename it to fields.py and update all migrations that reference the field.
Move managers.py to snf_django package
astakos: Remove obsolete ProjectResourceGrant fields
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
Move astakos webproject hooks
move astakos.im.synnefo_settings to astakos.synnefo_settings and makethe appropriate changes in setup.py
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
Minor changes in astakos commands
Update astakos user-modify command
Permit also to lookup user using the UUID
Update astakos listing commands
Refs: #3346
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
Do not register resources in quotaholder
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'.
Change astakos listing commands
Listing commands extend`synnefo.webproject.management.commands.ListCommand`
Delete service-token-renew command
This command is equivalent to`service-modiy --renew-token`
Change service-modify command option names
Change `--renew-auth-token` option to`--renew-token` and `--auth-token` to`--token` to conform the respective optionsof user-modify command
Change astakos show commands
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.
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 Update astakos.im to simplified quotaholder policy
wip New, simplified syncing to quotaholder
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...
Register quotaholder in synnefo settings
Execute astakos-init and user-update in a transaction
Rename astakos modification commands
Rename to conform with the rest synnefomodification commands
Remove PROJECT_DEACTIVATED state from ProjectMembership
astakos api: remove statements of no effect