Commit 410d945f authored by Georgios D. Tsoukalas's avatar Georgios D. Tsoukalas
Browse files

set quotaholder urls

- quotaholder base url is of the form 'http://host/quotaholder/v/'
- cyclades setting name set to CYCLADES_QUOTAHOLDER_URL
parent 9876bee6
......@@ -30,7 +30,7 @@
from functools import wraps
from contextlib import contextmanager
from synnefo.settings import (QUOTAHOLDER_URL, USE_QUOTAHOLDER,
from synnefo.settings import (CYCLADES_QUOTAHOLDER_URL, USE_QUOTAHOLDER,
VMS_USER_QUOTA, MAX_VMS_PER_USER,
NETWORKS_USER_QUOTA, MAX_NETWORKS_PER_USER)
......
......@@ -44,7 +44,8 @@ call_ex = '(?P<callname>[_A-Za-z0-9]*)'
#generic_pattern = (r'^%s/%s/%s' % (app_ex, ver_ex, call_ex), generic_view)
pats = [(r'%s/%s/%s' % (app_ex, ver_ex, call_ex), view)]
#pats = [(r'%s/%s/%s' % (app_ex, ver_ex, call_ex), view)]
pats = [(r'%s/%s' % (ver_ex, call_ex), view)]
urlpatterns = patterns('',
......
......@@ -50,7 +50,7 @@ def _get_body(request):
callpoints = {('quotaholder', 'v'): API_Callpoint()}
@transaction.commit_on_success
def view(request, appname=None, version=None, callname=None):
def view(request, appname='quotaholder', version=None, callname=None):
if (appname, version) not in callpoints:
return HttpResponse(status=404)
......
......@@ -34,5 +34,5 @@
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^api/quotas/', include('quotaholder_django.quotaholder_app.urls')),
(r'^quotaholder/', include('quotaholder_django.quotaholder_app.urls')),
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment