[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:	rmccabe sourceware org	2006-10-11 23:08:34

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

Log message:
	fix for a very strange zope (bug?)

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/11 22:37:28	1.95
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/11 23:08:34	1.96
@@ -216,15 +216,16 @@
 	return (True, {'errors': errors, 'messages': messages })
 
 def buildClusterCreateFlags(self, batch_map, clusterName):
-  path = CLUSTER_FOLDER_PATH + clusterName
+  path = str(CLUSTER_FOLDER_PATH + clusterName)
   clusterfolder = self.restrictedTraverse(path)
   for key in batch_map.keys():
+    key = str(key)
     id = batch_map[key]
     batch_id = str(id)
-    objname = key + "____flag" #This suffix needed to avoid name collision
+    objname = str(key + "____flag") #This suffix needed to avoid name collision
     clusterfolder.manage_addProduct['ManagedSystem'].addManagedSystem(objname)
     #now designate this new object properly
-    objpath = path + "/" + objname
+    objpath = str(path + "/" + objname)
     flag = self.restrictedTraverse(objpath)
     #flag[BATCH_ID] = batch_id
     #flag[TASKTYPE] = CLUSTER_ADD
@@ -2328,15 +2329,23 @@
   return map
 
 def getClusterOS(self, ragent, request):
-	try:
-		clustername = request['clustername']
-	except KeyError, e:
-		try:
-			clustername = request.form['clustername']
-		except:
-			return {}
-	except:
-		return {}
+  try:
+    clustername = request['clustername']
+  except KeyError, e:
+    try:
+      clustername = request.form['clustername']
+    except:
+      return {}
+  except:
+    return {}
+
+  try:
+    ricci_agent = resolve_nodename(self, clustername, ragent)
+  except:
+    map = {}
+    map['os'] = ""
+    map['isVirtualized'] = False
+    return map
 
   try:
 	  ricci_agent = resolve_nodename(self, clustername, ragent)


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