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

[Cluster-devel] conga ./download_files luci/cluster/form-macro ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2007-01-29 16:56:51

Modified files:
	.              : download_files 
	luci/cluster   : form-macros resource-form-macros 
	                 validate_config_general.js 
	luci/homebase  : validate_cluster_add.js 
	luci/site/luci/Extensions: cluster_adapters.py 

Log message:
	- use the newest version of zope available (2.9.6)
	- do not allow clusters to be created or renamed if the cluster name is > 15 characters long (bz225164)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/download_files.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.163&r2=1.164
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_general.js.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add.js.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.213&r2=1.214

--- conga/download_files	2007/01/23 22:32:29	1.4
+++ conga/download_files	2007/01/29 16:56:50	1.5
@@ -8,10 +8,10 @@
 #ZOPE_URLs="http://www.zope.org/Products/Zope/2.9.3/Zope-2.9.3.tgz";
 
 
-ZOPE_ARCHIVE=Zope-2.9.4-final
-ZOPE_ARCHIVE_TAR=Zope-2.9.4-final.tgz
-ZOPE_MD5SUM=7d7ffe62eabc84d0c438e450e344c29f
-ZOPE_URLs="http://www.zope.org/Products/Zope/2.9.4/Zope-2.9.4-final.tgz";
+ZOPE_ARCHIVE=Zope-2.9.6-final
+ZOPE_ARCHIVE_TAR=Zope-2.9.6-final.tgz
+ZOPE_MD5SUM=a87008a9e78248072ea5908e1006b269
+ZOPE_URLs="http://www.zope.org/Products/Zope/2.9.6/Zope-2.9.6-final.tgz";
 
 
 
--- conga/luci/cluster/form-macros	2007/01/26 17:56:14	1.163
+++ conga/luci/cluster/form-macros	2007/01/29 16:56:50	1.164
@@ -3740,9 +3740,6 @@
 				global res gr;
 				global type python: 'tag_name' in res and res['tag_name'] or '';
 				global resourceIsRef python: True" />
-				<span tal:content="type" />
-				<span tal:content="res" />
-
 			<tal:block metal:use-macro="here/form-macros/macros/serviceconfig-type-macro" />
 		</tal:block>
 	</div>
@@ -3993,9 +3990,6 @@
 				global res gr;
 				global type python: 'tag_name' in res and res['tag_name'] or '';
 				global resourceIsRef python: True" />
-
-				<span tal:content="type" />
-				<span tal:content="res" />
 			<tal:block metal:use-macro="here/form-macros/macros/serviceconfig-type-macro" />
 		</tal:block>
 	</div>
@@ -4138,29 +4132,34 @@
 
 <div metal:define-macro="fencedevs-form">
 	<script type="text/javascript">
-		set_page_title('Luci — cluster — fence devices');
+		set_page_title('Luci — cluster — shared fence devices');
 	</script>
-	<h2>Shared Fence Devices for Cluster: <span tal:content="request/clustername"/></h2>
-  <tal:block tal:define="global fencedevinfo python: here.getFencesInfo(modelb, request)"/>
-<tal:block tal:define="global fencedevs python: fencedevinfo['fencedevs']"/>
-  <span tal:repeat="fencedev fencedevs">
-   <h3>Agent type: <span tal:content="fencedev/pretty_name"/></h3>
-   <h3>Name: <font style="color:green"><a class="running" tal:attributes="href fencedev/cfgurl"><span tal:content="fencedev/name"/></a></font></h3>
-   <h3>Nodes using this device for fencing:</h3>
-   <ul>
-     <tal:block tal:define="global usednodes python:fencedev['nodesused']"/>
-     <span tal:condition="python: len(usednodes) == 0">
-      <li>No nodes currently employ this fence device</li>
-     </span>
-    <span tal:repeat="usednode usednodes">
-     <li><font color="green">
-      <a class="runned" href="" tal:attributes="href usednode/nodeurl"><tal:block tal:content="usednode/nodename"/>
-      </a></font>
-     </li>
-    </span>
-   </ul>
-   <hr/>
-  </span>
+
+	<h2>Shared Fence Devices for Cluster: <span tal:replace="request/clustername" /></h2>
+
+	<tal:block tal:define="
+		global fencedevinfo python: here.getFencesInfo(modelb, request);
+		global fencedevs python: fencedevinfo['fencedevs']" />
+
+	<tal:block tal:repeat="fencedev fencedevs">
+		<h3>Agent type: <span tal:content="fencedev/pretty_name"/></h3>
+		<h3>Name: <a class="running" tal:attributes="href fencedev/cfgurl"><span tal:replace="fencedev/name" /></a></h3>
+		<h3>Nodes using this device for fencing:</h3>
+		<ul>
+			<tal:block tal:define="global usednodes python:fencedev['nodesused']"/>
+			<tal:block tal:condition="python: len(usednodes) == 0">
+				<li>No nodes currently employ this fence device</li>
+			</tal:block>
+
+			<tal:block tal:repeat="usednode usednodes">
+				<li><a class="cluster node"
+						tal:attributes="href usednode/nodeurl"
+						tal:content="usednode/nodename" />
+				</li>
+			</tal:block>
+		</ul>
+		<hr/>
+	</tal:block>
 </div>
 
 <div metal:define-macro="fencedevlist-form">
