diff idavoll/memory_storage.py @ 145:f393bccec4bc

Add get_affiliations to Node class in storage facilities in preparation of support for 'Modifying Entity Affiliations' in the JEP-0060 specification.
author Ralph Meijer <ralphm@ik.nu>
date Thu, 14 Jul 2005 20:51:48 +0000
parents 812300cdbc22
children b4490bdc77e5
line wrap: on
line diff
--- a/idavoll/memory_storage.py	Tue Jul 12 14:53:23 2005 +0000
+++ b/idavoll/memory_storage.py	Thu Jul 14 20:51:48 2005 +0000
@@ -136,6 +136,12 @@
 
         return defer.succeed(subscription.state == 'subscribed')
 
+    def get_affiliations(self):
+        affiliations = [(jid.JID(entity), affiliation) for entity, affiliation
+                       in self._affiliations.iteritems()]
+
+        return defer.succeed(affiliations)
+
 class LeafNode(Node):
 
     implements(storage.ILeafNode)