Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synnefo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
synnefo
Commits
fc28b581
Commit
fc28b581
authored
Apr 18, 2013
by
Giorgos Korfiatis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astakosclient: Add request for service quotas
parent
387b9cb4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
astakosclient/astakosclient/__init__.py
astakosclient/astakosclient/__init__.py
+15
-0
astakosclient/docs/index.rst
astakosclient/docs/index.rst
+7
-0
No files found.
astakosclient/astakosclient/__init__.py
View file @
fc28b581
...
...
@@ -323,6 +323,21 @@ class AstakosClient():
"""
return
self
.
_call_astakos
(
token
,
"/astakos/api/quotas"
)
# ----------------------------------
# GET "/astakos/api/service_quotas"
def
get_service_quotas
(
self
,
token
):
"""Get all quotas for resources associated with the service
Keyword arguments:
token -- service's token (string)
In case of success return a dict of dicts of dicts with current quotas
for all users.
Otherwise raise an AstakosClientException
"""
return
self
.
_call_astakos
(
token
,
"/astakos/api/service_quotas"
)
# ----------------------------------
# POST "/astakos/api/commisions"
def
issue_commission
(
self
,
token
,
request
):
...
...
astakosclient/docs/index.rst
View file @
fc28b581
...
...
@@ -19,6 +19,7 @@ authentication token for:
* Usernames for given UUIDs
* UUIDs for given usernames
* Quotas for all related resources
* Issue commissions
* Get pending commissions
* Accept or reject commissions
...
...
@@ -126,6 +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\ **)**
Given a service's authentication token return all users'
current quotas for the resources associated with the service
(as dict of dicts of dicts).
In case of error raise an AstakosClientException exception.
**issue_commission(**\ token, request\ **)**
Given a service's authentication token issue a commission.
In case of success return commission's id (int).
...
...
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