git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make GetLeases reachable with anon auth
[plcapi.git]
/
PLC
/
Methods
/
GetLeases.py
diff --git
a/PLC/Methods/GetLeases.py
b/PLC/Methods/GetLeases.py
index
f3dfa78
..
2385012
100644
(file)
--- a/
PLC/Methods/GetLeases.py
+++ b/
PLC/Methods/GetLeases.py
@@
-1,5
+1,3
@@
-# $Id$
-# $URL$
# Thierry Parmentelat -- INRIA
from PLC.Method import Method
# Thierry Parmentelat -- INRIA
from PLC.Method import Method
@@
-29,13
+27,13
@@
class GetLeases(Method):
"""
"""
- roles = ['admin', 'pi', 'user', 'node']
+ roles = ['admin', 'pi', 'user', 'node'
, 'anonymous'
]
accepts = [
Auth(),
Mixed(Lease.fields['lease_id'],
[Lease.fields['lease_id']],
accepts = [
Auth(),
Mixed(Lease.fields['lease_id'],
[Lease.fields['lease_id']],
- LeaseFilter(Lease.fields)),
+ LeaseFilter(Lease.fields)),
Parameter([str], "List of fields to return", nullok = True)
]
Parameter([str], "List of fields to return", nullok = True)
]
@@
-55,7
+53,7
@@
class GetLeases(Method):
# Remove lease_id if not specified
if added_fields:
for lease in leases:
# Remove lease_id if not specified
if added_fields:
for lease in leases:
- if 'lease_id' in lease:
- del lease['lease_id']
+
if 'lease_id' in lease:
+
del lease['lease_id']
return leases
return leases