[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-07-28 18:40:23

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

Log message:
	Fixes for database flags

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/07/28 14:16:30	1.20
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/07/28 18:40:23	1.21
@@ -159,9 +159,12 @@
     #now designate this new object properly
     objpath = path + "/" + objname
     flag = self.restrictedTraverse(objpath)
-    flag[BATCH_ID] = batch_id
-    flag[TASKTYPE] = CLUSTER_ADD
-    flag[FLAG_DESC] = "Creating node " + key + " for cluster " + clusterName
+    #flag[BATCH_ID] = batch_id
+    #flag[TASKTYPE] = CLUSTER_ADD
+    #flag[FLAG_DESC] = "Creating node " + key + " for cluster " + clusterName
+    flag.manage_addProperty(BATCH_ID,batch_id, "string")
+    flag.manage_addProperty(TASKTYPE,CLUSTER_ADD, "string")
+    flag.manage_addProperty(FLAG_DESC,"Creating node " + key + " for cluster " + clusterName, "string")
   
 
 def validateAddClusterNode(self, request):
@@ -912,9 +915,12 @@
   #Now we need to annotate the new DB object
   objpath = path + "/" + objname
   flag = self.restrictedTraverse(objpath)
-  flag[BATCH_ID] = batch_id
-  flag[TASKTYPE] = SERVICE_START
-  flag[FLAG_DESC] = "Starting service " + svcname
+  #flag[BATCH_ID] = batch_id
+  #flag[TASKTYPE] = SERVICE_START
+  #flag[FLAG_DESC] = "Starting service " + svcname
+  flag.manage_addProperty(BATCH_ID,batch_id, "string")
+  flag.manage_addProperty(TASKTYPE,SERVICE_START, "string")
+  flag.manage_addProperty(FLAG_DESC,"Starting service " + svcname, "string")
 
   response = req.RESPONSE
   response.redirect(req['HTTP_REFERER'] + "&busyfirst=true")
@@ -936,9 +942,12 @@
   #Now we need to annotate the new DB object
   objpath = path + "/" + objname
   flag = self.restrictedTraverse(objpath)
-  flag[BATCH_ID] = batch_id
-  flag[TASKTYPE] = SERVICE_RESTART
-  flag[FLAG_DESC] = "Restarting service " + svcname 
+  #flag[BATCH_ID] = batch_id
+  #flag[TASKTYPE] = SERVICE_RESTART
+  #flag[FLAG_DESC] = "Restarting service " + svcname 
+  flag.manage_addProperty(BATCH_ID,batch_id, "string")
+  flag.manage_addProperty(TASKTYPE,SERVICE_RESTART, "string")
+  flag.manage_addProperty(FLAG_DESC,"Restarting service " + svcname, "string")
 
   response = req.RESPONSE
   response.redirect(req['HTTP_REFERER'] + "&busyfirst=true")
@@ -959,9 +968,12 @@
   #Now we need to annotate the new DB object
   objpath = path + "/" + objname
   flag = self.restrictedTraverse(objpath)
-  flag[BATCH_ID] = batch_id
-  flag[TASKTYPE] = SERVICE_STOP
-  flag[FLAG_DESC] = "Stopping service " + svcname
+  #flag[BATCH_ID] = batch_id
+  #flag[TASKTYPE] = SERVICE_STOP
+  #flag[FLAG_DESC] = "Stopping service " + svcname
+  flag.manage_addProperty(BATCH_ID,batch_id,"string")
+  flag.manage_addProperty(TASKTYPE,SERVICE_STOP, "string")
+  flag.manage_addProperty(FLAG_DESC,"Stopping service " + svcname,"string")
 
   time.sleep(2)
 
@@ -1315,7 +1327,7 @@
     #Check here for more than 1 entry (an error)
     ricci = item[0].split("____") #This removes the 'flag' suffix
     rb = ricci_bridge(ricci[0])
-    finished = rb.checkBatch(item[1][BATCH_ID]) 
+    finished = rb.checkBatch(item[1].getProperty(BATCH_ID)) 
     if finished == True:
       clusterfolder.manage_delObjects(item[0])
       return map


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