Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
itminedu
synnefo
Commits
47ea3056
Commit
47ea3056
authored
Apr 19, 2013
by
Giorgos Korfiatis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astakosclient: Add user option in get_service_quotas
parent
d81a5b38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
astakosclient/astakosclient/__init__.py
astakosclient/astakosclient/__init__.py
+7
-3
astakosclient/docs/index.rst
astakosclient/docs/index.rst
+3
-1
No files found.
astakosclient/astakosclient/__init__.py
View file @
47ea3056
...
...
@@ -325,18 +325,22 @@ class AstakosClient():
# ----------------------------------
# GET "/astakos/api/service_quotas"
def
get_service_quotas
(
self
,
token
):
def
get_service_quotas
(
self
,
token
,
user
=
None
):
"""Get all quotas for resources associated with the service
Keyword arguments:
token -- service's token (string)
user -- optionally, the uuid of a specific user
In case of success return a dict of dicts of dicts with current quotas
for all users.
for all users
, or of a specified user, if user argument is set
.
Otherwise raise an AstakosClientException
"""
return
self
.
_call_astakos
(
token
,
"/astakos/api/service_quotas"
)
query
=
"/astakos/api/service_quotas"
if
user
is
not
None
:
query
+=
"?user="
+
user
return
self
.
_call_astakos
(
token
,
query
)
# ----------------------------------
# POST "/astakos/api/commisions"
...
...
astakosclient/docs/index.rst
View file @
47ea3056
...
...
@@ -127,10 +127,12 @@ 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\ **)**
**get_service_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).
Optionally, one can query the quotas of a specific user with
argument user=UUID.
In case of error raise an AstakosClientException exception.
**issue_commission(**\ token, request\ **)**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment