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

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



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2007-02-01 23:48:51

Modified files:
	luci/cluster   : form-macros validate_config_gulm.js 
	luci/site/luci/Extensions: cluster_adapters.py 

Log message:
	Allow addition of external GULM lockservers in the GULM properties tab after a cluster has been deployed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.171&r2=1.172
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_gulm.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.224&r2=1.225

--- conga/luci/cluster/form-macros	2007/02/01 20:49:08	1.171
+++ conga/luci/cluster/form-macros	2007/02/01 23:48:51	1.172
@@ -1291,8 +1291,45 @@
 						</td>
 					</tr>
 				</tal:block>
+
+				<tr><td colspan="2">
+					<div class="spacing" />
+					<p><em class="cluster">You may have exactly 1, 3, or 5 GULM lock servers, in any combination of the hosts checked above and given below.</em></p>
+				</td></tr>
+
+				<tr>
+					<td class="pad_right">External Lock Server 1</td>
+					<td>
+						<input type="text" name="__GULM__:server1" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 2</td>
+					<td>
+						<input type="text" name="__GULM__:server2" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 3</td>
+					<td>
+						<input type="text" name="__GULM__:server3" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 4</td>
+					<td>
+						<input type="text" name="__GULM__:server4" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 5</td>
+					<td>
+						<input type="text" name="__GULM__:server5" value="" />
+					</td>
+				</tr>
 			</tbody>
 		</table>
+
 		<div class="spacing configTabContent"></div>
 		<div class="hbSubmit spacing configTabContent">
 			<input type="button" value="Apply"
--- conga/luci/cluster/validate_config_gulm.js	2007/01/24 19:45:43	1.2
+++ conga/luci/cluster/validate_config_gulm.js	2007/02/01 23:48:51	1.3
@@ -4,9 +4,9 @@
 
 	var elem = form.getElementsByTagName('input');
 	for (var i = 0 ; i < elem.length ; i++) {
-		if (elem[i].type != 'checkbox')
-			continue;
-		if (elem[i].checked)
+		if (elem[i].type == 'text' && !str_is_blank(elem[i].value))
+			lscount++;
+		else if (elem[i].type == 'checkbox' && elem[i].checked)
 			lscount++;
 	}
 
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/02/01 20:49:08	1.224
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/02/01 23:48:51	1.225
@@ -1185,6 +1185,7 @@
 	gulm_ptr = model.getGULMPtr()
 	if not gulm_ptr:
 		return (False, {'errors': [ 'This cluster appears not to be using GULM locking.' ]})
+
 	node_list = map(lambda x: x.getName(), gulm_ptr.getChildren())
 	for i in map(lambda x: x.getName(), model.getNodes()):
 		if not i in node_list:
@@ -1197,6 +1198,17 @@
 			ls.addAttribute('name', node)
 			gulm_lockservers.append(ls)
 
+	try:
+		xlockservers = filter(lambda x: x.strip(), form['__GULM__'])
+	except:
+		xlockservers = list()
+
+	for i in xlockservers:
+		if not i in node_list:
+			ls = Lockserver()
+			ls.addAttribute('name', i)
+			gulm_lockservers.append(ls)
+
 	num_ls = len(gulm_lockservers)
 	if not num_ls in (1, 3, 5):
 		return (False, {'errors': [ 'You must have exactly 1, 3, or 5 GULM lock servers. You submitted %d lock servers.' % num_ls ]})


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