[Cluster-devel] conga/luci cluster/resource-form-macros cluste ...

rmccabe at sourceware.org rmccabe at sourceware.org
Thu Jun 14 19:30:45 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	EXPERIMENTAL
Changes by:	rmccabe at sourceware.org	2007-06-14 19:30:44

Modified files:
	luci/cluster   : resource-form-macros resource_form_handlers.js 
	luci/site/luci/Extensions: LuciClusterActions.py RicciQueries.py 
	                           cluster_adapters.py 
	                           conga_constants.py 

Log message:
	Resolve bz239596

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.37.2.3&r2=1.37.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.34.2.1&r2=1.34.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterActions.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.7&r2=1.1.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RicciQueries.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.8&r2=1.1.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.255.2.15&r2=1.255.2.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.39.2.9&r2=1.39.2.10

--- conga/luci/cluster/resource-form-macros	2007/06/07 06:41:05	1.37.2.3
+++ conga/luci/cluster/resource-form-macros	2007/06/14 19:30:44	1.37.2.4
@@ -125,6 +125,8 @@
 			<option name="OPENLDAP" value="OPENLDAP">Open LDAP</option>
 			<option name="POSTGRES-8" value="POSTGRES-8">PostgreSQL 8</option>
 			<option name="TOMCAT-5" value="TOMCAT-5">Tomcat 5</option>
+			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
+			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 		</select>
 		</form>
 	</p>
@@ -172,6 +174,8 @@
 			<option name="OPENLDAP" value="OPENLDAP">Open LDAP</option>
 			<option name="POSTGRES-8" value="POSTGRES-8">PostgreSQL 8</option>
 			<option name="TOMCAT-5" value="TOMCAT-5">Tomcat 5</option>
+			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
+			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 		</select>
 		</form>
 	</p>
@@ -1176,10 +1180,219 @@
 
 <div class="rescfg" name="SAPInstance"
 	tal:attributes="id res/name | nothing" metal:define-macro="SAPInstance_macro">
+	<p class="reshdr">SAP Instance Configuration</p>
+
+	<form method="post"
+		tal:attributes="name res/parent_uuid | nothing"
+		tal:define="editDisabled resourceIsRef | nothing">
+
+	<input name="immutable" type="hidden" value="true"
+		tal:condition="editDisabled" />
+
+	<input name="edit" type="hidden" value="true"
+		tal:condition="python: ptype == '33' and True or False" />
+
+	<input name="pagetype" type="hidden"
+		tal:attributes="value python: ptype" />
+
+	<input name="global" type="hidden"
+		tal:attributes="value resourceIsRef | nothing" />
+
+	<input name="parent_uuid" type="hidden"
+		tal:attributes="value res/parent_uuid | nothing" />
+
+	<input name="uuid" type="hidden"
+		tal:attributes="value res/uuid | nothing" />
+
+	<input name="tree_level" type="hidden"
+		tal:attributes="value res/indent_ctr | string:0" />
+
+	<input name="clustername" type="hidden"
+		tal:attributes="
+			value request/clustername | request/form/clustername | nothing" />
+
+	<input name="oldname" type="hidden"
+		tal:attributes="value res/name | nothing" />
+
+	<input name="type" type="hidden" value="SAPInstance" />
+
+	<table class="systemsTable">
+		<tr class="systemsTable">
+			<td class="systemsTable">SAP Instance Name</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="resourceName"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/name | nothing" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path to sapstartsrv and sapcontrol">SAP executable directory</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="DIR_EXECUTABLE"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/DIR_EXECUTABLE | nothing" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path to the directory containing the SAP START profile">Directory containing the SAP START profile</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="DIR_PROFILE"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/DIR_PROFILE | nothing" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td class="systemsTable">Name of the SAP START profile</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="START_PROFILE"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/START_PROFILE | nothing" />
+			</td>
+		</tr>
+	</table>
+	<div metal:use-macro="here/resource-form-macros/macros/res_form_footer" />
+	</form>
 </div>
 
 <div class="rescfg" name="SAPDatabase"
 	tal:attributes="id res/name | nothing" metal:define-macro="SAPDatabase_macro">
