git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd80229
)
do not cache whitelisted nodes
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 10 Oct 2007 18:25:49 +0000
(18:25 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 10 Oct 2007 18:25:49 +0000
(18:25 +0000)
PLC/Methods/GetPeerData.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/GetPeerData.py
b/PLC/Methods/GetPeerData.py
index
1dcee31
..
346331a
100644
(file)
--- a/
PLC/Methods/GetPeerData.py
+++ b/
PLC/Methods/GetPeerData.py
@@
-1,7
+1,7
@@
#
# Thierry Parmentelat - INRIA
#
#
# Thierry Parmentelat - INRIA
#
-# $Id$
+# $Id
: GetPeerData.py 904 2007-10-08 14:28:06Z thierry
$
import time
import time
@@
-49,6
+49,10
@@
class GetPeerData(Method):
node_fields = filter(lambda field: field not in \
['boot_nonce', 'key', 'session', 'root_person_ids'],
Node.fields)
node_fields = filter(lambda field: field not in \
['boot_nonce', 'key', 'session', 'root_person_ids'],
Node.fields)
+ nodes = Nodes(self.api, {'peer_id': None}, node_fields);
+ # filter out whitelisted nodes
+ nodes = [ n for n in nodes if not n['slice_ids_whitelist']]
+
person_fields = filter(lambda field: field not in \
['password', 'verification_key', 'verification_expires'],
person_fields = filter(lambda field: field not in \
['password', 'verification_key', 'verification_expires'],
@@
-70,7
+74,7
@@
class GetPeerData(Method):
result = {
'Sites': Sites(self.api, {'peer_id': None}),
'Keys': Keys(self.api, {'peer_id': None}),
result = {
'Sites': Sites(self.api, {'peer_id': None}),
'Keys': Keys(self.api, {'peer_id': None}),
- 'Nodes':
Nodes(self.api, {'peer_id': None}, node_fields)
,
+ 'Nodes':
nodes
,
'Persons': persons,
'Slices': slices,
}
'Persons': persons,
'Slices': slices,
}