set svn:keywords property for proper keywords expansion
[plcapi.git] / PLC / Methods / GetPeerData.py
index 696aca1..113fe86 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Thierry Parmentelat - INRIA
 # 
+# $Id$
 
 import time
 
@@ -48,6 +49,10 @@ class GetPeerData(Method):
         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'],
@@ -57,7 +62,8 @@ class GetPeerData(Method):
         # necessary for slice creation on the calling peer's nodes.
 
        # filter out special person
-       persons = Persons(self.api, {'~email':self.api.config.PLC_API_MAINTENANCE_USER,
+       persons = Persons(self.api, {'~email':[self.api.config.PLC_API_MAINTENANCE_USER,
+                                              self.api.config.PLC_ROOT_USER],
                                     'peer_id': None}, person_fields)
 
        # filter out system slices
@@ -68,7 +74,7 @@ class GetPeerData(Method):
         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,
             }