+	<p class="reshdr">SAP Database Configuration</p>
+
+	<form method="post"
+		tal:attributes="name res/parent_uuid | nothing"
+		tal:define="editDisabled resourceIsRef | nothing">
+
+	<input name="immutable" type="hidden" value="true"
+		tal:condition="editDisabled" />
+
+	<input name="edit" type="hidden" value="true"
+		tal:condition="python: ptype == '33' and True or False" />
+
+	<input name="pagetype" type="hidden"
+		tal:attributes="value python: ptype" />
+
+	<input name="global" type="hidden"
+		tal:attributes="value resourceIsRef | nothing" />
+
+	<input name="parent_uuid" type="hidden"
+		tal:attributes="value res/parent_uuid | nothing" />
+
+	<input name="uuid" type="hidden"
+		tal:attributes="value res/uuid | nothing" />
+
+	<input name="tree_level" type="hidden"
+		tal:attributes="value res/indent_ctr | string:0" />
+
+	<input name="clustername" type="hidden"
+		tal:attributes="
+			value request/clustername | request/form/clustername | nothing" />
+
+	<input name="oldname" type="hidden"
+		tal:attributes="value res/name | nothing" />
+
+	<input name="type" type="hidden" value="SAPDatabase" />
+
+	<table class="systemsTable">
+		<tr class="systemsTable">
+			<td class="systemsTable">SAP Database Name</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="resourceName"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/name | nothing" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path to sapstartsrv and sapcontrol">SAP executable directory</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="DIR_EXECUTABLE"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/DIR_EXECUTABLE | nothing" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">Database type</td>
+			<td class="systemsTable">
+				<select name="DBTYPE"
+					tal:attributes="disabled python: editDisabled">
+					<option value=""
+						tal:attributes="checked python:(not editDisabled and not res.has_key('DB_TYPE'))">Select a SAP database type</option>
+					<option value="ORA"
+						tal:attributes="checked python:(res.has_key('DBTYPE') and res['DBTYPE'] == 'ORA') and 'checked' or ''">Oracle
+					</option>
+
+					<option value="DB6"
+						tal:attributes="checked python:(res.has_key('DBTYPE') and res['DBTYPE'] == 'DB6') and 'checked' or ''">DB6
+					</option>
+
+					<option value="ADA"
+						tal:attributes="checked python:(res.has_key('DBTYPE') and res['DBTYPE'] == 'ADA') and 'checked' or ''">ADA
+					</option>
+				</select>
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">Oracle TNS listener name</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="NETSERVICENAME"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/NETSERVICENAME | nothing" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">ABAP stack is not installed, only Java stack is installed</td>
+			<td class="systemsTable">
+				<input type="checkbox" name="DBJ2EE_ONLY"
+					tal:attributes="
+						disabled python: editDisabled;
+						checked python:res.has_key('DBJ2EE_ONLY') and 'checked' or ''" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path to the J2EE instance bootstrap directory">J2EE instance bootstrap directory</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="DIR_BOOTSTRAP"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/DIR_BOOTSTRAP | nothing" />
+			</td>
+		</tr>
+
+		<tr class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path to the J2EE security store directory">J2EE security store path</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="DIR_SECSTORE"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/DIR_SECSTORE | nothing" />
+			</td>
+		</tr>
+	</table>
+	<div metal:use-macro="here/resource-form-macros/macros/res_form_footer" />
+	</form>
 </div>
 
 <div class="rescfg" name="MYSQL"
--- conga/luci/cluster/resource_form_handlers.js	2007/06/07 06:41:05	1.34.2.1
+++ conga/luci/cluster/resource_form_handlers.js	2007/06/14 19:30:44	1.34.2.2
@@ -238,8 +238,23 @@
 	return (errors);
 }
 
