[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-08-01 15:04:09

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

Log message:
	busy-wait for adding a resource

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/07/31 18:21:52	1.25
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/08/01 15:04:09	1.26
@@ -1455,7 +1455,8 @@
            'nfsc': addNfsx,
            'scr': addScr,
            'smb': addSmb}
-                                                                                
+  
+  
   type = request.form["type"]
   res = types[type](request)
   modelb = request.SESSION.get('model')
@@ -1469,7 +1470,22 @@
   else:
     return "Some error occured in setClusterConf\n"
 
-  return "Resource Added"
+  clustername = request['clustername']
+  path = CLUSTER_FOLDER_PATH + clustername
+  clusterfolder = self.restrictedTraverse(path)
+  batch_id = str(batch_number)
+  objname = ricci_agent + "____flag"
+  clusterfolder.manage_addProduct['ManagedSystem'].addManagedSystem(objname)
+   #Now we need to annotate the new DB object
+  objpath = path + "/" + objname
+  flag = self.restrictedTraverse(objpath)
+  flag.manage_addProperty(BATCH_ID,batch_id, "string")
+  flag.manage_addProperty(TASKTYPE,RESOURCE_ADD, "string")
+  flag.manage_addProperty(FLAG_DESC,"Creating Resource \'" + request.form['resourcename'] + "\'", "string")
+
+  response = req.RESPONSE
+  response.redirect(req['HTTP_REFERER'] + "&busyfirst=true")
+
 
 def getResourceForEdit(modelb, name):
   resources = modelb.getResourcesPtr().getChildren()


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