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

[Cluster-devel] conga/luci/cluster form-macros



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	jparsons sourceware org	2006-11-30 20:10:18

Modified files:
	luci/cluster   : form-macros 

Log message:
	Modification to shared fence list, form for xvm agent, minor addition to formlist to support shared devices only

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.3&r2=1.90.2.4

--- conga/luci/cluster/form-macros	2006/11/16 19:34:52	1.90.2.3
+++ conga/luci/cluster/form-macros	2006/11/30 20:10:17	1.90.2.4
@@ -1099,6 +1099,22 @@
 	<h2>Cluster Process Form</h2>
 </div>
 
+<div metal:define-macro="shared-fence-option-list">
+	<option name="fence_apc" value="fence_apc">APC Power Switch</option>
+	<option name="fence_wti" value="fence_wti">WTI Power Switch</option>
+	<option name="fence_brocade" value="fence_brocade">Brocade Fabric Switch</option>
+	<option name="fence_mcdata" value="fence_mcdata">McData SAN Switch</option>
+	<option name="fence_sanbox2" value="fence_sanbox2">QLogic SANbox2</option>
+	<option name="fence_vixel" value="fence_vixel">Vixel SAN Switch</option>
+	<option name="fence_gnbd" value="fence_gnbd">GNBD</option>
+	<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_rps10" value="fence_rps10">RPS10 Serial Switch</option>
+	<option name="fence_xvm" value="fence_xvm">Virtual Machine Fencing</option>
+	<option name="fence_scsi" value="fence_scsi">SCSI Fencing</option>
+</div>
+
 <div metal:define-macro="fence-option-list">
 	<option name="fence_apc" value="fence_apc">APC Power Switch</option>
 	<option name="fence_wti" value="fence_wti">WTI Power Switch</option>
@@ -1115,10 +1131,14 @@
 	<option name="fence_rps10" value="fence_rps10">RPS10 Serial Switch</option>
 	<option name="fence_drac" value="fence_drac">Dell DRAC</option>
 	<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_manual" value="fence_manual">Manual Fencing</option>
 </div>
 
-<div metal:define-macro="fence-form-apc">
+<div metal:define-macro="fence-form-apc"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_apc" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1129,21 +1149,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1158,7 +1178,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-mcdata">
+<div metal:define-macro="fence-form-mcdata"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_mcdata" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1169,21 +1191,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fendev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1198,7 +1220,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-wti">
+<div metal:define-macro="fence-form-wti"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_wti" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1209,14 +1233,14 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1231,7 +1255,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-ilo">
+<div metal:define-macro="fence-form-ilo"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_ilo" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1242,21 +1268,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Hostname</td>
 				<td>
 					<input name="hostname" type="text"
-						tal:attributes="cur_fencedev/hostname | nothing" />
+						tal:attributes="value cur_fencedev/hostname | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1271,7 +1297,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-drac">
+<div metal:define-macro="fence-form-drac"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_drac" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1282,21 +1310,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1310,7 +1338,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-rsa">
+<div metal:define-macro="fence-form-rsa"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_rsa" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1321,21 +1351,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Hostname</td>
 				<td>
 					<input name="hostname" type="text"
-						tal:attributes="cur_fencedev/hostname | nothing" />
+						tal:attributes="value cur_fencedev/hostname | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1350,7 +1380,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-brocade">
+<div metal:define-macro="fence-form-brocade"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_brocade" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1361,21 +1393,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1390,7 +1422,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-sanbox2">
+<div metal:define-macro="fence-form-sanbox2"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_sanbox2" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1401,7 +1435,7 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1412,7 +1446,7 @@
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1427,7 +1461,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-vixel">
+<div metal:define-macro="fence-form-vixel"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_vixel" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1438,14 +1474,14 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1460,7 +1496,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-gnbd">
+<div metal:define-macro="fence-form-gnbd"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_gnbd" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1471,14 +1509,14 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Servers (whitespace separated list)</td>
 				<td>
 					<input name="servers" type="text"
-						tal:attributes="cur_fencedev/servers | nothing" />
+						tal:attributes="value cur_fencedev/servers | nothing" />
 				</td>
 			</tr>
 		</table>
@@ -1486,7 +1524,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-egenera">
+<div metal:define-macro="fence-form-egenera"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_egenera" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1497,21 +1537,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>CServer</td>
 				<td>
 					<input name="cserver" type="text"
-						tal:attributes="cur_fencedev/cserver | nothing" />
+						tal:attributes="value cur_fencedev/cserver | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>ESH Path (Optional)</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | string:/opt/pan-mgr/bin/esh" />
+						tal:attributes="value cur_fencedev/login | string:/opt/pan-mgr/bin/esh" />
 				</td>
 			</tr>
 		</table>
