[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	2007-01-30 21:05:17

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

Log message:
	Fix for VM forms

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/29 23:30:00	1.215
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/30 21:05:15	1.216
@@ -4720,6 +4720,20 @@
   setClusterConf(rc, stringbuf)
 
 def getXenVMInfo(self, model, request):
+  map = {}
+  baseurl = request['URL']
+  clustername = request['clustername']
+  svcname = None
+  try:
+    svcname = request['servicename']
+  except KeyError, e:
+    svcname = None
+  urlstring = baseurl + "?" + clustername + "&pagetype=29"
+  if svc != None:
+    urlstring = urlstring + "&servicename=" + svcname
+
+  map['formurl'] = urlstring
+
 	try:
 		xenvmname = request['servicename']
 	except:
@@ -4727,16 +4741,19 @@
 			xenvmname = request.form['servicename']
 		except:
 			luci_log.debug_verbose('servicename is missing from request')
-			return {}
+			return map
 
 	try:
 		xenvm = model.retrieveXenVMsByName(xenvmname)
 	except:
 		luci_log.debug('An error occurred while attempting to get VM %s' \
 			% xenvmname)
-		return {}
+		return map
 
-	map = xenvm.getAttributes()
+	attrs= xenvm.getAttributes()
+  keys = attrs.keys()
+  for key in keys:
+    map[key] = attrs[key]
 	return map
 
 def isClusterBusy(self, req):


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