Skip to contentSkip to conversation

conga/luci cluster/resource-form-macros cluste ...

Cluster-devel [email protected] 1 participant 1 message Jun 14, 2007

lore
Share & tools
lore
#0 lore raw

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

luci/cluster/resource-form-macros +213 -0
@@ -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"
luci/cluster/resource_form_handlers.js +16 -1
@@ -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);
 }
 
luci/site/luci/Extensions/Attic/LuciClusterActions.py +1 -1
@@ -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
 
luci/site/luci/Extensions/Attic/RicciQueries.py +0 -1
@@ -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
luci/site/luci/Extensions/cluster_adapters.py +55 -31

234 lines not on this page · raw message

luci/site/luci/Extensions/conga_constants.py +4 -1
@@ -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).