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

[Cluster-devel] conga/luci cluster/fence-macros site/luci/Exte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2010-08-07 04:11:22

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

Log message:
	Add UI bits to support fence devices that support the power_wait attribute
	
	Resolves: rhbz#584633

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.16&r2=1.2.2.17
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.21&r2=1.4.2.22

--- conga/luci/cluster/fence-macros	2010/08/06 21:57:43	1.2.2.16
+++ conga/luci/cluster/fence-macros	2010/08/07 04:11:22	1.2.2.17
@@ -447,6 +447,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -576,6 +585,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -637,6 +655,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -717,6 +744,15 @@
 						type="checkbox" name="secure" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -777,6 +813,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -974,6 +1019,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -1143,6 +1197,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -1245,6 +1308,15 @@
 							value cur_fencedev/vmware_datacenter | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -1355,6 +1427,15 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr>
+				<td>Power wait (seconds)</td>
+				<td>
+					<input type="text" name="power_wait"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/power_wait | nothing" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
--- conga/luci/site/luci/Extensions/FenceHandler.py	2010/08/06 20:17:20	1.4.2.21
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2010/08/07 04:11:22	1.4.2.22
@@ -123,6 +123,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -168,6 +184,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_IP)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -398,6 +430,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -451,6 +499,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -560,6 +624,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -612,6 +692,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -704,6 +800,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -757,6 +869,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()
@@ -925,6 +1053,22 @@
 	except Exception, e:
 		errors.append(FD_PROVIDE_LOGIN)
 
+	try:
+		power_wait = form['power_wait'].strip()
+		if power_wait:
+			power_wait = int(power_wait)
+			if power_wait < 0:
+				raise ValueError
+	except (KeyError, AttributeError), e:
+		power_wait = None
+	except Exception, e:
+		power_wait = None
+		errors.append('An invalid value for power_wait was given: "%s"' % form['power_wait'])
+	if power_wait:
+		fencedev.addAttribute('power_wait', str(power_wait))
+	else:
+		fencedev.removeAttribute('power_wait')
+
 	has_passwd = False
 	try:
 		pwd = form['passwd'].strip()


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