cyclades: Add 'name' to all commissions.
Make all quotaholder commissions to have a name. Since, Cyclades doesnot store the association of a commission with a resource, we includethe resource in the commission name.
PEP8 fixes
cyclades: Make Floating IPs a quotable resource
Add 'cyclades.floating_ip' to quotable resources. Update helperfunctions and tests to include this resource.
cyclades: Mark serial as resolved if auto_accept
Modify 'issue_commission' function to mark the QuotaHolderSerial objectas resolved, if auto_accept option is used.
cyclades: Major refactor to api and logic apps
Major refactor to cyclades api and logic apps that removes most codefrom the api views and moves it to logic app, so that the same logiccode can be used by different apps (e.g. EC2 API). Code is moved into...
cyclades: Retry requests to quotaholder
cyclades: Rename service token
Rename CYCLADES_ASTAKOS_SERVICE_TOKEN to CYCLADES_SERVICE_TOKEN foruniformity.
cyclades: Fix syntax errors in resource definition
Incorporate all resources into service definitions
- Add 'service_origin' key in resources, as the normative name of the service that exported it.- Keep resources backwards compatible, export-resource-service reads resources from the service list.
cyclades, pithos: Update resource definitions
Include service_type in each resource dict.
make synnefo URLs consistent and configurable
https://service.deployment.vendor.tld/service-base/api-prefix/hard/path |___________________________________| |__________| |________| |_______| BASE_HOST BASE_PATH PREFIX Hardcoded...
cyclades: Raise 500 for commission errors
Wrap all calls to astakosclient for commissions to raise 500, if anyerror other than QuotaLimit(413) occurs.
Catch QuotaLimit exception when reconciling resources
This can happen, if the actual usage registered by a service exceedsthe quota limit.Advise the user to try the --force option.
pithos, cyclades: Name reconciling commissions
Use commission name "RECONCILE" to distinguish such operationsin the quotaholder provision log.
cyclades: Rename 'qh_resolve_commissions' function
Rename 'qh_resolve_commissions' function to 'resolve_commissions'.
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...
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...
cyclades: Use astakosclient for quotas and commissions
Remove unused 'models' file
Various fixes to quotas
Fix small typo in import statements
Move cloud faults to 'snf_django.lib.api.faults'
Gather all faults from all synnefo projects into common'snf_django.lib.api.faults'.
Simple tests for synnefo.quotas
Merge branch 'feature-astakos-authpolicies' into develop
Conflicts: snf-cyclades-app/synnefo/api/management/commands/flavor-create.py version
Fix bug in uses_commission decorator
Distinquish between exceptions in the decorated function and exceptionsin accepting/rejecting the commissions. The first one determines whetherserials should be accepted or rejected, while the second one is an error...
Improve performance of cyclades-usage-verify
Get quotaholder holdings for all users in one call, to speed upexecution of 'snf-manage cyclades-usage-verify'.
Move common code for mngmt commands to webproject
Move cyclades functions that are useful for all managament commands, likepprint_table or parse_filters, to snf-webproject.
Merge branch 'release-0.13' into develop
Conflicts: version
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...
pep8 convension
minor fix and rename to cyclades-reset-usage
minor fixes and rename to cyclades-usage-verify
rename to cyclades-reconcile-commissions
correct quotaholder exception imports
Fix bug in DummyQuotaholderClient
DummyQuotaholderClient should count only positive commissions.
Add details to OverLimit exception
pep8 fixes
Filter out deleted vms/networks
Do not count deleted VMs and Networks when getting holdingsfrom the Cyclades DB.
cyclades: import quotaholder exceptions from kamaki
Because this is where the quotaholder client exceptions come from.
Import quotaholder settings only if needed
Implement quotas-init and quotas-verify
Implement quotas-init and quotas-verify management commands.- quotas-init sets quotas of Quotaholder to the state of quotas in Cyclades DB- quotas-verify detects incosistencies between quotas in Quotaholder and...
Fix renamed setting
cyclades: authenticate to quotaholder with token
- initialize quotaholder client with the token from setting CYCLADES_QUOTAHOLDER_TOKEN
- rename setting USE_QUOTAHOLDER to CYCLADES_USE_QUOTAHOLDER
Use CYCLADES_QUOTAHOLDER_URL
set quotaholder urls
- quotaholder base url is of the form 'http://host/quotaholder/v/'- cyclades setting name set to CYCLADES_QUOTAHOLDER_URL
Add USE_QUOTAHOLDER setting
Add setting indicating whether to use the Quotaholder service oruse the static limits.
Fix imports relative to quotas
Fix quotaholder exception handling
Currently, QuotaholderHTTP returns CallError, with the call_errorattribute indicating the error.
Implement reconciliation for pending quotas
Allocate resources from cyclades entity
Also fix commissioning key
Convert resource sizes in bytes
Rename disk to disk_size
Revert "Rename disk to disk_size"
This reverts commit 2d017fc046194d8316096c56d4a32cdf81ce5fcd.
update to use new quotaholder packaging api
Create quotas module
Create quotas module, containing functions for interacting withthe Quotaholder service.