Change menu ``Report`` to ``Usage``
[astakos] / snf-astakos-app / astakos / im / api / callpoint.py
index 31711dc..274609e 100644 (file)
 # or implied, of GRNET S.A.
 
 from astakos.im.api.spec import AstakosAPI
-from backends import get_backend
+from astakos.im.api.backends import get_backend
 
-from commissioning import (Callpoint,
-                           #                             CommissionException,
-                           #                             CorruptedError, InvalidDataError,
-                           #                             InvalidKeyError, NoEntityError,
-                           #                             NoQuantityError, NoCapacityError,
-                           #                             ExportLimitError, ImportLimitError
-                           )
+from synnefo.lib.commissioning import CorruptedError
 
+from django.db import transaction
 
-# from commissioning.utils.newname import newname
-# from django.db.models import Model, BigIntegerField, CharField, ForeignKey, Q
-# from django.db import transaction, IntegrityError
-# from .models import (Holder, Entity, Policy, Holding,
-#                      Commission, Provision, ProvisionLog, now)
-
-class AstakosDjangoDBCallpoint():
+class AstakosCallpoint():
 
     api_spec = AstakosAPI()
 
@@ -121,7 +110,7 @@ class AstakosDjangoDBCallpoint():
         b = get_backend()
         return b.list_users(filter)
 
-    def get_user_status(self, user_id):
+    def get_user_usage(self, user_id):
         b = get_backend()
         return b.get_resource_usage(user_id)
 
@@ -159,4 +148,4 @@ class AstakosDjangoDBCallpoint():
         rejected = (b.create_group(**g) for g in groups)
         return rejected
 
-API_Callpoint = AstakosDjangoDBCallpoint
+API_Callpoint = AstakosCallpoint