Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
3927d22b
Commit
3927d22b
authored
Jun 18, 2013
by
Kostas Papadimitriou
Browse files
pithos-api: Update api_method wrapper
parent
8292785f
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-pithos-app/pithos/api/util.py
View file @
3927d22b
...
...
@@ -1062,13 +1062,14 @@ def get_pithos_usage(token):
def
api_method
(
http_method
=
None
,
token_required
=
True
,
user_required
=
True
,
logger
=
None
,
format_allowed
=
False
,
default_serialization
=
"json"
):
format_allowed
=
False
,
serializations
=
None
):
serializations
=
serializations
or
[
'json'
,
'xml'
]
def
decorator
(
func
):
@
api
.
api_method
(
http_method
=
http_method
,
token_required
=
token_required
,
user_required
=
user_required
,
logger
=
logger
,
format_allowed
=
format_allowed
,
astakos_url
=
ASTAKOS_BASE_URL
,
default_
serialization
=
default_
serialization
)
serialization
s
=
serialization
s
)
@
wraps
(
func
)
def
wrapper
(
request
,
*
args
,
**
kwargs
):
# The args variable may contain up to (account, container, object).
...
...
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