From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 29 Jan 2007 16:56:54 -0000 Subject: [Cluster-devel] conga ./download_files luci/cluster/form-macro ... Message-ID: <20070129165654.21946.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at 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" /> - - - @@ -3993,9 +3990,6 @@ global res gr; global type python: 'tag_name' in res and res['tag_name'] or ''; global resourceIsRef python: True" /> - - - @@ -4138,29 +4132,34 @@
-

Shared Fence Devices for Cluster:

- - - -

Agent type:

-

Name:

-

Nodes using this device for fencing:

-
    - - -
  • No nodes currently employ this fence device
  • -
    - -
  • - - -
  • -
    -
-
-
+ +

Shared Fence Devices for Cluster:

+ + + + +

Agent type:

+

Name:

+

Nodes using this device for fencing:

+
    + + +
  • No nodes currently employ this fence device
  • +
    + + +
  • +
  • +
    +
+
+
--- 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 @@

Configure


-
+
+ +
--- 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: