Commit f2b4640e authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Rename get_service_quotas to service_get_quotas

So that it follows the naming scheme of other astakosclient calls.
parent c02fa17e
......@@ -325,7 +325,7 @@ class AstakosClient():
# ----------------------------------
# GET "/astakos/api/service_quotas"
def get_service_quotas(self, token, user=None):
def service_get_quotas(self, token, user=None):
"""Get all quotas for resources associated with the service
Keyword arguments:
......@@ -127,7 +127,7 @@ retry=0, use_pool=False, pool_size=8, logger=None\ **)**
current quotas (as dict of dicts).
In case of error raise an AstakosClientException exception.
**get_service_quotas(**\ token, user=None\ **)**
**service_get_quotas(**\ token, user=None\ **)**
Given a service's authentication token return all users'
current quotas for the resources associated with the service
(as dict of dicts of dicts).
......@@ -46,7 +46,7 @@ from import user_from_token
from import service_from_token
from import get_resources
from import get_user_quotas, get_service_quotas
from import get_user_quotas, service_get_quotas
import astakos.quotaholder.exception as qh_exception
import astakos.quotaholder.callpoint as qh
......@@ -64,7 +64,7 @@ def quotas(request, user=None):
def service_quotas(request):
user = request.GET.get('user')
users = [user] if user is not None else None
result = get_service_quotas(request.service_instance, users=users)
result = service_get_quotas(request.service_instance, users=users)
return json_response(result)
......@@ -94,7 +94,7 @@ def get_user_quotas(user, resources=None, sources=None):
return quotas[user.uuid]
def get_service_quotas(service, users=None):
def service_get_quotas(service, users=None):
resources = Resource.objects.filter(service=service)
resource_names = [ for r in resources]
counters = qh.get_quota(holders=users, resources=resource_names)
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