@@ -1519,7 +1559,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-bladecenter">
+<div metal:define-macro="fence-form-bladecenter"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_bladecenter" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1530,21 +1572,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1559,7 +1601,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-bullpap">
+<div metal:define-macro="fence-form-bullpap"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_bullpap" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1570,21 +1614,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1599,7 +1643,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-rps10">
+<div metal:define-macro="fence-form-rps10"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_rps10" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1610,21 +1656,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Device Name</td>
 				<td>
 					<input name="device" type="text"
-						tal:attributes="cur_fencedev/device | nothing" />
+						tal:attributes="value cur_fencedev/device | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Port</td>
 				<td>
 					<input name="port" type="text"
-						tal:attributes="cur_fencedev/port| nothing" />
+						tal:attributes="value cur_fencedev/port| nothing" />
 				</td>
 			</tr>
 		</table>
@@ -1632,7 +1678,37 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-ipmilan">
+<div metal:define-macro="fence-form-xvm"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_xvm" class="fencedev">
+	<table>
+			<tr tal:condition="exists: cur_fence_type">
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Virtual Machine Fencing</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+  </table>	
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-scsi"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_scsi" class="fencedev">
+		-
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-ipmilan"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_ipmilan" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1643,21 +1719,21 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>IP Address</td>
 				<td>
 					<input name="ip_addr" type="text"
-						tal:attributes="cur_fendev/ipaddr | nothing" />
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
 				<td>
 					<input name="login" type="text"
-						tal:attributes="cur_fencedev/login | nothing" />
+						tal:attributes="value cur_fencedev/login | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -1676,7 +1752,9 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-form-manual">
+<div metal:define-macro="fence-form-manual"
+	tal:attributes="id cur_fencedev/name | nothing">
+
 	<div id="fence_manual" class="fencedev">
 		<table>
 			<tr tal:condition="exists: cur_fence_type">
@@ -1687,7 +1765,7 @@
 				<td>Name</td>
 				<td>
 					<input name="name" type="text"
-						tal:attributes="cur_fencedev/name | nothing" />
+						tal:attributes="value cur_fencedev/name | nothing" />
 				</td>
 			</tr>
 			<input type="hidden" name="fence_type" value="fence_manual" />
@@ -1711,10 +1789,263 @@
 	<tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
 	<tal:block metal:use-macro="here/form-macros/macros/fence-form-rps10" />
 	<tal:block metal:use-macro="here/form-macros/macros/fence-form-ipmilan" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
 	<tal:block metal:use-macro="here/form-macros/macros/fence-form-manual" />
 </div>
 
+<div metal:define-macro="shared-fence-form-list">
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
+</div>
+
+<div metal:define-macro="shared-fence-device-list">
+<tal:block tal:condition="exists: cur_fencedev">
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_apc'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_mcdata'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_wti'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_brocade'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_sanbox2'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_vixel'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_gnbd'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_egenera'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bladecenter'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bullpap'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_xvm'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_scsi'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
+	</tal:block>
+</tal:block>
+</div>
+
+<div metal:define-macro="fence-instance-form-apc">
+	<div id="fence_apc_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Switch</td>
+				<td>
+					<input name="switch" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-egenera">
+	<div id="fence_egenera_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>lpan</td>
+				<td>
+					<input name="lpan" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>pserver</td>
+				<td>
+					<input name="pserver" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-wti">
+	<div id="fence_wti_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-brocade">
+	<div id="fence_brocade_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-vixel">
+	<div id="fence_vixel_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-sanbox2">
+	<div id="fence_sanbox2_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-mcdata">
+	<div id="fence_mcdata_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-gndb">
+	<div id="fence_gnbd_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddress" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-bladecenter">
+	<div id="fence_bladecenter_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Blade</td>
+				<td>
+					<input name="ipaddress" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-bullpap">
+	<div id="fence_bullpap_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Domain</td>
+				<td>
+					<input name="domain" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-xvm">
+	<div id="fence_xvm_instance" class="fencedev">
+		<table>
+			<tr>
+				<td>Domain</td>
+				<td>
+					<input name="domain" type="text"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+		</table>
+	</div>
+</div>
+<div metal:define-macro="fence-instance-form-list">
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-apc" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-egenera" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-wti" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-vixel" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-sanbox2" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-mcdata" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-gndb" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-bullpap" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-xvm" />
+	<tal:block
+		metal:use-macro="here/form-macros/macros/fence-instance-form-bladecenter" />
+</div>
+
 <div metal:define-macro="node-form">
+	<script type="text/javascript"
+		src="/luci/cluster/fence_device.js">
+	</script>
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — nodes — properties');
 	</script>
