Statistics
| Branch: | Tag: | Revision:

root / snf-django-lib / snf_django / lib / api @ c4e22972

Name Size
  proxy
__init__.py 13.3 kB
faults.py 3.2 kB
parsedate.py 3.5 kB
urls.py 2.6 kB
utils.py 4.9 kB

Latest revisions

# Date Author Comment
c4e22972 02/21/2014 04:05 pm Christos Stavrakakis

snf_django: Explicitly set encoding of requests

Explicitly set request encoding to UTF-8 instead of relying
DEFAULT_CHARSET setting. See:
https://docs.djangoproject.com/en/1.4/ref/unicode/#form-submission

5a6cee09 02/21/2014 04:05 pm Christos Stavrakakis

snf_django: Handle unicode errors in JSON bodies

Catch unicode errors when JSON deserializing the body of a request.
Also, rename 'get_request_dict' function to 'get_json_body', as it is a
more represenative name for what the function is doing.

14402edc 01/24/2014 07:12 pm Christos Stavrakakis

cyclades: Validate fields of API requests

Make sure that all fields of a request (user input) have a valid type.
This commit validates 'ports', 'servers' and 'floating_ips' APIs.

Refs #4979

f9d665e4 01/20/2014 01:39 pm Christos Stavrakakis

astakos: Fix bug in Astakos stats view

'ASTAKOS_AUTH_URL' setting is not present in Astakos node.

dd21b1c4 12/10/2013 01:52 pm Kostas Papadimitriou

django-lib: redirect option in proxy util

If set to True proxy view will return an http redirect response to the
corresponding target location.

Signed-off-by: Kostas Papadimitriou <>
Signed-off-by: Ilias Tsitsimpis <>

2aba7764 12/03/2013 02:44 pm Sofia Papagiannaki

snf_django: Change error status code if request method is not valid

Return 405 (NotAllowed) instead of 400 (BadRequest)
Add Allow header in the response containing the list of valid methods

c20a9da5 11/28/2013 01:36 pm Christos Stavrakakis

snf_django: Log all 5xx to 'django.request'

Change api_method decorator to log besides unhandled exceptions, all
5xx API responses to 'django.request'.

93505a12 11/28/2013 01:30 pm Christos Stavrakakis

snf_django: Log exceptions to 'django.request'

Change api_method decorator to log unhandled exception in
'django.request' handler in order to match with Django's default
behaviour to log unhandled exceptions as 'error' in 'django.request' and
sent mail to admins for such cases.

aad21b81 11/27/2013 08:12 pm Christos Stavrakakis

snf_django: Propper logging of unexpected errors

Extend logging of unexpected errors, in 'api_method' decorator to
include the request and the status code in the log record, in order to
be properly displayed by Django's AdminMailHandler.

bda47e03 11/21/2013 01:28 pm Christos Stavrakakis

cyclades: Export Cyclades detailed stats from API

Add '/admin/stats/detail' API endpoint to export basic statistics about
Cyclades. Access to this view is only allowed to the users that belong
to specific Astakos groups, as specified in the new setting
'ADMIN_STATS_PERMITTED_GROUPS.' Also, added the new 'user_in_groups' API...

View revisions

Also available in: Atom