[Commits] (morgen) iterEndpoints( ) now yields tuples of (alias, endpoint, cloud)

commits at osafoundation.org commits at osafoundation.org
Mon Aug 2 22:47:24 PDT 2004


Commit by: morgen
Modified files:
chandler/repository/schema/Cloud.py 1.9 1.10

Log message:
iterEndpoints( ) now yields tuples of (alias, endpoint, cloud)

This allows the repository servlet to display more complete cloud info.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/repository/schema/Cloud.py.diff?r1=text&tr1=1.9&r2=text&tr2=1.10

Index: chandler/repository/schema/Cloud.py
diff -u chandler/repository/schema/Cloud.py:1.9 chandler/repository/schema/Cloud.py:1.10
--- chandler/repository/schema/Cloud.py:1.9	Sun Aug  1 04:14:41 2004
+++ chandler/repository/schema/Cloud.py	Mon Aug  2 22:47:23 2004
@@ -1,6 +1,6 @@
 
-__revision__  = "$Revision: 1.9 $"
-__date__      = "$Date: 2004/08/01 11:14:41 $"
+__revision__  = "$Revision: 1.10 $"
+__date__      = "$Date: 2004/08/03 05:47:23 $"
 __copyright__ = "Copyright (c) 2002 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -79,7 +79,7 @@
         else:
             results = []
 
-        for alias, endpoint in self.iterEndpoints(cloudAlias):
+        for alias, endpoint, cloud in self.iterEndpoints(cloudAlias):
             for other in endpoint.iterValues(item):
                 if other is not None and other._uuid not in items:
                     results.extend(endpoint.getItems(other, items, references,
@@ -161,7 +161,7 @@
     def getAttributeEndpoints(self, attrName, index=0, cloudAlias=None):
 
         endpoints = []
-        for endpoint in self.iterEndpoints(cloudAlias):
+        for alias, endpoint, cloud in self.iterEndpoints(cloudAlias):
             names = endpoint.attribute
             if index < len(names) and names[index] == attrName:
                 endpoints.append(endpoint)
@@ -202,16 +202,17 @@
         endpoints = self.getAttributeValue('endpoints', default=None)
         if endpoints is not None:
             for endpoint in endpoints:
-                yield (endpoints.getAlias(endpoint), endpoint)
+                yield (endpoints.getAlias(endpoint), endpoint, self)
 
         if cloudAlias is not None:
             for superKind in self.kind._getSuperKinds():
                 for cloud in superKind.getClouds(cloudAlias):
-                    for alias, endpoint in cloud.iterEndpoints(cloudAlias):
+                    for alias, endpoint, inCloud in \
+                     cloud.iterEndpoints(cloudAlias):
                         if (alias is None or
                             endpoints is None or
                             endpoints.resolveAlias(alias) is None):
-                            yield (alias, endpoint)
+                            yield (alias, endpoint, inCloud)
 
     def getEndpoints(self, alias, cloudAlias=None):
         """



More information about the Commits mailing list