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
- updated with Thierrys patch which handles conflicting email addresses between peers
[plcapi.git]
/
PLC
/
Methods
/
GetPeers.py
diff --git
a/PLC/Methods/GetPeers.py
b/PLC/Methods/GetPeers.py
index
e4fd459
..
235c27c
100644
(file)
--- a/
PLC/Methods/GetPeers.py
+++ b/
PLC/Methods/GetPeers.py
@@
-15,19
+15,21
@@
class GetPeers (Method):
Returns an array of structs containing details about peers. If
person_filter is specified and is an array of peer identifiers or
peer names, or a struct of peer attributes, only peers matching
Returns an array of structs containing details about peers. If
person_filter is specified and is an array of peer identifiers or
peer names, or a struct of peer attributes, only peers matching
- the filter will be returned.
+ the filter will be returned. If return_fields is specified, only the
+ specified details will be returned.
"""
"""
- roles = ['admin']
+ roles = ['admin'
, 'node'
]
accepts = [
Auth(),
Mixed([Mixed(Peer.fields['peer_id'],
Peer.fields['peername'])],
accepts = [
Auth(),
Mixed([Mixed(Peer.fields['peer_id'],
Peer.fields['peername'])],
- Filter(Peer.fields))
+ Filter(Peer.fields)),
+ Parameter([str], "List of fields to return", nullok = True)
]
returns = [Peer.fields]
]
returns = [Peer.fields]
- def call (self, auth, peer_filter = None):
- return Peers(self.api, peer_filter
).values(
)
+ def call (self, auth, peer_filter = None
, return_fields = None
):
+ return Peers(self.api, peer_filter
, return_fields
)