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 cluster/form-macros cluster/validat ...
Date: 1 Feb 2007 23:48:52 -0000	[thread overview]
Message-ID: <20070201234852.6071.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at 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 ]})



             reply	other threads:[~2007-02-01 23:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 23:48 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-24 22:01 [Cluster-devel] conga/luci cluster/form-macros cluster/validat rmccabe
2007-08-24 21:55 rmccabe
2007-08-24 18:42 rmccabe
2007-08-24 18:40 rmccabe
2007-08-09  4:37 rmccabe
2007-08-09  4:34 rmccabe
2007-02-24  7:02 rmccabe
2007-02-16  5:29 rmccabe
2007-02-16  5:26 rmccabe
2007-02-12 23:28 rmccabe
2007-02-12 23:26 rmccabe
2007-02-09 18:32 rmccabe
2007-02-09 18:30 rmccabe
2007-02-08  3:43 rmccabe
2007-02-08  2:34 rmccabe
2007-01-25 19:55 rmccabe

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=20070201234852.6071.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.