astakos: WIP move all api calls under ``/astakos/api``
Refs: #3340
astakos: Change user_for_token decorator
user_for_token after successful user authenticationsets the request user attributeThe wrapped methods no more need the ``user`` argument:they can get the token holder by the request object
astakos: rename api utility methods
fix typo
astakos: Fix one test
Fix race condition in one of Astakos tests.
Add 'ASTAKOS_POOLSIZE' setting.
helpdesk: Fix helpdesk tests
astakos: Various fixes to tests
Do not user 'assertItemsEqual' method of unittest is only supported inpython 2.7.
Also, some arguments have been renamed.
astakos: Fix bug in getting membership
Search based on 'person__id' and not 'id'.
Improve mocked quotaholder
Mock 'resolve_commissions' call.
cyclades: Fix vmapi test
Use 'urljoin' to compute the 'config_url' parameter.
astakos: Remove deprecated Project methods
add_member, remove_member were not used.
astakos: Visually separate apps in project-show
astakos: Handle prompt for additional login methods
astakos: Exclude non existing services form Service.catalog
Always return services that exist in database. If a known service existsuse the predefined presentation data as base dict upon which we build upthe returned info by merging the data stored in service model and the...
cyclades ui: Remove deprecated setting
astakos: Proper string type check
using basestring also handles unicode objects
cyclades ui: Expose and use the new astakos quota api
- Removed /userdata/quota view in respect of astakos quotas api delegate views served in the same urls used by astakos api (/astakos/api/quotas, /astakos/api/resources). Base url is configurable using the...
astakos: Control project members by membership id
astakos: Add reason for all actions on applications
For cancel and dismiss, it is for now just a placeholder.
astakos: Cleanup some project methods
astakos: Make submit_application arguments explicit
Remove synnefo.lib.quotaholder
Use astakosclient to access the quotaholder instead.
astakos: Remove unneeded import of a constant
pithos, cyclades: Name reconciling commissions
Use commission name "RECONCILE" to distinguish such operationsin the quotaholder provision log.
pithos: Change reconcile-resources-pithos command
in order to conform with the respective Cycladescommand
astakos: Cleanup input of submit_application
Form passes only a tuple (name, limit) for each selected resource,omitting presentational data.
astakos: Handle pair of exceptions properly
astakos: Remove unused project_error_view
pithos: Define and export resources in json format
Provide management command resource-export-pithos.
pithos: Remove obsolete settings from database migrations
Use astakosclient to retrieve user information
pithos: Add name in reconciling commission
cyclades: Fix import of urlparse
Merge branch 'feature-quotas-pithos' into feature-quotas
Conflicts: snf-cyclades-app/synnefo/plankton/backend.py snf-pithos-app/README snf-pithos-app/pithos/api/util.py
Merge branch 'feature-quotas-pithos' of https://code.grnet.gr/git/synnefo into feature-quotas-pithos
pithos: Update merged code
pithos: Update pithos management commands
Refs: #3625
pithos: manage_accounts support for both sqlalchemy and sqlite
pithos: Rename backend quotaholder properties
Refer to astakosclient instead of quotaholder
WIP astakosclient for quotas in pithos
pithos: Utilize astakosclient for quota handling
Refs: #3625, #3650
pithos:Ensure serial registration before commission
Commit transaction before accepting the commissionand delete registered serials after successful commission.
Refs: #3594
pithos: extend sqlite library for commission reconciliation
Merge branch 'tmp-allow-in-projects' into feature-quotas
astakos: Resources metadata improvements
- Allow admin to overwrite default resources presentation data using ASTAKOS_RESROUCES_META setting. dict_merge is used to accomodate admin from declaring all available metadata parameters.- Enforce allow_in_projects resource policy in project application...
common: Recursive dictionary merge helper method
ci: Remove snf-quotaholder-app from ci/config
ci: clean old docs before building new ones
ci: install snf-django before webproject
Try to intall 'snf-django-lib' before 'snf-webproject', since thewebproject depends to snf-django.
quotaholder: Allow resolving empty commissions
When resolving a pending commission, handle the case where the commissionhas been issued with no provisions.
cyclades: Rename 'qh_resolve_commissions' function
Rename 'qh_resolve_commissions' function to 'resolve_commissions'.
Merge branch 'feature-quotas-cyclades' into feature-quotas
cyclades: Remove obsolete code for static quotas
Remove the following obsolete settings, since their usage is coveredby Quotaholder:- MAX_VMS_PER_USER- MAX_NETWORKS_PER_USER- VMS_USER_QUOTA- NETWORKS_USER_QUOTA
Also remove 'cyclades-export-quota' management command.
Implement resource-export-cyclades command
Implement managemtn command to export cyclades resources in JSON format,in order to be imported to Astakos.
Cyclades: remove all quotaholder settings
Remove from cyclades all settings that were relative with Quotaholder.Remove CYCLADES_USE_QUOTAHOLDER settings, since Cyclades can not workany more without quotas.Remove CYCLADES_QUOTAHOLDER_URL and CYCLADES_QUOTAHOLDER_TOKEN since...
Varous fixes to cyclades-usage-verify command
Extend 'cyclades-usage-verify' management command to cover the usage of'cyclades-reset-usage' and remove the second one. The new commandreconciles resources(usage) by detecting inconsistencies between theusage of resources in Astakos and Cyclades DB and fixing them by issuing...
cyclades: Rename quotas management commands
Rename 'cyclades-reconcile-commissions' to 'reconcile-commissions-cyclades.'Rename 'cyclades-usage-verify' to 'reconcile-resources-cyclades.'
reconcile-resources: check that user exists in QH
Do not consider 0 usage for users and resources that are not included inQuotaholder resources list, since Quotaholder returns zero usage for allusers and all resources. If a user/resource does not belong to QH...
Refactor QuotaHolder serial model
Fix info message of reconcile-resources-cyclades
cyclades: refactor code relative to commission
Refactor Cyclades code that handles commissioning with Quotaholder. Thiscommit removes the 'uses_commission' decorator. Instead it introducesthe 'issue_and_accept_commission' function that is responsible for...
cyclades: resolve previous commissions
Extend 'issue_and_accept_commission' function to resolve previousunresolved commission, if exists. In order to resolve it, thecommission must not be pending, because if it is there is notenough information to resolve it.
Mock quotaholder for Cyclades tests
Create 'mocked_quotaholder' context manager to bypass commission and useit in Cyclades tests. Also this commit does some various fixes to othertests.
cyclades: Check qh resolve commission response
Check Quotaholder response to see if the commissions were accepted orrejected as requested, or failed for some reason.
Accepting or rejecting a commission will fail if the commission wasalready resolved. Since this is sometimes accepted, like when...
Restore quotas if enqueuing job to Ganeti fails
When creating a server, we commit the VM model in DB and reserve thecorresponding quotas in Quotaholder before enqueuing theOP_INSTANCE_CREATE job (because messages from dispatcher may arrivebefore committing). In case enqueuing job to Ganeti fails we must...
cyclades: Use astakosclient for quotas and commissions
Remove unused 'models' file
Various fixes to quotas
Merge branch 'feature-use-astakosclient' into feature-quotas
snf-pithos-app: Use astakosclient
snf-cyclades-app: Use astakosclient
Improve log message
Distinguish exceptions while using AstakosClient to communicate withAstakos, from the rest API errors.
cyclades: remove redundant settings
Remove 'CYCLADES_USER_CATALOG_URL' and 'CYCLADES_USER_FEEDBACK_URL'settings, since both of them can be derived from 'ASTAKOS_URL' setting.
pithos: remove redundant settings
Remove 'PITHOS_USER_CATALOG_URL' and 'PITHOS_USER_FEEDBACK_URL' and'PITHOS_USER_LOGIN_URL' settings, since all of them can be derived from'ASTAKOS_URL' setting.
plankton: Remove 'TRANSLATE_UUIDS' setting
Remove 'TRANSLATE_UUIDS' from plankton setting.
PEP8 style fixes
Handle AstakosClientException in api_method decorator
snf_django.lib.astakos: Use astakosclient
Merge branch 'develop' into feature-quotas
cyclades: fix bug in server-create command
Make --flavor-id mandatory in 'snf-manage server-create' managementcommand.
cyclades: Require user when creating private net
Update 'network-create' management command, to require an owner whencreating a private network.
Add support for ordering in ListCommand
Make list command order results either by 'order_by' class attribute,or by primary key.
astakos: Control exposing resources in projects
Add attribute `allow_in_projects' in Resource model (True by default).Set this flag for astakos.pending_app to False in the descriptionof astakos resources.
astakos: Migrate user settings for pendings_app limit
Provide console script astakos-migrate-0.14.Also update related upgrade notes.
Update quota API docs
Merge branch 'tmp-pithos-reconcile-commissions' into feature-quotas-pithos
Conflicts: snf-pithos-backend/pithos/backends/modular.py
astakosclient: Fix bug in checking arguments
Do not log in transaction decorator
Revert "astakosclient: don't check resolve_commissions' parameters"
This reverts commit da18207e2825b4a0a4cb3abc6a9fbef541eda05b.Issue resolved by commit 214058a911c5b4b8b3d9108ba891536a0b40dc49.
astakos: Reconcile resources
Sync number of pending applications to quotaholder.
astakos: accept commission immediately after issue
Unify these operations when registering a pending application,in order to make sure no commission can be left pending.
astakosclient: don't check resolve_commissions' parameters
In resolve_commissions, accept_serials and reject_serialsmay be empty lists. Don't do a validation check for thisparameters and let the servers respond with an errorif bad values was given.