Statistics
| Branch: | Tag: | Revision:

root / snf-django-lib / snf_django / lib / api @ 34bd6588

# Date Author Comment
34bd6588 09/25/2013 12:39 am Christos Stavrakakis

wheezy: HttpResponse has no _is_string attribute

06014b1c 09/24/2013 05:16 pm Christos Stavrakakis

wheezy: fix _patch_resolve to comply with Django

Class RegexURLPattern doesn't contain `_get_callback' method any more
and resolve the callback when we try to retrieve it.

a6b17d33 09/24/2013 05:16 pm Christos Stavrakakis

wheezy: urls module doesn't export defaults

0f66865f 09/24/2013 05:16 pm Ilias Tsitsimpis

wheezy: is_hop_by_hop has been removed from Django

Implement our own is_hop_by_hop function.

981d3b0d 09/16/2013 05:39 pm Sofia Papagiannaki

pithos: Fix partial content responses

Refs: #4063

347b2ba1 09/12/2013 06:26 pm Giorgos Korfiatis

common: Strip trailing slash from endpoints

Remove trailing slash from the endpoints' publicURL field in service
definitions. These values end up in the response of POST /tokens, and,
according to the keystone API, should not end in slash. A trailing slash...

f089ffca 06/25/2013 03:24 pm Christos Stavrakakis

snf-django: Add retry option to AstakosClient

API method decorator should initialize the AstakosClient with the retry
argument set, in order to avoid errors caused by getting an old
connection from pool.

f9662798 06/19/2013 04:09 pm Kostas Papadimitriou

django-lib: Use requested default serialization

d0d9a3f5 06/18/2013 06:42 pm Kostas Papadimitriou

django-lib: api_method decorator improvements

allow API views to define supported serializations.

fced411d 06/13/2013 01:43 pm Kostas Papadimitriou

djangolib: Common JSONP helper method

269ac8de 06/12/2013 02:28 pm Christos Stavrakakis

Ensure we return cloud faults under any API prefix

2b40f200 06/10/2013 08:00 pm Christos Stavrakakis

Make API faults have default 500 status code

Make the default status code of API Fault and AstakosClientException
to be 500.

6b560707 06/10/2013 11:06 am Sofia Papagiannaki

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 to
json as the default serialization.
So we introduced a new optional argument (defaults to json) to override...

a0a3da60 06/07/2013 12:56 am Kostas Papadimitriou

django-lib: API url patterns helper

`snf_django.lib.api.urls.api_patterns` acts as django `patterns` method
used commonly in urls modules. Using api_patterns to register urls will
result all patterns to be exempted from csrf protection.

81e19e70 06/07/2013 12:49 am Kostas Papadimitriou

django-lib: Exempt api_method views from csrf

12c730d9 06/03/2013 03:32 pm Georgios D. Tsoukalas

django-lib: fix missing 'raise' typo

152e7bba 06/03/2013 11:50 am Georgios D. Tsoukalas

snf-django proxy: preserve the response's headers

e3ff6830 06/03/2013 11:49 am Georgios D. Tsoukalas

make synnefo URLs consistent and configurable

https://service.deployment.vendor.tld/service-base/api-prefix/hard/path |___________________________________| |__________| |________| |_______|
BASE_HOST BASE_PATH PREFIX Hardcoded...

499d9bfe 05/31/2013 01:13 pm Christos Stavrakakis

cyclades: Raise 500 for commission errors

Wrap all calls to astakosclient for commissions to raise 500, if any
error other than QuotaLimit(413) occurs.

b8525481 05/28/2013 07:56 pm Sofia Papagiannaki

snf-django-lib: Fix minor string formatting issue

c50825bf 05/28/2013 07:56 pm Sofia Papagiannaki

snf-django-lib: Fix minor spelling issue in get_serialization

f870efe2 05/28/2013 07:56 pm Sofia Papagiannaki

snf-django-lib: Fix proxy issue

The ``X-Forwarded-Host`` header should not be forwared to the target
because django appends its value to the Host header and
results in validate_host() failure.

87dd67af 05/24/2013 04:15 pm Christos Stavrakakis

snf-django: BadRequest if no content-type

Raise a BadRequest if request is missing Content-Type header field.

5ad8eca1 05/20/2013 04:16 pm Kostas Papadimitriou

django-lib: Preserve proxy target path

142133fb 05/20/2013 03:08 pm Kostas Papadimitriou

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

222305b7 05/20/2013 12:44 pm Sofia Papagiannaki

astakos: replace CookieAuthenticationMiddleware with a view decorator

reverse commits ab30f5f163a13dfc7f9bec4d263208dd35f09d16 &
1439d6383113b151b6a3316e320a0418fa30d421

decorate also ``django.contrib.auth.views`` utilized by
astakos

1439d638 05/16/2013 08:27 pm Sofia Papagiannaki

astakos: api calls authenticated via X-Auth-Token shall not affect cookie

CookieAuthenticationMiddleware.process_request() synchronizes
the astakos cookie with the request user.
If an astakos cookie is set but there is no logged in user,
the middleware deletes the cookie....

fed0b230 05/15/2013 06:38 pm Christos Stavrakakis

Replace 'synnefo.lib.http' with 'objpool.http'

33c84784 05/15/2013 06:20 pm Sofia Papagiannaki

snf-django-lib: provide proxy functionality

255cef57 04/30/2013 05:03 pm Christos Stavrakakis

Improve log message

Distinguish exceptions while using AstakosClient to communicate with
Astakos, from the rest API errors.

726cb37f 04/30/2013 05:03 pm Ilias Tsitsimpis

Handle AstakosClientException in api_method decorator

b698d39d 04/16/2013 08:22 pm Christos Stavrakakis

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'. Views
defining their response 'Content-Type' should set the
'override_serialization' attribute of response to 'True'.

47ef53d5 04/15/2013 05:17 pm Christos Stavrakakis

Make 'api_method' to take astakos_url as argument

93c6900c 04/10/2013 12:18 pm Ilias Tsitsimpis

snf-django-lib: PEP-8 style fixes

6c1c0738 04/10/2013 12:05 pm Ilias Tsitsimpis

snf-django-lib: ReRaise AstakosClientExceptions as API Faults

fde7b7cb 04/10/2013 12:00 pm Ilias Tsitsimpis

snf-django-lib: Fault Exceptions now have code attr

420c24ee 04/09/2013 05:31 pm Ilias Tsitsimpis

PEP8 styling fixes in faults.py

896754a6 04/08/2013 11:07 am Christos Stavrakakis

Move parsedate module to snf_django

bd40abfa 04/08/2013 11:06 am Christos Stavrakakis

Move cloud faults to 'snf_django.lib.api.faults'

Gather all faults from all synnefo projects into common
'snf_django.lib.api.faults'.

72bf812d 04/08/2013 11:06 am Christos Stavrakakis

Implement single decorator for handling API calls

Create a single decorator for API methods to be used be accross all
synnefo. This decorator does the following:

  • Proper logging of 5xx faults and unexpected errors
  • Authentication with Astakos using snf-astakos-client...