All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/site/luci/Extensions LuciZope.py He ...
Date: 12 Dec 2007 15:48:32 -0000	[thread overview]
Message-ID: <20071212154832.5041.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-12-12 15:48:30

Modified files:
	luci/site/luci/Extensions: LuciZope.py HelperFunctions.py 
	                           LuciZopeAsync.py LuciZopeExternal.py 

Log message:
	More shuffling stuff around to use the new form validation

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZope.py.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/HelperFunctions.py.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeAsync.py.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeExternal.py.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- conga/luci/site/luci/Extensions/LuciZope.py	2007/08/20 16:31:13	1.5
+++ conga/luci/site/luci/Extensions/LuciZope.py	2007/12/12 15:48:29	1.6
@@ -145,3 +145,22 @@
 					pval = None
 		ret[i] = pval
 	return ret
+
+def getClusterURL(self, request, model):
+	try:
+		clustername = request['clustername'].strip()
+		if not clustername:
+			raise Exception, 'cluster name from request is blank'
+	except:
+		try:
+			clustername = model.getClusterName()
+			if not clustername:
+				raise Exception, 'cluster name from model is blank'
+		except:
+			if LUCI_DEBUG_MODE is True:
+				luci_log.debug_verbose('GCURL0: unable to get cluster name')
+			return ''
+
+	return '/luci/cluster/index_html?pagetype=7&clustername=%s' % clustername
+
+
--- conga/luci/site/luci/Extensions/HelperFunctions.py	2007/09/24 21:19:42	1.10
+++ conga/luci/site/luci/Extensions/HelperFunctions.py	2007/12/12 15:48:29	1.11
@@ -53,7 +53,8 @@
 					args.insert(0, rc)
 					r['batch_result'] = self.query_func(*args)
 			except Exception, e:
-				pass
+				r['error'] = True
+				r['err_msg'] = '%s' % str(e)
 
 			self.mutex.acquire()
 			self.riccis[host] = r
--- conga/luci/site/luci/Extensions/LuciZopeAsync.py	2007/09/25 04:00:24	1.3
+++ conga/luci/site/luci/Extensions/LuciZopeAsync.py	2007/12/12 15:48:30	1.4
@@ -178,5 +178,11 @@
 				% (request['nodenames'], e, str(e)))
 		write_err_async(request, 'Error retrieving information')
 		return None
-	xml_obj = result_to_xml(True, { 'result': ret })
+	xml_obj = result_to_xml((True, { 'result': ret }))
+	write_xml_resp(request, xml_obj)
+
+def validate_clusvc_async(self, request):
+	from LuciValidation import validate_clusvc_add
+	ret = validate_clusvc_add(self, request)
+	xml_obj = result_to_xml((True, { 'result': ret }))
 	write_xml_resp(request, xml_obj)
--- conga/luci/site/luci/Extensions/LuciZopeExternal.py	2007/08/08 21:00:07	1.3
+++ conga/luci/site/luci/Extensions/LuciZopeExternal.py	2007/12/12 15:48:30	1.4
@@ -14,11 +14,10 @@
 	getDefaultUser
 
 from cluster_adapters import clusterTaskProcess, \
-	resourceAdd, resourceDelete, serviceDelete, \
-	getClusterURL, getSystemLogs, getRicciAgentForCluster, \
+	resourceDelete, serviceDelete, \
 	isClusterBusy, nodeTaskProcess, process_cluster_conf_editor, \
 	serviceMigrate, serviceRestart, serviceStart, serviceStop, \
-	getResourceInfo
+	getResourceInfo, getSystemLogs
 
 from HelperFunctions import add_commas, bytes_to_value_units, convert_bytes
 
@@ -28,12 +27,15 @@
 	getNodeInfo, getnodes, getNodesInfo, getResourcesInfo, \
 	getServiceInfo, getServicesInfo, getVMInfo, getClusterOS
 
+from LuciClusterActions import getRicciAgentForCluster
+
 from LuciDB import access_to_host_allowed, allowed_systems, \
 	check_clusters, getRicciAgent, getSystems, getClusters, \
 	getStorage
 
 from LuciZope import appendModel, bytes_to_value_prefunits, \
-	set_persistent_var, strFilter, getTabs, siteIsSetup
+	set_persistent_var, strFilter, getTabs, siteIsSetup, \
+	getClusterURL
 
 from LuciZopeClusterPortal import createCluChooser, createCluConfigTree
 
@@ -52,4 +54,4 @@
 
 from system_adapters import get_sys_svc_list, validate_manage_svc
 
-from LuciZopeAsync import get_cluster_nodes_async, get_sysinfo_async
+from LuciZopeAsync import get_cluster_nodes_async, get_sysinfo_async, validate_clusvc_async



                 reply	other threads:[~2007-12-12 15:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071212154832.5041.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.