-function validate_sapinstance(form) {
+function validate_sapdatabase(form) {
 	var errors = new Array();
+
+	if (!form.DBTYPE.options || form.DBTYPE.options.selectedIndex <= 0) {
+		errors.push('No SAP Database type was given.');
+		set_form_err(form.DBTYPE);
+	} else {
+		var dbtype = form.DBTYPE.options[form.DBTYPE.options.selectedIndex].value;
+		if (!dbtype) {
+			errors.push('No SAP Database type was given.');
+			set_form_err(form.DBTYPE);
+		} else if (dbtype != 'ORA' && dbtype != 'DB6' && dbtype != 'ADA') {
+			errors.push("An invalid SAP Database type was given: " + dbtype);
+			set_form_err(form.DBTYPE);
+		} else
+			clr_form_err(form.DBTYPE);
+	}
 	return (errors);
 }
 
--- conga/luci/site/luci/Extensions/Attic/LuciClusterActions.py	2007/05/30 05:54:01	1.1.2.7
+++ conga/luci/site/luci/Extensions/Attic/LuciClusterActions.py	2007/06/14 19:30:44	1.1.2.8
@@ -262,7 +262,7 @@
 
 	if NodeBusy(self, clustername, nodename_resolved, rc) is not False:
 		if LUCI_DEBUG_MODE is True:
-			luci_log.debug('NC1: %s is busy, can\'t leave cluster yet.' \
+			luci_log.debug('NLC1: %s is busy, can\'t leave cluster yet.' \
 				% nodename_resolved)
 		return None
 
--- conga/luci/site/luci/Extensions/Attic/RicciQueries.py	2007/06/13 15:54:42	1.1.2.8
+++ conga/luci/site/luci/Extensions/Attic/RicciQueries.py	2007/06/14 19:30:44	1.1.2.9
@@ -5,7 +5,6 @@
 # GNU General Public License as published by the
 # Free Software Foundation.
 
-import xml.dom
 from xml.dom import minidom
 from ricci_communicator import RicciCommunicator, extract_module_status
 from LuciSyslog import get_logger
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/06/13 15:54:42	1.255.2.15
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/06/14 19:30:44	1.255.2.16
@@ -40,7 +40,8 @@
 	NODES, POSSIBLE_REBOOT_MESSAGE, PRE_CFG, PRE_INSTALL, PRE_JOIN, \
 	REBOOT_TASK, REDIRECT_MSG, RESOURCES, RICCI_CONNECT_FAILURE, \
 	RICCI_CONNECT_FAILURE_MSG, SEND_CONF, SERVICE_ADD, SERVICE_CONFIG, \
-	SERVICE_LIST, SERVICES, START_NODE, TASKTYPE, VM_ADD, VM_CONFIG
+	SERVICE_LIST, SERVICES, START_NODE, TASKTYPE, VM_ADD, VM_CONFIG, \
+	REDIRECT_SEC
 
 from FenceHandler import validateNewFenceDevice, \
 	validateFenceDevice, validate_fenceinstance, \
@@ -2676,6 +2677,8 @@
 	elif task == CLUSTER_DELETE:
 		from LuciClusterActions import ClusterDelete
 		ret = ClusterDelete(self, model)
+		if LUCI_DEBUG_MODE is True:
+			luci_log.debug_verbose('CTP3: ret is %s' % str(e))
 		if ret is not None:
 			redirect_page = ret
 	else:
@@ -2830,7 +2833,7 @@
 	items = getClusterFlags(self, cluname)
 	if not items or len(items) < 1:
 		if LUCI_DEBUG_MODE is True:
-			luci_log.debug_verbose('ICB3: NOT BUSY: no flags for cluster %s' \
+			luci_log.debug_verbose('ICB1: NOT BUSY: no flags for cluster %s' \
 				% cluname)
 		# This returns an empty map, and indicates not busy
 		return busy_map
@@ -2838,7 +2841,7 @@
 	clusterfolder = getClusterDBObj(self, cluname)
 	
 	if LUCI_DEBUG_MODE is True:
-		luci_log.debug_verbose('ICB6: %s is busy: %d flags' \
+		luci_log.debug_verbose('ICB2: %s is busy: %d flags' \
 			% (cluname, len(items)))
 	busy_map['busy'] = 'true'
 
@@ -2865,17 +2868,23 @@
 
 	for item in items:
 		tasktype = item[1].getProperty(TASKTYPE)
+		if LUCI_DEBUG_MODE is True:
+			luci_log.debug_verbose('ICB3: task type for %s = %s' \
+				% (item[0], tasktype))
+
 		if tasktype == CLUSTER_ADD or tasktype == NODE_ADD:
 			node_report = {}
 			node_report['isnodecreation'] = True
-			node_report['iserror'] = False #Default value
+			# Default value
+			node_report['iserror'] = False
 			node_report['desc'] = item[1].getProperty(FLAG_DESC)
+
 			batch_xml = None
 			# This removes the 'flag' suffix
 			ricci = item[0].split('____')
 
 			if LUCI_DEBUG_MODE is True:
-				luci_log.debug_verbose('ICB6A: using rc host %s for item %s' \
+				luci_log.debug_verbose('ICB4: using rc host %s for item %s' \
 					% (ricci[0], item[0]))
 
 			try:
@@ -2883,11 +2892,11 @@
 				if not rc:
 					rc = None
 					if LUCI_DEBUG_MODE is True:
-						luci_log.debug_verbose('ICB6b: rc is none')
+						luci_log.debug_verbose('ICB5: rc is none')
 			except Exception, e:
 				rc = None
 				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('ICB7: RC: %s: %r %s' \
+					luci_log.debug_verbose('ICB6: RC: %s: %r %s' \
 						% (cluname, e, str(e)))
 
 			batch_id = None
@@ -2895,44 +2904,46 @@
 				try:
 					batch_id = item[1].getProperty(BATCH_ID)
 					if LUCI_DEBUG_MODE is True:
-						luci_log.debug_verbose('ICB8: got batch_id %s from %s' \
+						luci_log.debug_verbose('ICB7: got batch_id %s from %s' \
 							% (batch_id, item[0]))
 				except Exception, e:
 					if LUCI_DEBUG_MODE is True:
-						luci_log.debug_verbose('ICB8B: failed to get batch_id from %s: %r %s' % (item[0], e, str(e)))
+						luci_log.debug_verbose('ICB8: failed to get batch_id from %s: %r %s' % (item[0], e, str(e)))
 
 				if batch_id is not None:
 					try:
 						batch_xml = rc.batch_report(batch_id)
 						if batch_xml is not None:
 							if LUCI_DEBUG_MODE is True:
-								luci_log.debug_verbose('ICB8D: batch_xml for %s from batch_report is not None -- getting batch status' % batch_id)
+								luci_log.debug_verbose('ICB9: batch_xml for %s from batch_report is not None -- getting batch status' % batch_id)
 							(creation_status, total) = batch_status(batch_xml)
 							try:
 								if LUCI_DEBUG_MODE is True:
-									luci_log.debug_verbose('ICB8E: batch status returned (%d,%d)' % (creation_status, total))
+									luci_log.debug_verbose('ICB10: batch status returned (%d,%d)' % (creation_status, total))
 							except:
 								if LUCI_DEBUG_MODE is True:
-									luci_log.debug_verbose('ICB8F: error logging batch status return')
+									luci_log.debug_verbose('ICB11: error logging batch status return')
 						else:
 							if LUCI_DEBUG_MODE is True:
-								luci_log.debug_verbose('ICB9: batch_xml for cluster is None')
+								luci_log.debug_verbose('ICB12: batch_xml for cluster is None')
 					except Exception, e:
 						if LUCI_DEBUG_MODE is True:
-							luci_log.debug_verbose('ICB9A: error getting batch_xml from rc.batch_report: %r %s' % (e, str(e)))
-					# No contact with ricci (-1000)
-					creation_status = RICCI_CONNECT_FAILURE
-					# set to avoid next if statement
-					batch_xml = 'bloody_failure'
+							luci_log.debug_verbose('ICB13: error getting batch_xml from rc.batch_report: %r %s' % (e, str(e)))
+						# No contact with ricci (-1000)
+						creation_status = RICCI_CONNECT_FAILURE
+						# set to avoid next if statement
+						batch_xml = 'bloody_failure'
 
 			if rc is None or batch_id is None:
 				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('ICB12: unable to connect to a ricci agent for cluster %s to get batch status')
+					luci_log.debug_verbose('ICB14: unable to connect to a ricci agent for cluster %s to get batch status')
 				# No contact with ricci (-1000)
 				creation_status = RICCI_CONNECT_FAILURE
 				# set to avoid next if statement
 				batch_xml = 'bloody_bloody_failure'
 
+			luci_log.debug_verbose('ICB15: batch xml: %r' % batch_xml)
+
 			if batch_xml is None:
 				# The job is done and gone from queue
 				if redirect_message is False:
@@ -2944,17 +2955,23 @@
 					redirect_message = True
 
 				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('ICB13: batch job is done -- deleting %s' % item[0])
+					luci_log.debug_verbose('ICB16: batch job is done -- deleting %s' % item[0])
 				clusterfolder.manage_delObjects([item[0]])
 				continue
 
 			del_db_obj = False
+
 			if creation_status < 0:
 				# an error was encountered
 				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('ICB13a: %s: CS %d for %s' % (cluname, creation_status, ricci[0]))
+					luci_log.debug_verbose('ICB17: %s: CS %d for %s' \
+						% (cluname, creation_status, ricci[0]))
+
 				if creation_status == RICCI_CONNECT_FAILURE:
 					laststatus = item[1].getProperty(LAST_STATUS)
+					if LUCI_DEBUG_MODE is True:
+						luci_log.debug_verbose('ICB18: last statis is %d' \
+							% laststatus)
 
 					if laststatus == INSTALL_TASK:
 						# The node may be rebooting
@@ -3016,12 +3033,12 @@
 				try:
 					if del_db_obj is True:
 						if LUCI_DEBUG_MODE is True:
-							luci_log.debug_verbose('ICB13a: %s node creation failed for %s: %d: deleting DB entry' % (cluname, ricci[0], creation_status))
+							luci_log.debug_verbose('ICB19: %s node creation failed for %s: %d: deleting DB entry' % (cluname, ricci[0], creation_status))
 						clusterfolder.manage_delObjects([ricci[0]])
 						clusterfolder.manage_delObjects([item[0]])
 				except Exception, e:
 					if LUCI_DEBUG_MODE is True:
-						luci_log.debug_verbose('ICB14: delObjects: %s: %r %s' \
+						luci_log.debug_verbose('ICB20: delObjects: %s: %r %s' \
 							% (item[0], e, str(e)))
 
 				nodereports.append(node_report)
@@ -3029,7 +3046,7 @@
 			else:
 				# either the batch completed successfully, or it's still running
 				if creation_status == total:
-					#finished...
+					# finished...
 					busy_map['busy'] = 'true'
 					node_report['statusmessage'] = 'Node created successfully. %s' % REDIRECT_MSG
 					node_report['statusindex'] = creation_status
@@ -3039,7 +3056,7 @@
 						clusterfolder.manage_delObjects([item[0]])
 					except Exception, e:
 						if LUCI_DEBUG_MODE is True:
-							luci_log.info('ICB15: Unable to delete %s: %r %s' \
+							luci_log.info('ICB21: Unable to delete %s: %r %s' \
 								% (item[0], e, str(e)))
 					continue
 				else:
@@ -3054,9 +3071,12 @@
 					try:
 						item[1].manage_delProperties(propslist)
 						item[1].manage_addProperty(LAST_STATUS, creation_status, 'int')
+						if LUCI_DEBUG_MODE is True:
+							luci_log.debug_verbose('ICB22: last status -> %d' \
+								% creation_status)
 					except Exception, e:
 						if LUCI_DEBUG_MODE is True:
-							luci_log.debug_verbose('ICB16: last_status err: %s %d: %r %s' % (item[0], creation_status, e, str(e)))
+							luci_log.debug_verbose('ICB23: last_status err: %s %d: %r %s' % (item[0], creation_status, e, str(e)))
 					continue
 		else:
 			node_report = {}
@@ -3072,7 +3092,7 @@
 				err_msg = ''
 
 				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('ICB15: ricci error: %s: %r %s' \
+					luci_log.debug_verbose('ICB24: ricci error: %s: %r %s' \
 						% (ricci[0], e, str(e)))
 
 			if rc is not None:
@@ -3097,7 +3117,7 @@
 					clusterfolder.manage_delObjects([item[0]])
 				except Exception, e:
 					if LUCI_DEBUG_MODE is True:
-						luci_log.info('ICB16: Unable to delete %s: %r %s' \
+						luci_log.info('ICB25: Unable to delete %s: %r %s' \
 						% (item[0], e, str(e)))
 				busy_map['busy'] = None
 			else:
@@ -3116,14 +3136,18 @@
 			part2 = dex
 		except:
 			pass
-		busy_map['refreshurl'] = '3; url=%s?%s' % (part1, part2)
+		busy_map['refreshurl'] = '%d; url=%s?%s' % (REDIRECT_SEC, part1, part2)
 		req['specialpagetype'] = '1'
 	else:
 		try:
 			query = req['QUERY_STRING'].replace('&busyfirst=true', '')
-			busy_map['refreshurl'] = '3; url=%s?%s' % (req['ACTUAL_URL'], query)
+			busy_map['refreshurl'] = '%d; url=%s?%s' \
+				% (REDIRECT_SEC, req['ACTUAL_URL'], query)
 		except:
-			busy_map['refreshurl'] = '3; url=/luci/cluster?pagetype=3'
+			busy_map['refreshurl'] = '%d; url=/luci/cluster?pagetype=3' \
+				% REDIRECT_SEC
+	if LUCI_DEBUG_MODE is True:
+		luci_log.debug_verbose('ICB26: returning busy_map: %s' % str(busy_map))
 	return busy_map
 
 # These are called from external methods.
--- conga/luci/site/luci/Extensions/conga_constants.py	2007/06/08 18:26:14	1.39.2.9
+++ conga/luci/site/luci/Extensions/conga_constants.py	2007/06/14 19:30:44	1.39.2.10
@@ -133,6 +133,8 @@
 	'A problem occurred when starting this node: %s'
 ]
 
+REDIRECT_SEC = 3
+
 # cluster/node create error status messages
 PRE_INSTALL = 'The install state is not yet complete.'
 PRE_REBOOT	= 'Installation complete, but reboot not yet complete.'
@@ -141,7 +143,8 @@
 
 POSSIBLE_REBOOT_MESSAGE = 'This node is not currently responding and is probably rebooting as planned. This state could persist for 5 minutes or so...'
 
-REDIRECT_MSG = ' -- You will be redirected in 5 seconds.'
+REDIRECT_MSG = ' -- You will be redirected in %d seconds.' % REDIRECT_SEC
+
 
 # Debugging parameters. Set LUCI_DEBUG_MODE to True and LUCI_DEBUG_VERBOSITY
 # to >= 2 to get full debugging output in syslog (LOG_DAEMON/LOG_DEBUG).




More information about the Cluster-devel mailing list