Merge branch 'hotfix-0.14.6' into develop
Conflicts: Changelog docs/admin-guide.rst snf-cyclades-app/synnefo/api/management/commands/network-remove.py snf-cyclades-app/synnefo/api/servers.py snf-cyclades-app/synnefo/api/tests/servers.py snf-cyclades-app/synnefo/logic/backend.py...
cyclades: Mock vm removal if creation fails
In case creating a VM fails before the OP_INSTANCE_CREATE job isenqueued in Ganeti, the VM and its NICs must be deleted, and theresources must be released from Quotaholder, which is exactly what isdone when a VM is deleted from Ganeti. Instead of duplicating the code,...
snf-django-lib: AssertionError in proxy
When we use proxy, we have to check that path starts withthe given proxy_base, and raise an AssertionError otherwise.
The check was there but it was wrong (there was missinga not) and also no exception was raised.
pithos: Fix partial content responses
Refs: #4063
common: Strip trailing slash from endpoints
Remove trailing slash from the endpoints' publicURL field in servicedefinitions. These values end up in the response of POST /tokens, and,according to the keystone API, should not end in slash. A trailing slash...
pithos: Add tests
snf-django: PEP8 fixes
Fix stale import statements
Commit 7cfc0ce moved code from webproject to snf_django. This commitfixes some stale imports that skipped renaming.
snf-django: Move ListCommand to snf-django
snf-webproject contained the generic ListCommand, and because of this ithad a dependency from snf-django-lib. This commit moves this command fromsnf-webproject to snf-django-lib and removes this dependency. Also,...
snf_django: Fix type error
pep8 changes
PEP8 fixes
cyclades: Common filtering based on changes-since
Add 'filter_modified_since' function in snf_django api utils, forparsing 'changes-since' HTTP parameter and filter the DB objects thatare updated after that date. Otherwise the deleted objects are returned.
pithos: update tests
pithos: WIP - rewrite pithos tests
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...
snf_django: Fix bug in BaseAPITest
Include 202 in success responses.
snf_django: Mock quotaholder to BaseAPITest
Mock quotaholder in all of BaseAPITest calls.
Merge branch 'hotfix-0.14.2' into develop
Conflicts: snf-astakos-app/astakos/im/views/projects.py snf-cyclades-app/synnefo/logic/backend.py snf-django-lib/snf_django/lib/astakos.py version
snf-django: Add retry option to AstakosClient
API method decorator should initialize the AstakosClient with the retryargument set, in order to avoid errors caused by getting an oldconnection from pool.
Merge branch 'release-0.14' into develop
Conflicts: snf-astakos-app/astakos/im/views/target/redirect.py snf-cyclades-app/synnefo/logic/backend.py version
Add proper logging for UserCache
Fix regressions in snf-manage list commands
pithos: compatibility code for django greater than 1.2
Change condition for being compatible with django 1.2 or greater
django-lib: Use requested default serialization
django-lib: api_method decorator improvements
allow API views to define supported serializations.
django-lib: Additional BaseAPITest helper assertion
Introduce assertMethodNotAllowed method in BaseAPITest class. The methodasserts that provided response is a valid ``Method not allowed`` API response.
djangolib: Common JSONP helper method
djangolib: Improve root redirect handling
- avoid registering root url in case <base_path> equals to root url- additional helper redirect for non trailing slash <base_path> endpoint
djangolib: Append trailling slash on default root redirects
Ensure we return cloud faults under any API prefix
Make API faults have default 500 status code
Make the default status code of API Fault and AstakosClientExceptionto be 500.
snf_django: Optionally use other default serialization than json
Pithos api default serialization for listing is text insted of json.However the common api decorator if not specified otherwise used tojson as the default serialization.So we introduced a new optional argument (defaults to json) to override...
django-lib: API url patterns helper
`snf_django.lib.api.urls.api_patterns` acts as django `patterns` methodused commonly in urls modules. Using api_patterns to register urls willresult all patterns to be exempted from csrf protection.
django-lib: Exempt api_method views from csrf
django_lib: Component's urlpatterns utilty
extend_with_root_redirects can be used by components to easily extend theregistered urlpatterns with utility redirect views for the root urls.
django-lib: fix missing 'raise' typo
snf-django proxy: preserve the response's headers
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.
snf-django-lib: Fix minor string formatting issue
snf-django-lib: Fix minor spelling issue in get_serialization
snf-django-lib: Fix proxy issue
The ``X-Forwarded-Host`` header should not be forwared to the targetbecause django appends its value to the Host header andresults in validate_host() failure.
snf-django: BadRequest if no content-type
Raise a BadRequest if request is missing Content-Type header field.
django-lib: Preserve proxy target path
snf-django: Improve headers handling in common proxy util
- Avoid proxying Connection, Host and Cookie headers- Cleanup non headers keys (e.g. wsgi.*)- Set X-Forwarded-For header
astakos: replace CookieAuthenticationMiddleware with a view decorator
reverse commits ab30f5f163a13dfc7f9bec4d263208dd35f09d16 &1439d6383113b151b6a3316e320a0418fa30d421
decorate also ``django.contrib.auth.views`` utilized byastakos
astakos: api calls authenticated via X-Auth-Token shall not affect cookie
CookieAuthenticationMiddleware.process_request() synchronizesthe astakos cookie with the request user.If an astakos cookie is set but there is no logged in user,the middleware deletes the cookie....
astakos: Adapt tests to 2.6-style unittest
Define assertGreater, assertIn, assertRaises in snf_django.utils.testing
Replace 'synnefo.lib.http' with 'objpool.http'
snf-django-lib: provide proxy functionality
snf_django: Use wraps in transaction decorator
This is to preserve name of called function.
Improve mocked quotaholder
Mock 'resolve_commissions' call.
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.
Improve log message
Distinguish exceptions while using AstakosClient to communicate withAstakos, from the rest API errors.
Handle AstakosClientException in api_method decorator
snf_django.lib.astakos: Use astakosclient
Do not log in transaction decorator
Merge branch 'develop' into feature-quotas
Conflicts: astakosclient/astakosclient/__init__.py astakosclient/astakosclient/errors.py astakosclient/astakosclient/tests.py docs/index.rst
Add missing init for snf_django.lib.db package
Move transaction.py to snf_django package
snf_django: Add missing import for IntDecimalField
Needed for formfield() method.
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
Fix API decorator response Content-Type
Remove check for response Content-Type, since 'django.http.HttpResponse'has always a default Content-Type of 'text/html; charset=utf-8'. Viewsdefining their response 'Content-Type' should set the'override_serialization' attribute of response to 'True'.
Make 'api_method' to take astakos_url as argument
Improve settings related to ASTAKOS url
Rename 'PITHOS_AUTHENTICATION_URL' setting to 'ASTAKOS_URL'. Also remove'PITHOS_AUTHENTICATION_USERS' from docs (it was removed from code incommit 8df4fae).
Modify 'ASTAKOS_URL' to point to the node hosting the Astakos service...
snf-django-lib: PEP-8 style fixes
snf-django-lib: ReRaise AstakosClientExceptions as API Faults
snf-django-lib: Fault Exceptions now have code attr
PEP8 styling fixes in faults.py
Move astakos lib from snf-common to snf-django-lib
Move parsedate module to snf_django
Move common test code to snf_django.lib.testing
Create 'snf-django-lib'
Create 'snf-django-lib', common Synnefo library for django.
Move cloud faults to 'snf_django.lib.api.faults'
Gather all faults from all synnefo projects into common'snf_django.lib.api.faults'.
Implement single decorator for handling API calls
Create a single decorator for API methods to be used be accross allsynnefo. This decorator does the following: