All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] conga/luci cluster/fence-macros cluster/valida ...
@ 2009-02-18 19:13 rmccabe
  0 siblings, 0 replies; 2+ messages in thread
From: rmccabe @ 2009-02-18 19:13 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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 @@
 	<option name="fence_egenera" value="fence_egenera">Egenera SAN Controller</option>
 	<option name="fence_bladecenter" value="fence_bladecenter">IBM Blade Center</option>
 	<option name="fence_bullpap" value="fence_bullpap">Bull PAP</option>
-	<option name="fence_vmware" value="fence_vmware">VMWare Fencing</option>
 	<option name="fence_xvm" value="fence_xvm">Virtual Machine Fencing</option>
 	<option name="fence_scsi" value="fence_scsi">SCSI Fencing</option>
+	<option name="fence_vmware" value="fence_vmware">VMware Fencing</option>
 	<option name="fence_lpar" value="fence_lpar">LPAR Fencing</option>
 </div>
 
@@ -357,7 +357,7 @@
 	<option name="fence_ipmilan" value="fence_ipmilan">IPMI Lan</option>
 	<option name="fence_xvm" value="fence_xvm">Virtual Machine Fencing</option>
 	<option name="fence_scsi" value="fence_scsi">SCSI Fencing</option>
-	<option name="fence_vmware" value="fence_vmware">VMWare Fencing</option>
+	<option name="fence_vmware" value="fence_vmware">VMware Fencing</option>
 	<option name="fence_lpar" value="fence_lpar">LPAR Fencing</option>
 	<option name="fence_manual" value="fence_manual">Manual Fencing</option>
 </div>
@@ -1118,24 +1118,27 @@
 				<td>Hostname</td>
 				<td>
 					<input name="ipaddr" type="text"
-						disabled cur_fencedev/isShared | nothing;
-						tal:attributes="value cur_fencedev/ipaddr | nothing" />
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						disabled cur_fencedev/isShared | nothing;
-						tal:attributes="value cur_fencedev/login | nothing" />
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Password</td>
 				<td>
 					<input name="passwd" type="password" autocomplete="off"
-						disabled cur_fencedev/isShared | nothing;
-						tal:attributes="value nothing" />
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1157,7 +1160,6 @@
 				tal:attributes="value cur_fencedev/name | nothing" />
 		</tal:block>
 
-		<input type="hidden" name="secure" value="1" />
 		<input type="hidden" name="sharable" value="1" />
 		<input type="hidden" name="fence_type" value="fence_lpar" />
 	</div>
@@ -1170,7 +1172,7 @@
 		<table>
 			<tr>
 				<td><strong class="cluster">Fence Type</strong></td>
-				<td>VMWare</td>
+				<td>VMware</td>
 			</tr>
 			<tr>
 				<td>Name</td>
@@ -1185,24 +1187,28 @@
 				<td>Hostname</td>
 				<td>
 					<input name="ipaddr" type="text"
-						disabled cur_fencedev/isShared | nothing;
-						tal:attributes="value cur_fencedev/ipaddr | nothing" />
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
+
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						disabled cur_fencedev/isShared | nothing;
-						tal:attributes="value cur_fencedev/login | nothing" />
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Password</td>
 				<td>
 					<input name="passwd" type="password" autocomplete="off"
-						disabled cur_fencedev/isShared | nothing;
-						tal:attributes="value nothing" />
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1216,6 +1222,36 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+
+			<tr>
+				<td>VMware ESX Management Login</td>
+				<td>
+					<input name="vmlogin" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/vmlogin | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>VMware ESX Management Password</td>
+				<td>
+					<input name="vmpasswd" type="password" autocomplete="off"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate VMware ESX Management password">VMware ESX Management Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="vmpasswd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/vmpasswd_script | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -1636,6 +1672,8 @@
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ipmilan" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-xvm" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-scsi" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-lpar" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vmware" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-manual" />
 </div>
 
@@ -1652,6 +1690,8 @@
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bullpap" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-xvm" />
 	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-scsi" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-lpar" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vmware" />
 </div>
 
 <div metal:define-macro="shared-fence-device-list">
@@ -1787,6 +1827,7 @@
 			tal:attributes="value cur_instance/option |nothing" />
 		<input type="hidden" name="fence_type" value="fence_lpar" />
 		<input type="hidden" name="fence_instance" value="1" />
+		<input type="hidden" name="secure" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -1800,11 +1841,25 @@
 		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
-				<td>Partition</td>
+				<td>Port</td>
 				<td>
-					<input name="partition" type="text"
+					<input name="port" type="text"
 						tal:attributes="
-							value cur_instance/partition | nothing" />
+							value cur_instance/port | nothing" />
+				</td>
+			</tr>
+
+			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
+				<td>
+					<span title="Enable SSH operation">Use SSH</span>
+				</td>
+				<td>
+					<input tal:condition="exists:cur_instance"
+						type="checkbox" name="secure"
+						tal:attributes="
+							checked python:(cur_instance and cur_instance.has_key('secure') and (cur_instance['secure'] == '1' or cur_instance['secure'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_instance"
+						type="checkbox" name="secure" />
 				</td>
 			</tr>
 
--- 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':



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] conga/luci cluster/fence-macros cluster/valida ...
@ 2009-04-23 20:38 rmccabe
  0 siblings, 0 replies; 2+ messages in thread
From: rmccabe @ 2009-04-23 20:38 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2009-04-23 20:38:52

Modified files:
	luci/cluster   : fence-macros validate_fence.js 
	luci/site/luci/Extensions: FenceHandler.py 

Log message:
	fix bz492392

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.10&r2=1.2.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.10&r2=1.1.2.11
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.16&r2=1.4.2.17

--- conga/luci/cluster/fence-macros	2009/02/18 19:13:30	1.2.2.10
+++ conga/luci/cluster/fence-macros	2009/04/23 20:38:51	1.2.2.11
@@ -633,19 +633,6 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
-			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
-				<td>
-					<span title="Enable SSH operation">Use SSH</span>
-				</td>
-				<td>
-					<input tal:condition="exists:cur_fencedev"
-						type="checkbox" name="secure"
-						tal:attributes="
-							checked python:(cur_fencedev and cur_fencedev.has_key('secure') and (cur_fencedev['secure'] == '1' or cur_fencedev['secure'].lower() == 'true')) and 'checked' or ''" />
-					<input tal:condition="not:exists:cur_fencedev"
-						type="checkbox" name="secure" />
-				</td>
-			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
--- conga/luci/cluster/validate_fence.js	2009/02/18 19:13:30	1.1.2.10
+++ conga/luci/cluster/validate_fence.js	2009/04/23 20:38:51	1.1.2.11
@@ -78,7 +78,6 @@
 			set_form_err(form_elem);
 			errors.push(form_elem.name + ' values must not be empty.');
 		}
-		return (errors);
 	}
 
 	if (errors && errors.length > 0 &&
@@ -87,7 +86,7 @@
 		clr_form_err(form_elem);
 		return (null);
 	}
-	return errors;
+	return (errors);
 }
 
 /* Very loose checking for now -- just make sure it's not blank */
--- conga/luci/site/luci/Extensions/FenceHandler.py	2009/02/18 19:13:30	1.4.2.16
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2009/04/23 20:38:52	1.4.2.17
@@ -967,12 +967,6 @@
 	if not has_passwd:
 		errors.append(FD_PROVIDE_PASSWD)
 
-	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
 
 FD_VALIDATE = {



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-23 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23 20:38 [Cluster-devel] conga/luci cluster/fence-macros cluster/valida rmccabe
  -- strict thread matches above, loose matches on Subject: below --
2009-02-18 19:13 rmccabe

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.