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

[Cluster-devel] conga/luci/cluster busy_wait-macro cluster_con ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2007-11-19 18:22:48

Added files:
	luci/cluster   : busy_wait-macro cluster_config-macros 
	                 cluster_svc-macros fdom-macros fence-macros 
	                 system_svc-macros 

Log message:
	split up form-macros into manageable modules

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/busy_wait-macro.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_config-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_svc-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fdom-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/system_svc-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1

/cvs/cluster/conga/luci/cluster/busy_wait-macro,v  -->  standard output
revision 1.1
--- conga/luci/cluster/busy_wait-macro
+++ -	2007-11-19 18:22:48.660504000 +0000
@@ -0,0 +1,62 @@
+<div metal:define-macro="busywaitpage">
+	<table>
+		<tr><td>
+			<h2>Please be patient - this cluster's configuration is being modified.</h2>
+		</td></tr>
+
+		<tr><td>
+			<img src="100wait.gif" />
+		</td></tr>
+
+		<span tal:define="global nodereports isBusy/nodereports" />
+
+		<tr tal:repeat="nodereport nodereports"><td>
+			<tal:block
+				tal:condition="python:nodereport.get('isnodecreation') != True">
+
+				<h2><span tal:replace="nodereport/desc" /></h2>
+			</tal:block>
+
+			<tal:block
+				tal:condition="python:nodereport.get('isnodecreation') == True">
+
+				<tal:block
+					tal:condition="python:nodereport.get('iserror') == True">
+
+					<h2><span tal:content="nodereport/desc" /></h2>
+
+					<span class="errmsg"
+						tal:content="nodereport/errormessage" />
+				</tal:block>
+
+				<tal:block
+					tal:condition="python:nodereport.get('iserror') != True">
+
+					<h2><span tal:content="nodereport/desc" /></h2>
+					<em tal:content="nodereport/statusmessage | nothing" />
+					<br/>
+
+					<tal:block tal:condition="python: nodereport['statusindex'] < 1">
+						<img src="notstarted.png" />
+					</tal:block>
+
+					<tal:block tal:condition="python: nodereport['statusindex'] == 1 or nodereport['statusindex'] == 2">
+						<img src="installed.png" alt="[cluster software installed]" />
+					</tal:block>
+
+					<tal:block tal:condition="python: nodereport['statusindex'] == 3">
+						<img src="rebooted.png" alt="[cluster node rebooted]" />
+					</tal:block>
+
+					<tal:block tal:condition="python: nodereport['statusindex'] == 4 or nodereport['statusindex'] == 5">
+						<img src="configured.png" alt="[cluster node configured]" />
+					</tal:block>
+
+					<tal:block tal:condition="python: nodereport['statusindex'] == 6">
+						<img src="joined.png" alt="[cluster node joined cluster]" />
+					</tal:block>
+				</tal:block>
+			</tal:block>
+		</td></tr>
+	</table>
+</div>
/cvs/cluster/conga/luci/cluster/cluster_config-macros,v  -->  standard output
revision 1.1
--- conga/luci/cluster/cluster_config-macros
+++ -	2007-11-19 18:22:48.741556000 +0000
@@ -0,0 +1,955 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+    <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="clusterconfig-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — Configure cluster properties');
+	</script>
+	<script type="text/javascript"
+		src="conga_ajax.js">
+	</script>
+	<script type="text/javascript"
+		src="validate_xvm_key.js">
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:condition="not: exists: modelb">
+		<tal:block tal:define="global modelb python: None" />
+	</tal:block>
+
+	<tal:block
+		tal:define="global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
+<tal:block tal:condition="clusterinfo">
+	<span tal:omit-tag="" tal:define="global configTabNum python: 'tab' in request and int(request['tab']) or 1" />
+
+	<ul class="configTab">
+		<li class="configTab">
+			<a tal:attributes="
+				href clusterinfo/basecluster_url | nothing;
+				class python: 'configTab' + (configTabNum == 1 and ' configTabActive' or '');
+			">General</a>
+		</li>
+		<li class="configTab"
+			tal:condition="not:clusterinfo/gulm">
+			<a tal:attributes="
+				href clusterinfo/fencedaemon_url | nothing;
+				class python: 'configTab' + (configTabNum == 2 and ' configTabActive' or '');
+			">Fence</a>
+		</li>
+		<li class="configTab"
+			tal:condition="not:clusterinfo/gulm">
+			<a tal:attributes="
+				href clusterinfo/multicast_url | nothing;
+				class python: 'configTab' + (configTabNum == 3 and ' configTabActive' or '');
+			">Multicast</a>
+		</li>
+
+		<li class="configTab"
+			tal:condition="clusterinfo/gulm">
+			<a tal:attributes="
+				href clusterinfo/gulm_url | nothing;
+				class python: 'configTab' + (configTabNum == 5 and ' configTabActive' or '')">GULM</a>
+		</li>
+
+		<li class="configTab">
+			<a tal:attributes="
+				href clusterinfo/quorumd_url | nothing;
+				class python: 'configTab' + (configTabNum == 4 and ' configTabActive' or '');
+			">Quorum Partition</a>
+		</li>
+	</ul>
+
+	<div id="configTabContent" tal:condition="python: configTabNum == 1">
+		<script type="text/javascript"
+			src="/luci/homebase/homebase_common.js">
+		</script>
+		<script type="text/javascript"
+			src="/luci/cluster/validate_config_general.js">
+		</script>
+
+		<form name="basecluster" action="" method="post">
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="pagetype"
+				tal:attributes="value request/pagetype | request/form/pagetype"
+			/>
+			<input type="hidden" name="configtype" value="general" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="1">
+					<div class="systemsTableTop">
+						<strong>General Properties</strong>
+					</div>
+				</td></tr>
+			</thead>
+
+			<tbody class="systemsTable" id="sys_tbody">
+				<tr class="systemsTable">
+					<td class="systemsTable">Cluster Name</td>
+					<td class="systemsTable">
+						<input type="text" name="cluname"
+							tal:attributes="value clusterinfo/clustername" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">Configuration Version</td>
+					<td class="systemsTable">
+						<input type="text" name="cfgver" size="5"
+							tal:attributes="value clusterinfo/config_version"/>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+
+		<table tal:condition="python: os_version and os_version == 'rhel5'">
+			<tr class="systemsTable">
+				<td class="systemsTable" colspan="2">
+					<img src="arrow_right.png" alt="[+]"
+						onclick="toggle_visible(this, 'genprops_advanced', 'genprops_advanced_label')">
+					<span id="genprops_advanced_label">Show</span>
+					advanced cluster properties
+				</td>
+			</tr>
+
+			<tr class="systemsTable invisible" id="genprops_advanced">
+				<td class="systemsTable" colspan="2">
+					<table class="systemsTable">
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#token', 55, 65);">Token Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10" name="token"
+									tal:attributes="value clusterinfo/totem/token | string:10000" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#retransmits_before_loss', 55, 65);">Number of token retransmits before loss</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="token_retransmits_before_loss_const"
+									tal:attributes="value clusterinfo/totem/token_retransmits_before_loss_const | string:20" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#join', 55, 65);">Join Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10" name="join"
+									tal:attributes="value clusterinfo/totem/join | string:60" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#consensus', 55, 65);">Consensus Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="consensus"
+									tal:attributes="value clusterinfo/totem/consensus | string:4800" />
+							</td>
+						</tr>
+
+<tal:comment tal:replace="nothing">
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#secauth', 55, 65);">Secure Authentication</a>
+							</td>
+							<td class="systemsTable">
+								<input type="checkbox" name="secauth" checked="checked" />
+						</tr>
+
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_mode', 55, 65);">Redundant Ring Protocol Mode</a>
+							</td>
+							<td class="systemsTable">
+								<select type="text" name="rrp_mode">
+									<option value="none">
+										None
+									</option>
+									<option value="active">
+										Active
+									</option>
+									<option value="passive">
+										Passive
+									</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#netmtu', 55, 65);">Network MTU</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="netmtu"
+									tal:attributes="value string:1500" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#threads', 55, 65);">Number of Threads
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10" name="threads"
+									tal:attributes="value string:0" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#vsftype', 55, 65);">Virtual Synchrony Type
+							</td>
+							<td class="systemsTable">
+								<select name="vsftype">
+									<option value="none">
+										None
+									</option>
+									<option value="ykd">
+										YKD
+									</option>
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#token_retransmit', 55, 65);">Token Retransmit</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="token_retransmit"
+									tal:attributes="value string:238" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#hold', 55, 65);">Hold Token Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10" name="hold"
+									tal:attributes="value string:180" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#send_join', 55, 65);">Maximum time to wait before sending a join message</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10" name="send_join"
+									tal:attributes="value string:0" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#merge', 55, 65);">Merge Detection Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="merge"
+									tal:attributes="value string:200" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#downcheck', 55, 65);">Interface Down Check Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="downcheck"
+									tal:attributes="value string:1000" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#fail_to_recv_const', 55, 65);">Fail to Receive Constant</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="fail_to_recv_const"
+									tal:attributes="value string:50" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#seqno_unchanged_const', 55, 65);">Rotations with no mcast traffic before merge detection timeout started</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="seqno_unchanged_const"
+									tal:attributes="value string:30" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#heartbeat_failures_allowed', 55, 65);">Number of Heartbeat Failures Allowed</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="heartbeat_failures_allowed"
+									tal:attributes="value string:0" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#max_network_delay', 55, 65);">Maximum Network Delay</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="max_network_delay"
+									tal:attributes="value string:50" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#window_size', 55, 65);">Window Size</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="window_size"
+									tal:attributes="value string:50" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#max_messages', 55, 65);">Maximum Messages</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="max_messages"
+									tal:attributes="value string:17" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_problem_count_timeout', 55, 65);">RRP Problem Count Timeout</a> (ms)
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="rrp_problem_count_timeout"
+									tal:attributes="value string:1000" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_problem_count_threshold', 55, 65);">RRP Problem Count Threshold</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="rrp_problem_count_threshold"
+									tal:attributes="value string:20" />
+							</td>
+						</tr>
+
+						<tr class="systemsTable">
+							<td class="systemsTable">
+								<a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_token_expired_timeout', 55, 65);">RRP Token Expired Timeout</a>
+							</td>
+							<td class="systemsTable">
+								<input type="text" size="10"
+									name="rrp_token_expired_timeout"
+									tal:attributes="value string:47" />
+							</td>
+						</tr>
+</tal:comment>
+					</table>
+				</td></tr>
+			</table>
+
+			<table class="systemsTable">
+				<tr class="systemsTable">
+					<td class="systemsTable" colspan="2">
+						<div class="systemsTableEnd">
+							<input type="button" value="Apply"
+								onClick="validate_form(this.form);"/>
+						</div>
+					</td>
+				</tr>
+			</table>
+		</form>
+	</div>
+
+	<div id="configTabContent" tal:condition="python: configTabNum == 2">
+		<form name="fencedaemon" method="post" id="fence_config_form" action="">
+			<input type="hidden" name="configtype" value="fence" />
+			<input type="hidden" name="pagetype"
+				tal:attributes="value request/pagetype | request/form/pagetype"
+			/>
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
+		<script type="text/javascript"
+			src="/luci/homebase/homebase_common.js">
+		</script>
+		<script type="text/javascript"
+			src="/luci/cluster/validate_config_fence.js">
+		</script>
+
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="1">
+					<div class="systemsTableTop">
+						<strong>Fence Daemon Properties</strong>
+					</div>
+				</td></tr>
+			</thead>
+
+			<tbody class="systemsTable" id="sys_tbody">
+				<tr class="systemsTable">
+					<td class="systemsTable">Post Fail <span tal:attributes="onclick python:'window.location.assign(\'./?pagetype=80&clustername=' + request['clustername'] + '\')'">Delay</span>
+					</td>
+					<td class="systemsTable">
+						<input type="text" name="post_fail_delay"
+							tal:attributes="value clusterinfo/pfd" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">Post Join Delay</td>
+					<td class="systemsTable">
+						<input type="text" name="post_join_delay"
+							tal:attributes="value clusterinfo/pjd" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<span class="cluster_help" title="Enable if you will be running a VM cluster on this physical cluster">Run XVM fence daemon</td>
+					<td class="systemsTable">
+						<input type="checkbox" name="run_xvmd"
+							tal:attributes="checked python: ('fence_xvmd' in clusterinfo and clusterinfo['fence_xvmd']) and 'checked' or ''" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable" colspan="2">
+						<div class="systemsTableTop">&nbsp;</div>
+						<strong>XVM fence daemon key distribution</strong>
+					</td>
+				</tr>
+
+				<tr id="fence_xvm_config" class="invisible">
+					<td class="systemsTable" colspan="2" id="fence_xvm_config">
+						<table class="systemsTable" width="100%">
+							<tr class="systemsTable">
+								<td class="systemsTable">
+									<div id="fence_xvm_hosts" />
+								</td>
+							</tr>
+							<tr class="systemsTable">
+								<td class="systemsTable">
+									<input type="button" name="distribute"
+										value="Create and distribute keys"
+										onclick="validate_xvm_dist_form(this.form)"
+									/>
+								</td>
+							</tr>
+						</table>
+					</td>
+				</tr>
+
+				<tr class="systemsTable" id="fence_xvm_init">
+					<td class="systemsTable" colspan="2">
+						<table class="systemsTable">
+							<tr class="systemsTable">
+								<td class="systemsTable">
+									Enter a node hostname from the host cluster
+								</td>
+								<td>
+									<input type="text" value=""
+										name="host_cluster_name"
+										id="host_cluster_name" />
+								</td>
+							</tr>
+							<tr class="systemsTable">
+								<td class="systemsTable">
+									Enter a node hostname from the hosted (virtual) cluster
+								</td>
+								<td>
+									<input type="text" value=""
+										name="virt_cluster_name"
+										id="virt_cluster_name" />
+								</td>
+							</tr>
+							<tr class="systemsTable">
+								<td class="systemsTable" colspan="2">
+									<input type="button"
+										name="Retrieve cluster nodes"
+										value="Retrieve cluster nodes"
+										onclick="get_cluster_members(this.form)"
+									/>
+								</td>
+							</tr>
+						</table>
+					</td>
+				</tr>
+			</tbody>
+
+			<tfoot class="systemsTable">
+				<tr class="systemsTable">
+					<td class="systemsTable" colspan="2">
+						<div class="systemsTableEnd">
+							<input type="button" value="Apply"
+								id="fence_config_submit"
+								onClick="validate_form(this.form)" />
+						</div>
+					</td>
+				</tr>
+			</tfoot>
+		</table>
+		</form>
+	</div>
+
+	<div id="configTabContent" tal:condition="python: configTabNum == 3">
+		<script type="text/javascript"
+			src="/luci/homebase/homebase_common.js">
+		</script>
+		<script type="text/javascript"
+			src="/luci/cluster/validate_config_multicast.js">
+		</script>
+
+		<form name="multicast" action="" method="post">
+			<input type="hidden" name="configtype" value="mcast" />
+			<input type="hidden" name="pagetype"
+				tal:attributes="value request/pagetype | request/form/pagetype"
+			/>
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="1">
+					<div class="systemsTableTop">
+						<strong>Multicast Configuration</strong>
+					</div>
+				</td></tr>
+			</thead>
+
+			<tbody class="systemsTable" id="sys_tbody">
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input type="radio" name="mcast" value="False"
+							onClick="disable_mcast('mcast_address', 'mcast_interface');"
+							tal:attributes="checked python: clusterinfo['is_mcast'] != 'True'"
+						/>
+						<tal:block tal:condition="python:os_version == 'rhel4'">
+							Do not use multicast
+						</tal:block>
+						<tal:block tal:condition="python:os_version != 'rhel4'">
+							Let cluster choose the multicast address
+						</tal:block>
+					</td>
+				</tr>
+
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input type="radio" name="mcast" value="True"
+							onClick="enable_mcast('mcast_address', 'mcast_interface');"
+							tal:attributes="checked python: clusterinfo['is_mcast'] == 'True'"
+
+						/>
+						<tal:block tal:condition="python:os_version == 'rhel4'">
+							Use multicast
+						</tal:block>
+						<tal:block tal:condition="python:os_version != 'rhel4'">
+							Specify the multicast address manually
+						</tal:block>
+					</td>
+				</tr>
+
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						Multicast address
+					</td>
+					<td class="systemsTable">
+						<input type="text"
+							name="mcast_address" id="mcast_address"
+							tal:attributes="
+								disabled not:clusterinfo/mcast_addr;
+								value clusterinfo/mcast_addr |nothing" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						Multicast network interface <span tal:condition="python:os_version != 'rhel4'">(optional)</span>
+					</td>
+					<td class="systemsTable">
+						<input type="text"
+							name="mcast_interface" id="mcast_interface"
+							tal:attributes="
+								disabled not:clusterinfo/mcast_addr;
+								value clusterinfo/mcast_interface |nothing" />
+					</td>
+				</tr>
+			</tbody>
+
+			<tfoot class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableEnd">
+						<input type="button" value="Apply"
+							onClick="validate_form(this.form);"/>
+					</div>
+				</td></tr>
+			</tfoot>
+		</table>
+		</form>
+	</div>
+
+	<div id="configTabContent" tal:condition="python: configTabNum == 4">
+	<script type="text/javascript"
+		src="/luci/homebase/homebase_common.js">
+	</script>
+	<script type="text/javascript"
+		src="/luci/cluster/validate_config_qdisk.js">
+	</script>
+		<form name="quorum_partition" action="" method="post">
+			<input type="hidden" name="pagetype"
+				tal:attributes="value request/pagetype | request/form/pagetype"
+			/>
+			<input type="hidden" name="configtype" value="qdisk" />
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+		<div class="configTabContent">
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="1">
+					<div class="systemsTableTop">
+						<strong>Quorum Partition Configuration</strong>
+					</div>
+				</td></tr>
+			</thead>
+
+			<tbody class="systemsTable" id="sys_tbody">
+				<tr class="systemsTable" id="st_row"><td class="systemsTable" id="st_col">
+					<input type="radio" name="quorumd" value="False"
+						onClick="disableChildrenInput('quorumdisk');"
+						tal:attributes="checked python: (not clusterinfo['is_quorumd']) and 'checked' or ''" />
+					Do not use a Quorum Partition
+				</td></tr>
+
+				<tr class="systemsTable"><td class="systemsTable">
+					<input type="radio" name="quorumd" value="True"
+						onClick="enableChildrenInput('quorumdisk');"
+						tal:attributes="checked python: (clusterinfo['is_quorumd']) and 'checked' or ''" />
+						Use a Quorum Partition
+				</td></tr>
+			</tbody>
+		</table>
+		</div>
+
+		<div class="spacing configTabContent"></div>
+
+		<div id="quorumdisk" class="configTabContent">
+		<div class="configTabContent">
+		<table name="qdiskprefs" class="systemsTable">
+			<tr class="systemsTable">
+				<td class="systemsTable">Interval</td>
+				<td class="systemsTable">
+					<input type="text" name="interval"
+						tal:attributes="value clusterinfo/interval | nothing" />
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Votes</td>
+				<td class="systemsTable">
+					<input type="text" name="votes"
+						tal:attributes="value clusterinfo/votes | nothing" />
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">TKO</td>
+				<td class="systemsTable">
+					<input type="text" name="tko"
+						tal:attributes="value clusterinfo/tko | nothing" />
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Minimum Score</td>
+				<td class="systemsTable">
+					<input type="text" name="min_score"
+						tal:attributes="value clusterinfo/min_score | nothing" />
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Device</td>
+				<td class="systemsTable">
+					<input type="text" name="device"
+						tal:attributes="value clusterinfo/device | nothing" />
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Label</td>
+				<td class="systemsTable">
+					<input type="text" name="label"
+						tal:attributes="value clusterinfo/label | nothing" />
+				</td>
+			</tr>
+		</table>
+		</div>
+
+		<div class="configTabContent">
+		<table name="qdiskheur" class="systemsTable">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="1">
+					<div class="systemsTableTop">
+						<strong>Heuristics</strong>
+					</div>
+				</td></tr>
+
+				<tr class="systemsTable">
+					<th class="systemsTable">
+						<div class="systemsTableTop">Path to Program</div>
+					</th>
+					<th class="systemsTable">
+						<div class="systemsTableTop">Interval</div>
+					</th>
+					<th class="systemsTable">
+						<div class="systemsTableTop">Score</div>
+					</th>
+					<th>
+						&nbsp;
+					</th>
+				</tr>
+			</thead>
+
+			<tbody class="systemsTable" id="heuristicList"
+				tal:define="global heuristics clusterinfo/hlist | nothing">
+
+				<tal:block tal:condition="python: not heuristics or not len(heuristics)">
+				<input type="hidden" name="num_heuristics" id="num_heuristics" value="0">
+				<tr class="systemsTable" id="heuristic0">
+					<td class="systemsTable">
+						<input class="qdpath qdisk" type="text"
+							name="heuristic0:hprog" id="heuristic0:hprog" />
+					</td>
+					<td class="systemsTable">
+						<input class="qdint qdisk" type="text"
+							name="heuristic0:hinterval" id="heuristic0:hinterval" />
+					</td>
+					<td class="systemsTable">
+						<input class="qdscore qdisk" type="text"
+							name="heuristic0:hscore" id="heuristic0:hscore" />
+					</td>
+					<td class="systemsTable">
+						<img class="qdisk deleteRow"
+							id="heuristic0:hdel" name="heuristic0:hdel"
+							src="delete-row.png"
+							title="delete this heuristic"
+							onClick="delete_qdisk_heur(this, document.quorum_partition);">
+					</td>
+				</tr>
+				</tal:block>
+
+				<tal:block
+					tal:condition="python: len(heuristics)"
+					tal:define="global curHeur python: -1">
+
+				<input type="hidden" name="num_heuristics" id="num_heuristics"
+					tal:attributes="value python: len(heuristics)" />
+
+				<tr class="systemsTable"
+					tal:repeat="heuristic heuristics"
+					tal:attributes="id python: 'heuristic' + str(curHeur)"
+					tal:define="global curHeur python: curHeur + 1">
+
+					<td class="systemsTable">
+						<input class="qdpath qdisk" type="text"
+							tal:attributes="
+								value heuristic/hprog;
+								id python: 'heuristic' + str(curHeur) + ':hprog';
+								name python: 'heuristic' + str(curHeur) + ':hprog'" />
+					</td>
+
+					<td class="systemsTable">
+						<input class="qdint qdisk" type="text"
+							tal:attributes="
+								value heuristic/hinterval;
+								id python: 'heuristic' + str(curHeur) + ':hinterval';
+								name python: 'heuristic' + str(curHeur) + ':hinterval'" />
+					</td>
+
+					<td class="systemsTable">
+						<input class="qdscore qdisk" type="text"
+							tal:attributes="
+								value heuristic/hscore;
+								id python: 'heuristic' + str(curHeur) + ':hscore';
+								name python: 'heuristic' + str(curHeur) + ':hscore'" />
+					</td>
+					<td class="systemsTable">
+						<img class="qdisk deleteRow"
+							src="delete-row.png"
+							title="delete this heuristic"
+							onClick="delete_qdisk_heur(this, document.quorum_partition);"
+							tal:attributes="
+								id python: 'heuristic' + str(curHeur) + ':hdel';
+								name python: 'heuristic' + str(curHeur) + ':hdel'" />
+					</td>
+				</tr>
+				</tal:block>
+			</tbody>
+
+			<tfoot>
+				<tr class="systemsTable"><td class="systemsTable">
+					<input class="addrow" type="button" value="Add another heuristic" onClick="addHeuristic('heuristicList')">
+				</td></tr>
+			</tfoot>
+		</table>
+		</div>
+		</div>
+
+		<div class="spacing configTabContent"></div>
+		<div class="hbSubmit spacing configTabContent">
+			<input type="button" value="Apply"
+				onClick="validate_form(this.form)" />
+		</div>
+		<script tal:condition="not: clusterinfo/is_quorumd">
+			disableChildrenInput('quorumdisk');
+		</script>
+		</form>
+	</div>
+
+	<tal:block tal:condition="clusterinfo/gulm">
+	<div id="configTabContent" tal:condition="python: configTabNum == 5">
+		<script type="text/javascript"
+			src="/luci/homebase/homebase_common.js">
+		</script>
+		<script type="text/javascript"
+			src="/luci/cluster/validate_config_gulm.js">
+		</script>
+
+		<form name="basecluster" action="" method="post">
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="pagetype"
+				tal:attributes="value request/pagetype | request/form/pagetype"
+			/>
+			<input type="hidden" name="configtype" value="gulm" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
+		<strong class="cluster">GULM Configuration</strong><br/>
+		<table id="systemsTable" class="systemsTable" cellspacing="0">
+			<thead>
+				<tr class="systemsTable" align="left">
+					<th class="systemsTable">Node</th>
+					<th class="systemsTable">Lock Server</th>
+				</tr>
+			</thead>
+			<tbody id="sys_tbody">
+				<tal:block tal:repeat="c clusterinfo/gulm_lockservers">
+					<tr class="systemsTable">
+						<td class="systemsTable">
+							<span tal:replace="python:c[0]" />
+						</td>
+						<td class="systemsTable">
+							<input type="checkbox"
+								tal:attributes="
+									name python:c[0];
+									checked python:c[1]" />
+						</td>
+					</tr>
+				</tal:block>
+
+				<tr><td colspan="2">
+					<div class="spacing" />
+					<p><em class="cluster">You may have exactly 1, 3, or 5 GULM lock servers, in any combination of the hosts checked above and given below.</em></p>
+				</td></tr>
+
+				<tr>
+					<td class="pad_right">External Lock Server 1</td>
+					<td>
+						<input type="text" name="__GULM__:server1"
+							class="hostname" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 2</td>
+					<td>
+						<input type="text" name="__GULM__:server2"
+							class="hostname" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 3</td>
+					<td>
+						<input type="text" name="__GULM__:server3"
+							class="hostname" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 4</td>
+					<td>
+						<input type="text" name="__GULM__:server4"
+							class="hostname" value="" />
+					</td>
+				</tr>
+				<tr>
+					<td class="pad_right">External Lock Server 5</td>
+					<td>
+						<input type="text" name="__GULM__:server5"
+							class="hostname" value="" />
+					</td>
+				</tr>
+			</tbody>
+		</table>
+
+		<div class="spacing configTabContent"></div>
+		<div class="hbSubmit spacing configTabContent">
+			<input type="button" value="Apply"
+				onClick="validate_form(this.form)"/>
+		</div>
+	</div>
+	</tal:block>
+</tal:block>
+</div>
+
+</body>
+</html>
/cvs/cluster/conga/luci/cluster/cluster_svc-macros,v  -->  standard output
revision 1.1
--- conga/luci/cluster/cluster_svc-macros
+++ -	2007-11-19 18:22:48.840511000 +0000
@@ -0,0 +1,850 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+    <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="services-form">
+	<h2>Services Form</h2>
+</div>
+
+<div metal:define-macro="servicelist-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services');
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		global svcstatus python: here.getClusterStatus(request, ricci_agent);
+		global svcinf python: here.getServicesInfo(svcstatus,modelb,request);
+		global svcs svcinf/services" />
+
+	<tal:block tal:repeat="svc svcs">
+		<table class="cluster service" width="100%"
+			tal:define="
+				running svc/running | nothing;
+				autostart svc/autostart |nothing">
+
+			<tr class="cluster service info_top">
+				<td class="cluster service service_name">
+					<strong class="cluster service">Service Name</strong>
+					<a tal:attributes="
+						href svc/cfgurl;
+						class python: 'cluster service ' + (running and 'running' or 'stopped')"
+						tal:content="svc/name" />
+					<tal:block tal:condition="exists:svc/is_vm">
+						(virtual service)
+					</tal:block>
+				</td>
+
+				<td class="cluster service service_action">
+					<form method="post">
+						<select name="gourl">
+							<option value="">Choose a Task...</option>
+							<option
+								tal:attributes="value svc/cfgurl | nothing"
+								tal:content="string:Configure this service" />
+
+							<option value="">----------</option>
+
+							<option
+								tal:condition="running"
+								tal:attributes="value svc/restarturl | nothing"
+								tal:content="string:Restart this service" />
+
+							<option
+								tal:condition="running"
+								tal:attributes="value svc/disableurl | nothing"
+								tal:content="string:Stop this service" />
+
+							<option
+								tal:condition="not: running"
+								tal:attributes="value svc/enableurl | nothing"
+								tal:content="string:Enable this service" />
+
+							<option
+								tal:condition="not: running"
+								tal:attributes="value svc/delurl | nothing"
+								tal:content="string:Delete this service" />
+
+							<option value="">----------</option>
+
+							<tal:block tal:condition="not: running">
+								<tal:block tal:repeat="starturl svc/links">
+									<option
+										tal:condition="not:exists: starturl/migrate"
+										tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename" /></option>
+								</tal:block>
+							</tal:block>
+
+							<tal:block tal:condition="running">
+								<tal:block tal:repeat="starturl svc/links">
+									<option
+										tal:condition="not:exists: starturl/migrate"
+										tal:attributes="value starturl/url">Relocate this service to <span tal:replace="starturl/nodename" /></option>
+								</tal:block>
+
+								<tal:block tal:condition="svc/is_vm | nothing">
+									<option value="">----------</option>
+									<tal:block tal:repeat="starturl svc/links">
+										<option
+											tal:condition="exists: starturl/migrate"
+											tal:attributes="value starturl/url">Migrate this service to <span tal:replace="starturl/nodename" /></option>
+									</tal:block>
+								</tal:block>
+							</tal:block>
+
+						</select>
+						<input type="button" value="Go"
+							onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
+					</form>
+				</td>
+			</tr>
+
+			<tr class="cluster service info_middle">
+				<td class="cluster service service_nodename">
+					<div class="cluster service service_status">
+						<strong class="cluster service">Status:</strong>
+						<tal:block tal:condition="running">
+							Running on <tal:block tal:replace="svc/nodename"/>
+						</tal:block>
+						<tal:block tal:condition="not: running">
+							This service is stopped
+						</tal:block>
+					</div>
+					<p>Autostart is <span tal:condition="python: autostart.lower() == 'false'" tal:replace="string:not" /> enabled for this service</p>
+				</td>
+			</tr>
+
+			<tr class="cluster service info_bottom">
+				<td class="cluster service service_fdom" tal:condition="running" colspan="2">
+					<strong class="cluster service">Failover Domain Association:</strong> <span tal:replace="svc/faildom"/>
+				</td>
+			</tr>
+		</table>
+		<hr/>
+	</tal:block>
+</div>
+
+<div metal:define-macro="vmadd-form">
+<form method="post" action="">
+	<input type="hidden" name="clustername"
+		tal:attributes="value request/clustername | nothing" />
+
+	<input type="hidden" name="pagetype"
+		tal:attributes="value request/pagetype | nothing" />
+
+	<div class="service_comp_list">
+	<table class="systemsTable">
+		<thead class="systemsTable">
+			<tr class="systemsTable"><td class="systemsTable">
+				<p class="reshdr">Create a Virtual Machine Service</p>
+			</td></tr>
+		<tfoot class="systemsTable">
+			<tr class="systemsTable">
+				<td>Automatically start this service</td>
+				<td>
+					<input type="checkbox" name="autostart" checked="checked">
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Run exclusive</td>
+				<td>
+					<input type="checkbox" name="exclusive">
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Failover Domain</td>
+				<td>
+					<select name="domain">
+						<option value="" selected="selected">None</option>
+						<tal:block tal:repeat="f python:here.get_fdom_names(modelb)">
+							<option tal:content="f"
+								tal:attributes="value f" />
+						</tal:block>
+					</select>
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Recovery policy</td>
+				<td>
+					<select name="recovery">
+						<option value="">Select a recovery policy</option>
+						<option name="relocate" value="relocate">Relocate</option>
+						<option name="restart" value="restart">Restart</option>
+						<option name="disable" value="disable">Disable</option>
+					</select>
+				</td>
+			</tr>
+			<tr class="systemsTable"><td colspan="2">
+				<div class="hbSubmit">
+					<input type="submit" value="Create Virtual Machine Service" />
+				</div>
+			</td></tr>
+		</tfoot>
+		<tbody class="systemsTable">
+			<tr class="systemsTable">
+				<td><span class="cluster_help" title="e.g., guest1 if the VM config file is at /etc/xen/guest1">Virtual machine name</span></td>
+				<td><input type="text" name="vmname" value="" /></td>
+			</tr>
+			<tr class="systemsTable">
+				<td><span class="cluster_help" title="e.g., /etc/xen/">Path to VM configuration files</span></td>
+				<td><input type="text" name="vmpath" value="" /></td>
+			</tr>
+		</tbody>
+	</table>
+	</div>
+</form>
+</div>
+
+<div metal:define-macro="vmconfig-form">
+<form method="post" action=""
+	tal:define="vminfo python:here.getVMInfo(modelb, request)">
+
+	<input type="hidden" name="clustername"
+		tal:attributes="value request/clustername | nothing" />
+
+	<input type="hidden" name="pagetype"
+		tal:attributes="value request/pagetype | nothing" />
+
+	<input type="hidden" name="oldname"
+		tal:attributes="value vminfo/name | nothing" />
+
+	<div class="service_comp_list">
+	<table class="systemsTable">
+		<thead class="systemsTable">
+			<tr class="systemsTable">
+				<td class="systemsTable">
+					<p class="reshdr">Properties for <tal:block tal:replace="vminfo/name | string:virtual machine service"/></p>
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="cluster service service_action"
+					tal:condition="python: sinfo and 'innermap' in sinfo">
+				<form method="post">
+					<input type="hidden" name="pagetype" tal:attributes="
+						value request/pagetype | request/form/pagetype | nothing" />
+					<select name="gourl"
+						tal:define="global innermap sinfo/innermap;
+						starturls innermap/links">
+
+						<option value="">Choose a Task...</option>
+						<tal:block tal:condition="running">
+							<option
+								tal:attributes="value innermap/restarturl">Restart this service</option>
+
+							<option
+								tal:attributes="value innermap/disableurl">Disable this service</option>
+
+							<option value="">----------</option>
+
+							<tal:block tal:repeat="starturl innermap/links">
+								<option
+									tal:condition="not:exists: starturl/migrate"
+									tal:attributes="value starturl/url">Relocate this service to <span tal:replace="starturl/nodename" />
+								</option>
+							</tal:block>
+
+							<tal:block tal:condition="svc/is_vm | nothing">
+								<option value="">----------</option>
+								<tal:block tal:repeat="starturl innermap/links">
+									<option
+										tal:condition="exists: starturl/migrate"
+										tal:attributes="value starturl/url">Migrate this service to <span tal:replace="starturl/nodename" /></option>
+								</tal:block>
+							</tal:block>
+						</tal:block>
+
+						<tal:block tal:condition="not: running">
+							<option
+								tal:attributes="value innermap/enableurl">Enable this service</option>
+							<option value="">----------</option>
+
+							<tal:block tal:repeat="starturl innermap/links">
+								<option
+									tal:condition="not:exists: starturl/migrate"
+									tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename" />
+								</option>
+							</tal:block>
+
+							<option value="">----------</option>
+
+							<option
+								tal:attributes="value innermap/delurl | nothing"
+								tal:content="string:Delete this service" />
+						</tal:block>
+					</select>
+
+					<input type="button" value="Go"
+						onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
+				</form>
+				</td>
+			</tr>
+		</thead>
+
+		<tfoot class="systemsTable">
+			<tr class="systemsTable">
+				<td>Automatically start this service</td>
+				<td>
+					<input type="checkbox" name="autostart"
+						tal:attributes="checked python: ('autostart' in vminfo and vminfo['autostart'] != '0') and 'checked' or ''" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Run exclusive</td>
+				<td>
+					<input type="checkbox" name="exclusive"
+						tal:attributes="checked python: ('exclusive' in vminfo and vminfo['exclusive'] != '0') and 'checked' or ''" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Failover Domain</td>
+				<td>
+					<select name="domain">
+						<option value="" tal:content="string:None"
+							tal:attributes="selected python: (not 'domain' in vminfo or not vminfo['domain']) and 'selected' or ''" />
+						<tal:block tal:repeat="f python:here.get_fdom_names(modelb)">
+							<option tal:content="f"
+								tal:attributes="
+									value f;
+									selected python: ('domain' in vminfo and vminfo['domain'] == f) and 'selected' or ''" />
+						</tal:block>
+					</select>
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Recovery policy</td>
+				<td>
+					<select name="recovery">
+						<option value="">Select a recovery policy</option>
+						<option name="relocate" value="relocate"
+							tal:content="string:Relocate"
+							tal:attributes="selected python: ('recovery' in vminfo and vminfo['recovery'] == 'relocate') and 'selected' or ''" />
+						<option name="restart" value="restart"
+							tal:content="string:Restart"
+							tal:attributes="selected python: ('recovery' in vminfo and vminfo['recovery'] == 'restart') and 'selected' or ''" />
+						<option name="disable" value="disable"
+							tal:content="string:Disable"
+							tal:attributes="selected python: ('recovery' in vminfo and vminfo['recovery'] == 'disable') and 'selected' or ''" />
+					</select>
+				</td>
+			</tr>
+			<tr class="systemsTable"><td colspan="2">
+				<div class="hbSubmit">
+					<input name="submit" type="submit" value="Update Virtual Machine Service" />
+					<input name="delete" type="submit" value="Delete Virtual Machine Service" />
+				</div>
+			</td></tr>
+		</tfoot>
+		<tbody class="systemsTable">
+			<tr class="systemsTable">
+				<td><span class="cluster_help" title="e.g., guest1 if the VM config file is at /etc/xen/guest1">Virtual machine name</span></td>
+				<td>
+					<input type="text" name="vmname"
+						tal:attributes="value vminfo/name | nothing" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td><span class="cluster_help" title="e.g., /etc/xen/">Path to VM configuration files</span></td>
+				<td>
+					<input type="text" name="vmpath"
+						tal:attributes="value vminfo/path | nothing" />
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	</div>
+</form>
+</div>
+
+<div metal:define-macro="serviceadd-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services — Add a new service');
+	</script>
+	<tal:block metal:use-macro="here/cluster_svc-macros/macros/service-config-head-macro" />
+
+	<h2>Add a Service</h2>
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
+	<div id="resskel" class="invisible">
+		<tal:block metal:use-macro="here/resource-form-macros/macros/service-compose-macro" />
+	</div>
+
+	<div class="service_comp_list">
+		<form name="service_name_form">
+			<table class="systemsTable">
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<strong class="reshdr">Service name</strong>
+					</td>
+					<td class="systemsTable">
+						<input type="text" length="20" name="service_name" value="" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						Automatically start this service
+					</td>
+					<td class="systemsTable">
+						<input type="checkbox" name="autostart" checked="checked" />
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">Run exclusive</td>
+					<td class="systemsTable">
+						<input type="checkbox" name="exclusive">
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">Failover Domain</td>
+					<td class="systemsTable">
+						<select name="domain">
+							<option value="" selected="selected">None</option>
+							<tal:block tal:repeat="f sinfo/fdoms">
+								<option tal:content="f"
+									tal:attributes="value f" />
+							</tal:block>
+						</select>
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td class="systemsTable">Recovery policy</td>
+					<td class="systemsTable">
+						<select name="recovery">
+							<option value="">Select a recovery policy</option>
+							<option name="relocate" value="relocate">Relocate</option>
+							<option name="restart" value="restart">Restart</option>
+							<option name="disable" value="disable">Disable</option>
+						</select>
+					</td>
+				</tr>
+			</table>
+		</form>
+	</div>
+	<div class="service_comp_list" tal:attributes="id sinfo/root_uuid">
+	</div>
+
+	<div class="service_comp_list">
+		<form name="master" method="post">
+		<input type="button" value="Add a resource to this service"
+			onclick="add_child_resource(this.form);" />
+		<input type="hidden" name="pagetype"
+			tal:attributes="
+				value request/pagetype | request/form/pagetype | nothing" />
+		<input type="hidden" name="orig_pagetype"
+			tal:attributes="
+				value request/pagetype | request/form/pagetype | nothing" />
+		<input type="hidden" name="clustername"
+			tal:attributes="value clusterinfo/clustername" />
+		<input type="button" value="Submit"
+			onClick="forms_to_xml(this, this.form)" />
+		<input type="hidden" name="uuid" value="toplevel" />
+		<input type="hidden" name="parent_uuid" value="_toplevel" />
+		<input type="hidden" name="tree_level" value="-1" />
+		<input type="hidden" name="svc_name" value="" />
+		<input type="hidden" name="autostart" value="-1" />
+		<input type="hidden" name="exclusive" value="-1" />
+		<input type="hidden" name="recovery" />
+		<input type="hidden" name="domain" />
+		<input type="hidden" name="form_xml" />
+		<input type="hidden" name="action" value="add" />
+		</form>
+	</div>
+
+	<div class="invisible" id="global_resources_block">
+		<tal:block tal:repeat="gr global_resources">
+			<tal:block tal:define="
+				global res gr;
+				global type python: 'tag_name' in res and res['tag_name'] or '';
+				global resourceIsRef python: True" />
+			<tal:block metal:use-macro="here/cluster_svc-macros/macros/serviceconfig-type-macro" />
+		</tal:block>
+	</div>
+</div>
+
+<div metal:define-macro="servicestart">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services — Start a service');
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		result python: here.serviceStart(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="servicemigrate">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services — Migrate a virtual service');
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		result python: here.serviceMigrate(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="servicerestart">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services — Restart a service');
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		result python: here.serviceRestart(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="servicestop">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services — Stop a service');
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<span tal:define="
+		result python: here.serviceStop(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="serviceconfig-type-macro" tal:omit-tag="">
+	<tal:block tal:condition="python: type == 'ip'">
+		<div metal:use-macro="here/resource-form-macros/macros/ip_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'fs'">
+		<div metal:use-macro="here/resource-form-macros/macros/fs_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'gfs' or type == 'clusterfs'">
+		<div metal:use-macro="here/resource-form-macros/macros/gfs_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'netfs'">
+		<div metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'nfsexport'">
+		<div metal:use-macro="here/resource-form-macros/macros/nfsx_macro"/>
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'nfsclient'">
+		<div metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'smb'">
+		<div metal:use-macro="here/resource-form-macros/macros/smb_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'script'">
+		<div metal:use-macro="here/resource-form-macros/macros/scr_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'apache'">
+		<div metal:use-macro="here/resource-form-macros/macros/apache_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'openldap'">
+		<div metal:use-macro="here/resource-form-macros/macros/openldap_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'mysql'">
+		<div metal:use-macro="here/resource-form-macros/macros/mysql_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'lvm'">
+		<div metal:use-macro="here/resource-form-macros/macros/lvm_macro" />
+	</tal:block>
+
+	<tal:block tal:condition="python: type == 'postgres-8'">
+		<div metal:use-macro="here/resource-form-macros/macros/postgres-8_macro" />
+	</tal:block>
+	<tal:block tal:condition="python: type == 'tomcat-5'">
+		<div metal:use-macro="here/resource-form-macros/macros/tomcat-5_macro" />
+	</tal:block>
+	<tal:block tal:condition="python: type == 'SAPInstance'">
+		<div metal:use-macro="here/resource-form-macros/macros/SAPInstance_macro" />
+	</tal:block>
+	<tal:block tal:condition="python: type == 'SAPDatabase'">
+		<div metal:use-macro="here/resource-form-macros/macros/SAPDatabase_macro" />
+	</tal:block>
+</div>
+
+<div metal:define-macro="service-config-head-macro" tal:omit-tag="">
+	<script type="text/javascript"
+		src="/luci/homebase/homebase_common.js">
+	</script>
+	<script type="text/javascript" src="conga_ajax.js"></script>
+	<script type="text/javascript"
+		src="/luci/cluster/resource_form_handlers.js">
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		global global_resources python: here.getResourcesInfo(modelb, request);
+		global sstat python: here.getClusterStatus(request, ricci_agent);
+		global sinfo python: here.getServiceInfo(sstat, modelb, request);
+		global resource_list sinfo/resource_list | python:[];
+		global running sinfo/running | nothing" />
+
+	<tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>'" />
+		var uuid_list = <tal:block tal:replace="sinfo/uuid_list | nothing" />;
+		var global_resources = <tal:block tal:replace="python: map(lambda x: str(x['name']), global_resources) or 'null'" />;
+		var active_resources = <tal:block tal:replace="python: map(lambda x: str(x['name']), resource_list) or 'null'" />;
+		var resource_names = <tal:block tal:replace="python: (map(lambda x: str(x['name']), global_resources) + map(lambda x: str(x['name']), resource_list)) or 'null'" />;
+	<tal:block tal:replace="structure string: </script>" />
+</div>
+
+<div metal:define-macro="serviceconfig-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — services — Configure a service');
+	</script>
+	<tal:block metal:use-macro="here/cluster_svc-macros/macros/service-config-head-macro" />
+
+	<table class="cluster service" width="100%">
+		<tr class="cluster service info_top">
+			<td class="cluster service service_name">
+				<strong class="service_name">Service Name</strong>
+				<span
+					tal:content="sinfo/name | nothing"
+					tal:attributes="class python: running and 'running' or 'stopped'" />
+			</td>
+			<td class="cluster service service_action"
+				tal:condition="python: sinfo and 'innermap' in sinfo">
+				<form method="post">
+					<input type="hidden" name="pagetype" tal:attributes="
+						value request/pagetype | request/form/pagetype | nothing" />
+					<select name="gourl"
+						tal:define="global innermap sinfo/innermap;
+						starturls innermap/links">
+
+						<option value="">Choose a Task...</option>
+						<tal:block tal:condition="running">
+							<option
+								tal:attributes="value innermap/restarturl">Restart this service</option>
+
+							<option
+								tal:attributes="value innermap/disableurl">Disable this service</option>
+
+							<option value="">----------</option>
+
+							<tal:block tal:repeat="starturl innermap/links">
+								<option
+									tal:condition="not:exists: starturl/migrate"
+									tal:attributes="value starturl/url">Relocate this service to <span tal:replace="starturl/nodename" />
+								</option>
+							</tal:block>
+
+							<tal:block tal:condition="innermap/is_vm | nothing">
+								<option value="">----------</option>
+								<tal:block tal:repeat="starturl innermap/links">
+									<option
+										tal:condition="exists: starturl/migrate"
+										tal:attributes="value starturl/url">Migrate this service to <span tal:replace="starturl/nodename" /></option>
+								</tal:block>
+							</tal:block>
+						</tal:block>
+
+						<tal:block tal:condition="not: running">
+							<option
+								tal:attributes="value innermap/enableurl">Enable this service</option>
+							<option value="">----------</option>
+
+							<tal:block tal:repeat="starturl innermap/links">
+								<option
+									tal:condition="not:exists: starturl/migrate"
+									tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename" />
+								</option>
+							</tal:block>
+
+							<option value="">----------</option>
+
+							<option
+								tal:attributes="value innermap/delurl | nothing"
+								tal:content="string:Delete this service" />
+						</tal:block>
+					</select>
+
+					<input type="button" value="Go"
+						onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
+				</form>
+			</td>
+		</tr>
+
+		<tr class="cluster service info_middle">
+			<td class="cluster service service_status">
+				<strong>Service Status</strong>
+
+				<tal:block tal:condition="running">
+					<span tal:condition="exists:innermap/current"
+						tal:replace="innermap/current | nothing" />
+					<span tal:condition="not:exists:innermap/current"
+						tal:replace="string:Running" />
+				</tal:block>
+
+				<tal:block tal:condition="not:running">
+					Stopped
+				</tal:block>
+			</td>
+		</tr>
+	</table>
+	<br/>
+
+	<h2>Service Composition</h2>
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
+	<div id="resskel" class="invisible">
+		<tal:block metal:use-macro="here/resource-form-macros/macros/service-compose-macro" />
+	</div>
+
+	<div class="service_comp_list" tal:attributes="id sinfo/root_uuid">
+	<div tal:repeat="res resource_list"
+		tal:attributes="
+			class python: 'service_comp rc_indent' + str(res['indent_ctr']);
+			id python: res['uuid']">
+
+		<tal:block
+			tal:condition="python: 'max_depth' in res and res['max_depth'] > 0"
+			tal:replace="structure python: '<div class=nothing>'" />
+
+		<tal:block tal:define="
+			global type python: 'tag_name' in res and res['tag_name'] or '';
+			global resourceIsRef res/ref_object | nothing" />
+
+		<tal:block metal:use-macro="here/cluster_svc-macros/macros/serviceconfig-type-macro" />
+
+		<tal:block
+			tal:condition="python: 'indent_ctr' in res and 'max_depth' in res"
+			tal:replace="structure python: '</div>' * (res['indent_ctr'] - res['max_depth'])" />
+		</div>
+	</div>
+	<div class="service_comp_list">
+		<form name="service_name_form">
+			<table class="rescfg">
+				<tr>
+					<td>Automatically start this service</td>
+					<td><input type="checkbox" name="autostart"
+							tal:attributes="checked python: ('autostart' in sinfo and sinfo['autostart'].lower() != 'false') and 'checked'" />
+					</td>
+				</tr>
+				<tr>
+					<td>Run exclusive</td>
+					<td><input type="checkbox" name="exclusive"
+							tal:attributes="checked python: ('exclusive' in sinfo and sinfo['exclusive'].lower() != 'false') and 'checked'" />
+					</td>
+				</tr>
+				<tr>
+					<td>Failover Domain</td>
+					<td>
+						<select name="domain">
+							<option value=""
+								tal:attributes="selected python: (not 'domain' in sinfo or not sinfo['domain']) and 'selected' or ''">None</option>
+							<tal:block tal:repeat="f sinfo/fdoms">
+								<option tal:content="f"
+									tal:attributes="
+										value f;
+										selected python: ('domain' in sinfo and sinfo['domain'] == f) and 'selected' or ''" />
+							</tal:block>
+						</select>
+					</td>
+				</tr>
+				<tr class="systemsTable">
+					<td>Recovery policy</td>
+					<td>
+						<select name="recovery">
+							<option value="">Select a recovery policy</option>
+							<option name="relocate" value="relocate"
+								tal:content="string:Relocate"
+								tal:attributes="selected python: ('recovery' in sinfo and sinfo['recovery'] == 'relocate') and 'selected' or ''" />
+							<option name="restart" value="restart"
+								tal:content="string:Restart"
+								tal:attributes="selected python: ('recovery' in sinfo and sinfo['recovery'] == 'restart') and 'selected' or ''" />
+							<option name="disable" value="disable"
+								tal:content="string:Disable"
+								tal:attributes="selected python: ('recovery' in sinfo and sinfo['recovery'] == 'disable') and 'selected' or ''" />
+						</select>
+					</td>
+				</tr>
+			</table>
+			<input type="hidden" name="service_name"
+				tal:attributes="value sinfo/name | string:1" />
+		</form>
+
+		<form name="master" method="post">
+		<input type="hidden" name="pagetype"
+			tal:attributes="
+				value request/pagetype | request/form/pagetype | nothing" />
+		<input type="hidden" name="orig_pagetype"
+			tal:attributes="
+				value request/pagetype | request/form/pagetype | nothing" />
+		<input type="hidden" name="clustername"
+			tal:attributes="value clusterinfo/clustername" />
+		<input type="button" value="Add a resource to this service"
+			onclick="add_child_resource(this.form);" />
+		<input type="button" value="Save changes"
+			onClick="forms_to_xml(this, this.form)" />
+		<input type="hidden" name="uuid" value="toplevel" />
+		<input type="hidden" name="parent_uuid" value="_toplevel" />
+		<input type="hidden" name="tree_level" value="-1" />
+		<input type="hidden" name="svc_name" value="" />
+		<input type="hidden" name="autostart" value="-1" />
+		<input type="hidden" name="exclusive" value="-1" />
+		<input type="hidden" name="recovery" />
+		<input type="hidden" name="domain" />
+		<input type="hidden" name="form_xml" />
+		<input type="hidden" name="action" value="edit" />
+		</form>
+	</div>
+
+	<div class="invisible" id="global_resources_block">
+		<tal:block tal:repeat="gr global_resources">
+			<tal:block tal:define="
+				global res gr;
+				global type python: 'tag_name' in res and res['tag_name'] or '';
+				global resourceIsRef python: True" />
+			<tal:block metal:use-macro="here/cluster_svc-macros/macros/serviceconfig-type-macro" />
+		</tal:block>
+	</div>
+</div>
+
+<div metal:define-macro="service-form">
+	<h2>Service Form</h2>
+</div>
+
+<div metal:define-macro="serviceprocess-form">
+	<h2>Service Process Form</h2>
+</div>
+
+<div metal:define-macro="servicedelete-form">
+	<h2>Service Delete Form</h2>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<span tal:define="
+		result python: here.serviceDelete(ricci_agent, request)" />
+</div>
+
+</body>
+</html>
/cvs/cluster/conga/luci/cluster/fdom-macros,v  -->  standard output
revision 1.1
--- conga/luci/cluster/fdom-macros
+++ -	2007-11-19 18:22:48.929331000 +0000
@@ -0,0 +1,227 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+    <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="fdoms-form">
+	<h2>Failover Domains Form</h2>
+</div>
+
+<div metal:define-macro="fdomlist-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — failover domains');
+	</script>
+
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		global sta python: here.getClusterStatus(request, ricci_agent);
+		global fdominfo python: here.getFdomsInfo(modelb, request, sta);" />
+
+	<div class="cluster fdom" tal:repeat="fdom fdominfo">
+	<div class="cluster fdom fdomname">
+		<img src="fDom.png" />
+		<strong class="cluster fdom">Failover Domain Name<strong>:
+		<a class="cluster fdom_link"
+			tal:attributes="href fdom/cfgurl"
+			tal:content="fdom/name" />
+	</div>
+
+	<div class="fdomordered">
+		<h4>This Failover Domain is
+		<strong>
+			<span tal:replace="python: fdom['ordered'] == True and 'Ordered' or 'Unordered'" />
+		</strong>
+	</div>
+
+	<tal:block tal:define="nofailback python:fdom.get('nofailback')">
+		<div class="formordered"
+			tal:condition="python:nofailback is True">
+			<h4>Services running in this failover domain will not be failed back.
+		</div>
+	</tal:block>
+
+	<div class="fdomrestricted">
+		<h4>This Failover Domain is <span tal:replace="python: fdom['restricted'] == True and 'Restricted' or 'Unrestricted'"/></h4>
+	</div>
+
+	<div class="fdommembers">
+		<h3>Members of this Failover Domain</h3>
+		<ul class="cluster node">
+			<tal:block tal:repeat="node fdom/nodeslist">
+				<tal:block
+					tal:define="global nodeclass python: 'cluster ' + (node['status'] == '0' and 'node_active' or (node['status'] == '1' and 'node_inactive' or 'node_unknown'));" />
+				<li tal:attributes="class python: nodeclass">
+					<a tal:content="node/nodename"
+						tal:attributes="
+							href node/nodecfgurl;
+							class python: nodeclass;" />
+				</li>
+			</tal:block>
+		</ul>
+	</div>
+
+	<div class="fdomservice">
+		<h2>Services employing this Failover Domain: </h2>
+		<ul>
+			<tal:block tal:condition="python: len(fdom['svclist']) < 1">
+				<li>No Services Defined</li>
+			</tal:block>
+			<tal:block tal:repeat="svc fdom/svclist">
+				<tal:block
+					tal:define="global svcclass python: svc['status'] == 'true' and 'running' or 'stopped'" />
+
+				<li tal:attributes="class python: 'cluster cluster_service ' + svcclass">
+					<a tal:content="python: svc['name'] + ' ' + (svcclass == 'running' and ('Running on node ' + svc['location']) or 'Not running')"
+						tal:attributes="href svc/svcurl;
+							class python: 'cluster cluster_service ' + svcclass" />
+				</li>
+			</tal:block>
+		</ul>
+		<hr/>
+	</div>
+
+	</div>
+</div>
+
+<tal:block metal:define-macro="fdom-macro">
+<script type="text/javascript"
+	src="/luci/homebase/homebase_common.js">
+</script>
+<script type="text/javascript"
+	src="/luci/cluster/validate_fdom.js">
+</script>
+
+<form method="post" action="">
+	<input type="hidden" name="clustername"
+		tal:attributes="value request/clustername | nothing" />
+	<input type="hidden" name="pagetype"
+		tal:attributes="value request/pagetype | nothing" />
+	<input type="hidden" name="oldname"
+		tal:condition="exists: fdom/name"
+		tal:attributes="value fdom/name | nothing" />
+
+	<table class="systemsTable" width="100%">
+		<thead class="systemsTable">
+			<tr class="systemsTable">
+				<td width="60%"><strong>Failover Domain Name</strong></td>
+				<td>
+					<input type="text" name="name"
+						tal:attributes="value fdom/name | nothing" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Prioritized</td>
+				<td>
+					<input type="checkbox" name="prioritized" id="prioritized"
+						onchange="fdom_set_prioritized(this.form, this.checked)"
+						tal:attributes="checked python: (fdom and 'prioritized' in fdom and fdom['prioritized'] == '1') and 'checked' or ''" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Restrict failover to this domain's members</td>
+				<td>
+					<input type="checkbox" name="restricted"
+						tal:attributes="checked python: (fdom and 'restricted' in fdom and fdom['restricted'] == '1') and 'checked' or ''" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td>Do not fail back services in this domain</td>
+				<td>
+					<input type="checkbox" name="nofailback"
+						tal:attributes="checked python: (fdom and 'nofailback' in fdom and fdom['nofailback'] == '1') and 'checked' or ''" />
+				</td>
+			</tr>
+			<tr class="systemsTable">
+				<td class="systemsTable" colspan="2">
+					<p></p>
+					<p class="reshdr">Failover domain membership</p>
+				</td>
+			</tr>
+		</thead>
+
+		<tfoot class="systemsTable">
+			<tr class="systemsTable"><td>
+				<div class="hbSubmit">
+					<input type="button" name="add" value="Submit"
+						onclick="validate_add_fdom(this.form)" />
+				</div>
+			</td></tr>
+		</tfoot>
+
+		<tbody width="60%">
+			<tr class="systemsTable">
+				<th class="systemsTable" width="33%">Node</th>
+				<th class="systemsTable" width="10%">Member</th>
+				<th class="systemsTable" width="57%">Priority</th>
+			</tr>
+			<tal:block tal:repeat="n python:here.getnodes(modelb)">
+				<tr class="systemsTable">
+					<td class="systemsTable" width="33%">
+						<tal:block tal:replace="n" />
+					<td class="systemsTable" width="10%">
+						<input type="checkbox"
+							onchange="fdom_set_member(this.form, this.name, this.checked)"
+							tal:attributes="
+								checked python: ('members' in fdom and n in fdom['members']) and 'checked' or '';
+								name n" />
+					</td>
+					<td class="systemsTable" width="75%">
+						<input type="text" class="fdom_priority"
+							tal:attributes="
+								id n;
+								name python: '__PRIORITY__' + n;
+								value python: ('members' in fdom and n in fdom['members'] and 'priority' in fdom['members'][n]) and fdom['members'][n]['priority'] or '1';
+								disabled python: (not fdom or not 'prioritized' in fdom or fdom['prioritized'] != '1' or not 'members' in fdom or not n in fdom['members']) and 'disabled' or ''" />
+					</td>
+				</tr>
+			</tal:block>
+		</tbody>
+	</table>
+</form>
+
+</tal:block>
+
+<div metal:define-macro="fdomadd-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — failover domains — Add a failover domain');
+	</script>
+
+	<h2>Add a Failover Domain</h2>
+	<tal:block tal:define="fdom python:{}">
+		<tal:block metal:use-macro="here/fdom-macros/macros/fdom-macro" />
+	</tal:block>
+</div>
+
+<div metal:define-macro="fdomconfig-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — failover domains — Configure a failover domain');
+	</script>
+</div>
+
+<div metal:define-macro="fdom-form">
+	<h2>Failover Domain Form</h2>
+	<tal:block tal:define="fdom python:here.getFdomInfo(modelb, request)">
+		<tal:block metal:use-macro="here/fdom-macros/macros/fdom-macro" />
+	</tal:block>
+</div>
+
+<div metal:define-macro="fdomprocess-form">
+	<h2>Failover Domain Process Form</h2>
+</div>
+
+</body>
+</html>
/cvs/cluster/conga/luci/cluster/fence-macros,v  -->  standard output
revision 1.1
--- conga/luci/cluster/fence-macros
+++ -	2007-11-19 18:22:49.045000000 +0000
@@ -0,0 +1,1999 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+    <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="fencedevprocess-form">
+	<h2>Fence Device Process Form</h2>
+</div>
+
+<div metal:define-macro="fencedevs-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — shared fence devices');
+	</script>
+
+	<h2>Shared Fence Devices for Cluster: <span tal:replace="request/clustername" /></h2>
+
+	<tal:block tal:define="
+		global fencedevinfo python: here.getFencesInfo(modelb, request);
+		global fencedevs python: fencedevinfo['fencedevs']" />
+
+	<tal:block tal:repeat="fencedev fencedevs">
+		<h3>Agent type: <span tal:content="fencedev/pretty_name"/></h3>
+		<h3>Name: <a class="running" tal:attributes="href fencedev/cfgurl"><span tal:replace="fencedev/name" /></a></h3>
+		<h3>Nodes using this device for fencing:</h3>
+		<ul>
+			<tal:block tal:define="global usednodes python:fencedev['nodesused']"/>
+			<tal:block tal:condition="python: len(usednodes) == 0">
+				<li>No nodes currently employ this fence device</li>
+			</tal:block>
+
+			<tal:block tal:repeat="usednode usednodes">
+				<li><a class="cluster node"
+						tal:attributes="href usednode/nodeurl"
+						tal:content="usednode/nodename" />
+				</li>
+			</tal:block>
+		</ul>
+		<hr/>
+	</tal:block>
+</div>
+
+<div metal:define-macro="fencedevlist-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — fence devices');
+	</script>
+	<h2>Fence Device List Form</h2>
+</div>
+
+<div metal:define-macro="fencedevadd-form">
+	<script type="text/javascript"
+		src="/luci/cluster/fence_device.js">
+	</script>
+
+	<script type="text/javascript"
+		src="/luci/homebase/homebase_common.js">
+	</script>
+
+	<script type="text/javascript"
+		src="/luci/cluster/validate_fence.js">
+	</script>
+
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — fence devices - Add a new fence device');
+	</script>
+
+	<h2>Add a Sharable Fence Device</h2>
+
+	<div id="invisible" class="invisible">
+		<tal:block metal:use-macro="here/fence-macros/macros/shared-fence-form-list" />
+	</div>
+
+	<table id="fence_devices" class="cluster node fence">
+		<tfoot class="fence">
+		<tr class="cluster node fence"><td class="cluster node fence">
+		</td></tr>
+		</tfoot>
+		<tbody class="fence">
+		<tr class="cluster node info_top fence">
+			<td class="cluster node fence">
+				<span class="fence">
+					<strong class="cluster node">Fencing Type</strong>
+				</span>
+			</td>
+		</tr>
+		<tr class="cluster node info_top fence">
+			<td class="cluster node fence_main fence">
+				<form name="main_fence_form">
+					<select name="select_div"
+						onchange="swap_fence_div('fence_container',
+									this.options[this.selectedIndex].value)">
+						<tal:block metal:use-macro="here/fence-macros/macros/shared-fence-option-list" />
+					</select>
+				</form>
+
+				<form name="fencedevaddform" action="" method="post">
+					<div id="fence_container">
+					</div>
+					<div class="hbSubmit">
+						<input type="button"
+							value="Add this shared fence device"
+							onclick="validate_fence_form(this.form)" />
+
+						<input type="hidden" name="pagetype"
+							value="51" id="pagetype" />
+
+						<input type="hidden" name="clustername" id="pagetype"
+							tal:attributes="value request/clustername" />
+				</form>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+
+	<script type="text/javascript">
+		swap_fence_div('fence_container',
+			document.main_fence_form.select_div.options[document.main_fence_form.select_div.selectedIndex].value);
+	</script>
+</div>
+
+<div metal:define-macro="fencedevconfig-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — fence devices - Configure a fence device');
+	</script>
+
+	<h3>Configure a Fence Device</h3>
+
+	<tal:block tal:define="fencedevs python: here.getFenceInfo(modelb, None)">
+
+	<tal:block tal:condition="exists: fencedevs/fencedevs">
+		<table class="systemsTable">
+			<thead class="systemsTable">
+				<tr class="systemsTable">
+					<th class="systemsTable" width="100">Name</th>
+					<th class="systemsTable" width="100">Type</th>
+					<th class="systemsTable" width="75">Configure</th>
+				</tr>
+			</thead>
+			<tr class="systemsTable" tal:repeat="f fencedevs/fencedevs">
+				<td class="systemsTable" tal:content="f/name | string:[unknown]"/>
+				<td class="systemsTable" tal:content="f/agent | string:[unknown]"/>
+				<td tal:condition="python: 'name' in f and 'clustername' in request">
+					<a class="cluster"
+						tal:attributes="
+							href python:str('/luci/cluster/index_html?pagetype=54&fencename=' + f['name'] + '&clustername=' + request['clustername'])">
+						configure
+					</a>
+				</td>
+			</tr>
+		</table>
+	</tal:block>
+	</tal:block>
+</div>
+
+<div metal:define-macro="fencedev-cond-ladder">
+	<tal:block tal:condition="python: cur_fence_type == 'fence_apc'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-apc" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_mcdata'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-mcdata" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_wti'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-wti" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_ilo'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ilo" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_drac'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-drac" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_rsa'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rsa" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_brocade'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-brocade" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_sanbox2'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-sanbox2" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_vixel'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vixel" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_gnbd'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-gnbd" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_egenera'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-egenera" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_bladecenter'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bladecenter" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_bullpap'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bullpap" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_rps10'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rps10" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_ipmilan'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ipmilan" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_xvm'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-xvm" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_scsi'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-scsi" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_manual'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-manual" />
+	</tal:block>
+
+	<tal:block tal:condition="exists:cur_fencedev/unknown">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-unknown" />
+	</tal:block>
+</div>
+
+
+<div metal:define-macro="fencedev-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — fence devices - Configure a fence device');
+	</script>
+
+	<script type="text/javascript"
+		src="/luci/homebase/homebase_common.js">
+	</script>
+
+	<script type="text/javascript"
+		src="/luci/cluster/validate_fence.js">
+	</script>
+
+	<h2>Fence Device Form</h2>
+
+	<div class="cluster fencedev fence">
+		<tal:block tal:define="
+			global cur_fencename request/fencename | nothing;
+			global cur_cluster request/clustername | nothing;
+			global cur_fence_type nothing" />
+
+		<tal:block tal:condition="cur_fencename">
+			<tal:block tal:define="
+					global cur_fencedev python:here.getFence(modelb,request);
+					global cur_fence_type cur_fencedev/agent | nothing" />
+		</tal:block>
+
+		<form name="fencedeveditform" action="" method="post">
+			<tal:block
+				metal:use-macro="here/fence-macros/macros/fencedev-cond-ladder" />
+
+			<input type="hidden" name="pagetype" value="54" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername" />
+			<input type="hidden" name="fencename"
+				tal:attributes="value request/fencename" />
+
+			<div class="hbSubmit">
+				<input type="button" value="Update this fence device"
+					onclick="validate_fence_form(this.form)" />
+			</div>
+		</form>
+
+		<form name="fencedevdeleteform" action="" method="post">
+			<input type="hidden" name="pagetype" value="57" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername" />
+			<input type="hidden" name="fencename"
+				tal:attributes="value request/fencename" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value request/fencename" />
+			<div class="hbSubmit">
+				<input type="button" value="Delete this fence device"
+					onclick="if (confirm('Delete this fence device?')) this.form.submit()" />
+			</div>
+		</form>
+	</div>
+</div>
+
+<div metal:define-macro="shared-fence-option-list">
+	<option>Select a shared fence device</option>
+	<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_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>Select a fence device</option>
+	<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_ilo" value="fence_ilo">HP iLO</option>
+	<option name="fence_rsa" value="fence_rsa">IBM RSA II</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_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-unknown"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_unknown" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>[unknown]</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<span tal:replace="cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-apc"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_apc" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>APC Power Switch</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						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"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_apc" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-mcdata"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_mcdata" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>McData SAN Switch</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fendev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						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"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_mcdata" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-wti"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_wti" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>WTI Power Switch</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" 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 fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_wti" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-ilo"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_ilo" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>HP iLO</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Hostname</td>
+				<td>
+					<input name="hostname" type="text"
+						tal:attributes="value cur_fencedev/hostname | cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="value cur_fencedev/login | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" type="password" autocomplete="off"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="fence_type" value="fence_ilo" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-drac"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_drac" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Dell Drac</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="value cur_fencedev/login | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" type="password" autocomplete="off"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="fence_type" value="fence_drac" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-rsa"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_rsa" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>IBM RSA II</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Hostname</td>
+				<td>
+					<input name="hostname" type="text"
+						tal:attributes="value cur_fencedev/hostname | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="value cur_fencedev/login | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" type="password" autocomplete="off"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="fence_type" value="fence_rsa" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-brocade"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_brocade" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Brocade Fabric Switch</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						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"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_brocade" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-sanbox2"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_sanbox2" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>QLogic SANbox2</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						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"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_sanbox2" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-vixel"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_vixel" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Vixel SAN Switch</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" 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 fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_vixel" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-gnbd"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_gnbd" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>GNBD</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Servers (whitespace separated list)</td>
+				<td>
+					<input name="servers" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/servers | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_gnbd" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-egenera"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_egenera" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Egenera SAN Controller</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>CServer</td>
+				<td>
+					<input name="cserver" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/cserver | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>ESH Path (Optional)</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/login | string:/opt/pan-mgr/bin/esh" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_egenera" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-bladecenter"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_bladecenter" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>IBM Blade Center</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="value cur_fencedev/login | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" type="password" autocomplete="off"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_bladecenter" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-bullpap"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_bullpap" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Bull PAP</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						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"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_bullpap" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-rps10"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_rps10" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>RPS10 Serial Switch</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Device Name</td>
+				<td>
+					<input name="device" type="text"
+						tal:attributes="value cur_fencedev/device | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_fencedev/port | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="fence_type" value="fence_rps10" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-xvm"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_xvm" class="fencedev">
+		<table>
+			<tr>
+				<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="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_xvm" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-scsi"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_scsi" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>SCSI Reservation Fencing</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="sharable" value="1" />
+		<input type="hidden" name="fence_type" value="fence_scsi" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-ipmilan"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_ipmilan" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>IPMI Lan</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddr" type="text"
+						tal:attributes="value cur_fencedev/ipaddr | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td>
+					<input name="login" type="text"
+						tal:attributes="value cur_fencedev/login | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="passwd" type="password" autocomplete="off"
+						tal:attributes="value nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<span title="Full path to a script to generate fence password">Password Script (optional)</span>
+				</td>
+				<td>
+					<input type="text" name="passwd_script"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/passwd_script | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Authentication Type</td>
+				<td>
+					<input name="auth" type="text" title="Options are to leave blank for none, password, or md5"
+						tal:attributes="value cur_fencedev/auth | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Use Lanplus</td>
+				<td>
+					<tal:block tal:condition="exists: cur_fencedev">
+						<input name="lanplus" type="checkbox"
+							tal:attributes="checked python: ('lanplus' in cur_fencedev and cur_fencedev['lanplus'] == '1') and 'checked' or ''"
+						/>
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fencedev">
+						<input name="lanplus" type="checkbox" />
+					</tal:block>
+				</td>
+			</tr>
+		</table>
+
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+
+		<input type="hidden" name="fence_type" value="fence_ipmilan" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-manual"
+	tal:attributes="id cur_fencedev/name | nothing">
+
+	<div id="fence_manual" class="fencedev">
+		<table>
+			<tr>
+				<td><strong class="cluster">Fence Type</strong></td>
+				<td>Manual Fencing</td>
+			</tr>
+			<tr>
+				<td>Name</td>
+				<td>
+					<input name="name" type="text"
+						tal:attributes="value cur_fencedev/name | nothing" />
+				</td>
+			</tr>
+		</table>
+		<tal:block tal:condition="exists: cur_fencedev">
+			<input type="hidden" name="existing_device" value="1" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value cur_fencedev/name | nothing" />
+		</tal:block>
+		<input type="hidden" name="fence_type" value="fence_manual" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-list">
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-apc" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-mcdata" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-wti" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-ilo" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-drac" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rsa" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-brocade" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-sanbox2" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vixel" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-gnbd" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-egenera" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bladecenter" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bullpap" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-rps10" />
+	<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-manual" />
+</div>
+
+<div metal:define-macro="shared-fence-form-list">
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-apc" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-mcdata" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-wti" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-brocade" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-sanbox2" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vixel" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-gnbd" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-egenera" />
+	<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bladecenter" />
+	<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" />
+</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/fence-macros/macros/fence-form-apc" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_mcdata'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-mcdata" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_wti'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-wti" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_brocade'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-brocade" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_sanbox2'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-sanbox2" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_vixel'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-vixel" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_gnbd'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-gnbd" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_egenera'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-egenera" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bladecenter'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bladecenter" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bullpap'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-bullpap" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_xvm'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-xvm" />
+	</tal:block>
+	<tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_scsi'">
+		<tal:block metal:use-macro="here/fence-macros/macros/fence-form-scsi" />
+	</tal:block>
+</tal:block>
+</div>
+
+<div metal:define-macro="fence-instance-form-apc"
+	tal:omit-tag="exists: cur_fence_dev_id">
+
+	<div id="fence_apc_instance" name="fence_apc" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>Switch (optional)</td>
+				<td>
+					<input name="switch" type="text"
+						tal:attributes="value cur_instance/switch | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_apc" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-egenera"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_egenera_instance" name="fence_egenera" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>lpan</td>
+				<td>
+					<input name="lpan" type="text"
+						tal:attributes="value cur_instance/lpan | nothing" />
+				</td>
+			</tr>
+			<tr>
+				<td>pserver</td>
+				<td>
+					<input name="pserver" type="text"
+						tal:attributes="value cur_instance/pserver | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_egenera" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-wti"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_wti_instance" name="fence_wti" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_wti" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-brocade"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_brocade_instance" name="fence_brocade" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_brocade" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-vixel"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_vixel_instance" name="fence_vixel" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_vixel" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-sanbox2"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_sanbox2_instance" name="fence_sanbox2" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_sanbox2" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-mcdata"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_mcdata_instance" name="fence_mcdata" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Port</td>
+				<td>
+					<input name="port" type="text"
+						tal:attributes="value cur_instance/port | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_mcdata" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-gndb"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_gnbd_instance" name="fence_gnbd" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>IP Address</td>
+				<td>
+					<input name="ipaddress" type="text"
+						tal:attributes="value cur_instance/ipaddress | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_gnbd" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-bladecenter"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_bladecenter_instance" name="fence_bladecenter" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Blade</td>
+				<td>
+					<input name="blade" type="text"
+						tal:attributes="value cur_instance/blade | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_bladecenter" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-bullpap"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_bullpap_instance" name="fence_bullpap" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Domain</td>
+				<td>
+					<input name="domain" type="text"
+						tal:attributes="value cur_instance/domain | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_bullpap" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-scsi"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_scsi_instance" name="fence_scsi" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Node name</td>
+				<td>
+					<input type="text" name="node" disabled="disabled"
+						tal:attributes="value request/node | nothing" />
+				</td>
+			</tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_scsi" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-xvm"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_xvm_instance" name="fence_xvm" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
+		<table>
+			<tr>
+				<td>Domain</td>
+				<td>
+					<input name="domain" type="text"
+						tal:attributes="value cur_instance/domain | nothing" />
+				</td>
+			</tr>
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
+		</table>
+
+		<input type="hidden" name="option" tal:condition="exists:cur_instance"
+			tal:attributes="value cur_instance/option |nothing" />
+		<input type="hidden" name="fence_type" value="fence_xvm" />
+		<input type="hidden" name="fence_instance" value="1" />
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-instance-form-list">
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-apc" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-egenera" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-wti" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-brocade" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-vixel" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-sanbox2" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-mcdata" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-gndb" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-bullpap" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-scsi" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-xvm" />
+	<tal:block
+		metal:use-macro="here/fence-macros/macros/fence-instance-form-bladecenter" />
+</div>
+
+<div metal:define-macro="fencedev-instance-cond-ladder"
+	tal:condition="exists: cur_fence_type">
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_apc'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-apc" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_mcdata'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-mcdata" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_wti'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-wti" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_brocade'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-brocade" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_sanbox2'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-sanbox2" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_vixel'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-vixel" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_gnbd'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-gnbd" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_egenera'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-egenera" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_bullpap'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-bullpap" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_scsi'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-scsi" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_xvm'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-xvm" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_bladecenter'">
+		<tal:block
+			metal:use-macro="here/fence-macros/macros/fence-instance-form-bladecenter" />
+	</tal:block>
+</div>
+
+</body>
+</html>
/cvs/cluster/conga/luci/cluster/system_svc-macros,v  -->  standard output
revision 1.1
--- conga/luci/cluster/system_svc-macros
+++ -	2007-11-19 18:22:49.199275000 +0000
@@ -0,0 +1,118 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+    <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="system-svc-form">
+	<script type="text/javascript"
+		src="conga_ajax.js">
+	</script>
+	<script type="text/javascript"
+		src="/luci/cluster/validate_sys_svc.js">
+	</script>
+	<h2>Configure System Services</h2>
+
+	<form name="svcform" method="post" action="">
+
+	<input type="hidden" name="pagetype"
+		tal:attributes="value request/pagetype | nothing" />
+
+	<input type="hidden" name="systemname"
+		tal:attributes="value request/systemname | nothing" />
+
+	<table class="systemsTable"
+		tal:define="svcinfo python:'systemname' in request and here.get_sys_svc_list(request, request['systemname']) or []">
+		<tr class="systemsTable">
+			<th class="systemsTable">Name</th>
+			<th class="systemsTable">State</th>
+			<th class="systemsTable">Enabled at boot</th>
+			<th></th>
+		</tr>
+
+		<tr tal:repeat="s svcinfo">
+			<td class="systemsTable">
+				<span tal:content="s/name |string:[unknown]"
+					tal:attributes="title s/desc | nothing" />
+			</td>
+
+			<td class="systemsTable">
+				<span
+					tal:content="s/state |string:[unknown]"
+					tal:attributes="id python: '__STATUS__' + s['name']" />
+			</td>
+
+			<td class="systemsTable">
+				<input type="checkbox"
+					tal:attributes="
+						name s/name;
+						id s/name;
+						checked python: s['enabled'] and 'checked' or ''"
+				/>
+			</td>
+
+			<td class="systemsTable"
+				tal:define="
+					restart_disabled python:not s['running'] and 'disabled' or '';
+					start_disabled python:s['running'] and 'disabled' or '';
+					stop_disabled python:not s['running'] and 'disabled' or ''">
+
+				<input type="button"
+					title="start this service"
+					class="svc_control svc_control_start"
+					onfocus="if (this.blur) this.blur()"
+					tal:attributes="
+						onclick python: 'update_sys_svc(\'' + s['starturl'] + '\')';
+						id python: '__START__' + s['name'];
+						name python: '__START__' + s['name'];
+						disabled start_disabled" />
+
+				<input type="button"
+					title="restart this service"
+					class="svc_control svc_control_restart"
+					onfocus="if (this.blur) this.blur()"
+					tal:attributes="
+						onclick python: 'update_sys_svc(\'' + s['restarturl'] + '\')';
+						id python: '__RESTART__' + s['name'];
+						name python: '__RESTART__' + s['name'];
+						disabled restart_disabled" />
+
+				<input type="button"
+					title="stop this service"
+					class="svc_control svc_control_stop"
+					onfocus="if (this.blur) this.blur()"
+					tal:attributes="
+						onclick python: 'update_sys_svc(\'' + s['stopurl'] + '\')';
+						id python: '__STOP__' + s['name'];
+						name python: '__STOP__' + s['name'];
+						disabled stop_disabled" />
+			</td>
+		</tr>
+		<tr class="systemsTable">
+			<td>
+				<div class="hbSubmit">
+					<input type="submit" value="Update" />
+				</div>
+			</td>
+		</tr>
+	</table>
+	</form>
+</div>
+
+<div metal:define-macro="system-svc-update-form">
+	<tal:block tal:define="ret python: here.validate_manage_svc(request)" />
+</div>
+
+</body>
+</html>


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