[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons sourceware org	2006-10-11 17:43:30

Modified files:
	luci/site/luci/Extensions: cluster_adapters.py 

Log message:
	added other case in fence info method.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.92&r2=1.93

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/11 17:29:46	1.92
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/11 17:43:30	1.93
@@ -2097,14 +2097,25 @@
   return resultlist
 
 def getFenceInfo(self, model, request=None):
-  map = list() 
+  map = {}
+  fencedevs = list() 
   level1 = list()
   level2 = list()
-  map.append(level1)
-  map.append(level2)
+  map['level1'] = level1
+  map['level2'] = level2
+  map['fencedevs'] = fencedevs
   nodename = ""
   if request == None:  #this is being called by the fence device page
-    pass
+    #Get list of fence devices
+    fds = model.getFenceDevices()
+    for fd in fds:
+      #create fencedev hashmap
+      if fd.isShared() == True:
+        fencedev = fd.getAttributes()
+        fencedevs.append(fencedev)
+      
+    return map
+
   else:
     try:
       nodename = request['nodename']
@@ -2174,12 +2185,14 @@
           else:  #Not a shareable fence device type
             for kee in kees:
               fence_struct[kee] = fi_attrs[kee]
-      map[i].append(fence_struct)      
+        if i == 0:
+          level1.append(fence_struct)      
+        else:
+          level2.append(fence_struct)      
 
     return map    
       
 
-      
 
 def getLogsForNode(self, request):
   nodename = request['nodename']


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]