--- conga/luci/cluster/resource-form-macros	2007/01/26 17:56:14	1.30
+++ conga/luci/cluster/resource-form-macros	2007/01/29 16:56:50	1.31
@@ -290,8 +290,9 @@
 	<h2>Configure <span tal:replace="res/name | string: resource" /></h2>
 	<br/>
 
-	<div class="reschoose"
-		metal:use-macro="here/form-macros/macros/serviceconfig-type-macro" />
+	<div class="reschoose">
+		<tal:block metal:use-macro="here/form-macros/macros/serviceconfig-type-macro" />
+	</div>
 	</tal:block>
 </div>
 
--- conga/luci/cluster/validate_config_general.js	2006/10/04 17:24:58	1.3
+++ conga/luci/cluster/validate_config_general.js	2007/01/29 16:56:50	1.4
@@ -8,7 +8,11 @@
 		set_form_err(form.cluname);
 	} else {
 		name = form.cluname.value;
-		clr_form_err(form.cluname);
+		if (name.length > 15) {
+			errors.push('A cluster\'s name must be less than 16 characters long.');
+			set_form_err(form.cluname);
+		} else
+			clr_form_err(form.cluname);
 	}
 
 	if (!form.cfgver || str_is_blank(form.cfgver.value)) {
--- conga/luci/homebase/validate_cluster_add.js	2007/01/24 20:21:32	1.6
+++ conga/luci/homebase/validate_cluster_add.js	2007/01/29 16:56:50	1.7
@@ -10,12 +10,17 @@
 		set_form_err(form.clusterName);
 	} else {
 		clusterName = clusterName.value;
-		var invalid_chars = str_is_valid(clusterName, '/[0-9A-Za-z_. -]/g');
-		if (invalid_chars) {
-			errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".');
+		if (clusterName.length > 15) {
+			errors.push('A cluster\'s name must be less than 16 characters long.');
 			set_form_err(form.clusterName);
-		} else
-			clr_form_err(form.clusterName);
+		} else {
+			var invalid_chars = str_is_valid(clusterName, '/[0-9A-Za-z_. -]/g');
+			if (invalid_chars) {
+				errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".');
+				set_form_err(form.clusterName);
+			} else
+				clr_form_err(form.clusterName);
+		}
 	}
 
 	var added_storage = validate_systems(form, errors);
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/26 19:35:00	1.213
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/29 16:56:50	1.214
@@ -232,6 +232,9 @@
 	add_cluster, incomplete, errors, messages = parseClusterNodes(self, request, cluster_os)
 	clusterName = add_cluster['name']
 
+	if len(clusterName) > 15:
+		errors.append('A cluster\'s name must be less than 16 characters long.')
+
 	if incomplete or len(errors) > 0:
 		request.SESSION.set('create_cluster', add_cluster)
 		return (False, { 'errors': errors, 'messages': messages })
@@ -1073,6 +1076,9 @@
 	except KeyError, e:
 		errors.append('No cluster name was given.')
 
+	if len(cluster_name) > 15:
+		errors.append('A cluster\'s name must be less than 16 characters long.')
+
 	try:
 		version_num = int(form['cfgver'])
 		if version_num < old_ver:


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