@@ -1732,7 +2063,8 @@
 		global nodeinfo python: here.getNodeInfo(modelb, nodestatus, request);
 		global status_class python: 'node_' + (nodeinfo['nodestate'] == '0' and 'active' or (nodeinfo['nodestate'] == '1' and 'inactive' or 'unknown'));
 		global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'));
-		global fenceinfo python: here.getFenceInfo(modelb, request)"
+		global fenceinfo python: here.getFenceInfo(modelb, request);
+		global fencedevinfo python: here.getFencesInfo(modelb, request)"
 	/>
 
 	 <table class="cluster node" width="100%">
@@ -1874,7 +2206,6 @@
 		<tal:block metal:use-macro="here/form-macros/macros/fence-form-list" />
 	</div>
 
-	<h3>Fencing</h3>
 	<table id="fence_devices" class="cluster node fencedev">
 		<tfoot class="fencedev">
 		<tr class="cluster node fencedev"><td class="cluster node fencedev">
@@ -1895,12 +2226,27 @@
 				</span>
 			</td>
 		</tr>
+
 		<tr class="cluster node info_top fencedev">
 			<td class="cluster node fence_main fencedev">
+				<tal:block tal:repeat="cur_fencedev fencedevinfo/fencedevs">
+					<div class="invisible" id="shared_fence_devices">
+						<tal:block metal:use-macro="here/form-macros/macros/shared-fence-device-list" />
+					</div>
+				</tal:block>
+
 				<form name="main_fence_form">
 				<select name="select_div"
 					onChange="swap_fence_div('fence_container',
 								this.options[this.selectedIndex].value)">
+					<option value="fence-form-new-device">------ Use an existing Fence Device ------</option>
+					<tal:block tal:repeat="f fencedevinfo/fencedevs">
+						<option class="shared_fencedev"
+							tal:attributes="value f/name"
+							tal:content="python: f['name'] + ' (' + f['pretty_name'] + ')'"
+						/>
+					</tal:block>
+					<option value="fence-form-new-instance">------ Create a new Fence Device ------</option>
 					<tal:block metal:use-macro="here/form-macros/macros/fence-option-list" />
 				</select>
 				</form>
@@ -1912,6 +2258,8 @@
 				<select name="select_div"
 					onChange="swap_fence_div('fence_container_backup',
 						this.options[this.selectedIndex].value)">
+					<option value="fence-form-new-device">------ Use an existing Fence Device ------</option>
+					<option value="fence-form-new-instance">------ Create a new Fence Device ------</option>
 					<tal:block metal:use-macro="here/form-macros/macros/fence-option-list" />
 				</select>
 				</form>
@@ -1930,6 +2278,9 @@
 </div>
 
 <div metal:define-macro="nodes-form">
+	<script type="text/javascript"
+		src="/luci/cluster/fence_device.js">
+	</script>
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — nodes');
 	</script>
@@ -2622,6 +2973,7 @@
 		set_page_title('Luci — cluster — failover domains — Add a failover domain');
 	</script>
 	<h2>Failover Domain Add Form</h2>
+  <tal:block tal:define="allnodes python:here.getFdomNodes(request)"/>
 </div>
 
 <div metal:define-macro="fdomconfig-form">
@@ -2674,14 +3026,17 @@
 </div>
 
 <div metal:define-macro="fencedevadd-form">
+	<script type="text/javascript"
+		src="/luci/cluster/fence_device.js">
+	</script>
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — fence devices - Add a new fence device');
 	</script>
 
-	<h2>Add a Fence Device</h2>
+	<h2>Add a Sharable Fence Device</h2>
 
 	<div id="invisible" class="invisible">
-		<tal:block metal:use-macro="here/form-macros/macros/fence-form-list" />
+		<tal:block metal:use-macro="here/form-macros/macros/shared-fence-form-list" />
 	</div>
 
 	<table id="fence_devices" class="cluster node fencedev">
@@ -2705,7 +3060,7 @@
 				<select name="select_div"
 					onChange="swap_fence_div('fence_container',
 								this.options[this.selectedIndex].value)">
-					<tal:block metal:use-macro="here/form-macros/macros/fence-option-list" />
+					<tal:block metal:use-macro="here/form-macros/macros/shared-fence-option-list" />
 				</select>
 				</form>
 				<div id="fence_container">
@@ -2823,6 +3178,14 @@
 		<tal:block metal:use-macro="here/form-macros/macros/fence-form-ipmilan" />
 	</tal:block>
 
+	<tal:block tal:condition="python: cur_fence_type == 'fence_xvm'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_scsi'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
+	</tal:block>
+
 	<tal:block tal:condition="python: cur_fence_type == 'fence_manual'">
 		<tal:block metal:use-macro="here/form-macros/macros/fence-form-manual" />
 	</tal:block>


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