From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 18 Feb 2009 19:13:31 -0000 Subject: [Cluster-devel] conga/luci cluster/fence-macros cluster/valida ... Message-ID: <20090218191331.26946.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 Branch: RHEL5 Changes by: rmccabe at sourceware.org 2009-02-18 19:13:31 Modified files: luci/cluster : fence-macros validate_fence.js luci/site/luci/Extensions: FenceHandler.py luci/site/luci/Extensions/ClusterModel: FenceDeviceAttr.py Log message: More fixes for bz466013 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.9&r2=1.2.2.10 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.9&r2=1.1.2.10 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.15&r2=1.4.2.16 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.1&r2=1.5.2.2 --- conga/luci/cluster/fence-macros 2009/02/11 16:29:37 1.2.2.9 +++ conga/luci/cluster/fence-macros 2009/02/18 19:13:30 1.2.2.10 @@ -331,9 +331,9 @@ - + @@ -357,7 +357,7 @@ - + @@ -1118,24 +1118,27 @@ Hostname + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" /> Login + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" /> Password + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value nothing" /> @@ -1157,7 +1160,6 @@ tal:attributes="value cur_fencedev/name | nothing" /> - @@ -1170,7 +1172,7 @@ - + @@ -1185,24 +1187,28 @@ + @@ -1216,6 +1222,36 @@ value cur_fencedev/passwd_script | nothing" /> + + + + + + + + + + + + +
Fence TypeVMWareVMware
NameHostname + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" />
Login + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" />
Password + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value nothing" />
VMware ESX Management Login + +
VMware ESX Management Password + +
+ VMware ESX Management Password Script (optional) + + +
@@ -1636,6 +1672,8 @@ + + @@ -1652,6 +1690,8 @@ + +
@@ -1787,6 +1827,7 @@ tal:attributes="value cur_instance/option |nothing" /> + - + + + + + + --- conga/luci/cluster/validate_fence.js 2008/04/23 17:27:10 1.1.2.9 +++ conga/luci/cluster/validate_fence.js 2009/02/18 19:13:30 1.1.2.10 @@ -20,6 +20,8 @@ fence_inst_validator['vixel'] = [ 'port' ]; fence_inst_validator['wti'] = [ 'port', 'secure' ]; fence_inst_validator['xvm'] = [ 'domain' ]; +fence_inst_validator['lpar'] = [ 'partition' ]; +fence_inst_validator['vmware'] = [ 'port' ]; var fence_validator = []; fence_validator['apc'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; @@ -41,6 +43,8 @@ fence_validator['unknown'] = []; fence_validator['vixel'] = [ 'ipaddr', 'passwd', 'passwd_script' ]; fence_validator['wti'] = [ 'ipaddr', 'passwd', 'passwd_script' ]; +fence_validator['lpar'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; +fence_validator['vmware'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'vmlogin' ]; fence_validator['xvm'] = []; function validate_field_str(form, form_elem) { @@ -120,12 +124,15 @@ field_validator['ipaddr'] = validate_field_host; field_validator['hostname'] = validate_field_host; field_validator['login'] = validate_field_str; +field_validator['vmlogin'] = validate_field_str; field_validator['passwd'] = validate_field_passwd; +field_validator['vmpasswd'] = validate_field_noop; field_validator['servers'] = validate_field_str; field_validator['cserver'] = validate_field_str; field_validator['device'] = validate_field_str; field_validator['port'] = validate_field_str; field_validator['passwd_script'] = validate_field_noop; +field_validator['vmpasswd_script'] = validate_field_noop; /* iLO, DRAC5, WTI, APC, Bladecenter */ field_validator['secure'] = validate_field_noop; @@ -143,6 +150,7 @@ field_validator['lpan'] = validate_field_str; field_validator['pserver'] = validate_field_str; field_validator['domain'] = validate_field_str; +field_validator['partition'] = validate_field_str; function validate_fence(form) { var errors = []; @@ -179,9 +187,12 @@ for (var i = 0 ; i < fields.length ; i++) { var field_name = fields[i]; if (form[field_name]) { - var err = field_validator[field_name](form, form[field_name]); - if (err) { - errors = errors.concat(err); + try { + var err = field_validator[field_name](form, form[field_name]); + if (err) { + errors = errors.concat(err); + } + } catch (e) { } } } --- conga/luci/site/luci/Extensions/FenceHandler.py 2009/02/11 16:29:37 1.4.2.15 +++ conga/luci/site/luci/Extensions/FenceHandler.py 2009/02/18 19:13:30 1.4.2.16 @@ -688,12 +688,6 @@ if not has_vmpasswd: errors.append(FD_PROVIDE_VMPASSWD) - use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') - if use_ssh: - fencedev.addAttribute('secure', '1') - else: - fencedev.removeAttribute('secure') - return errors def val_noop_fd(dummy, _dummy): @@ -1264,6 +1258,8 @@ except Exception, e: errors.append(FI_PROVIDE_PARTITION) + fenceinst.addAttribute('secure', '1') + return errors def val_vmware_fi(form, fenceinst): @@ -1277,6 +1273,12 @@ except Exception, e: errors.append(FI_PROVIDE_PORT) + use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') + if use_ssh: + fenceinst.addAttribute('secure', '1') + else: + fenceinst.removeAttribute('secure') + return errors def val_manual_fi(form, fenceinst): --- conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py 2008/01/23 04:44:33 1.5.2.1 +++ conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py 2009/02/18 19:13:30 1.5.2.2 @@ -29,6 +29,8 @@ 'fence_drac': 'Dell DRAC', 'fence_rsa': 'IBM RSA II Device', 'fence_rps10': 'RPS10 Serial Switch', + 'fence_lpar': 'LPAR Fencing', + 'fence_vmware': 'VMware Fencing', 'fence_manual': 'Manual Fencing' } @@ -45,6 +47,8 @@ 'fence_bullpap': True, 'fence_xvm': True, 'fence_scsi': True, + 'fence_lpar': True, + 'fence_vmware': True, 'fence_ilo': False, 'fence_ipmilan': False, 'fence_drac': False, @@ -86,6 +90,8 @@ 'fence_bullpap': ( 'domain' ), 'fence_xvm': ( 'domain' ), 'fence_scsi': ( 'node' ), + 'fence_lpar': ( 'partition' ), + 'fence_vmware': ( 'port' ), 'fence_ilo': ( ), 'fence_ipmilan': ( ), 'fence_drac': ( ), @@ -117,6 +123,10 @@ ( 'name', 'ipaddr', 'login', 'passwd' ), 'fence_xvm': ( 'name' ), + 'fence_lpar': + ( 'name', 'ipaddr', 'login', 'passwd' ), + 'fence_vmware': + ( 'name', 'ipaddr', 'login', 'passwd', 'vmlogin', 'vmpasswd' ), 'fence_scsi': ( 'name' ), 'fence_ilo':
PartitionPort - + value cur_instance/port | nothing" /> +
+ Use SSH + + +