From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster form-macros
Date: 19 Nov 2007 18:23:08 -0000 [thread overview]
Message-ID: <20071119182308.10624.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-11-19 18:23:08
Modified files:
luci/cluster : form-macros
Log message:
split up form-macros into manageable modules
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.216&r2=1.217
--- conga/luci/cluster/form-macros 2007/11/06 19:58:00 1.216
+++ conga/luci/cluster/form-macros 2007/11/19 18:23:08 1.217
@@ -15,71 +15,7 @@
<body>
-<div metal:define-macro="entry-form">
-</div>
-
-<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>
+<div metal:define-macro="entry-form"></div>
<div metal:define-macro="clusters-form">
<script type="text/javascript">
@@ -216,7 +152,6 @@
<h2>Cluster Form</h2>
</div>
-
<div metal:define-macro="clusteradd-form">
<script type="text/javascript"
src="/luci/homebase/homebase_common.js">
@@ -549,4726 +484,591 @@
</div>
</div>
-<div metal:define-macro="clusterconfig-form">
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? Configure cluster properties');
+<div metal:define-macro="node-form">
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
</script>
<script type="text/javascript"
- src="conga_ajax.js">
+ src="/luci/cluster/fence_device.js">
</script>
<script type="text/javascript"
- src="validate_xvm_key.js">
+ src="/luci/cluster/validate_fence.js">
+ </script>
+ <script type="text/javascript">
+ set_page_title('Luci ??? cluster ??? nodes ??? properties');
</script>
+ <tal:comment tal:replace="nothing">
+ First table row is status icon, name, and dropdown
+ Second row is daemon macro and failoverdom membership
+ Third row is fencing macro
+ </tal:comment>
<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 nodestatus python: here.getClusterStatus(request, ricci_agent);
+ global nodeinfo python: here.getNodeInfo(modelb, nodestatus, request);
+ global status_class python: 'node_' + (nodeinfo['nodestate'] == '0' and 'active' or (nodeinfo['nodestate'] == '1' and 'inactive' or 'unknown'));
+ global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'))"
+ />
- <tal:block
- tal:define="global clusterinfo python: here.getClusterInfo(modelb, request)" />
+ <table class="cluster node" width="100%">
+ <tr class="cluster node info_top">
+ <td class="cluster node node_name">
+ <img tal:attributes="
+ src python: status_class + '.png'" />
+ <strong class="cluster node">Node Name:</strong>
+ <span
+ tal:attributes="class python: 'cluster node ' + status_class"
+ tal:content="nodeinfo/nodename" />
+ </td>
-<tal:block tal:condition="clusterinfo">
- <span tal:omit-tag="" tal:define="global configTabNum python: 'tab' in request and int(request['tab']) or 1" />
+ <td class="cluster node node_action"
+ tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'">
+ <form method="post">
+ <select name="gourl">
+ <option value="">Choose a Task...</option>
+ <option tal:attributes="value nodeinfo/jl_url"
+ tal:condition="python: not 'ricci_error' in nodeinfo">
+ Have node <span tal:replace="python: nodeinfo['nodestate'] == '0' and 'leave' or 'join'" /> cluster
+ </option>
+ <option value="">----------</option>
+ <option tal:attributes="value nodeinfo/fence_url">Fence this node</option>
+ <option value="" tal:attributes="value nodeinfo/reboot_url"
+ tal:condition="python: not 'ricci_error' in nodeinfo">
+ Reboot this node
+ </option>
+ <option value="">----------</option>
+ <option tal:attributes="value nodeinfo/delete_url"
+ tal:condition="python: not 'ricci_error' in nodeinfo">
+ Delete this node</option>
+ <option tal:attributes="value nodeinfo/force_delete_url | nothing"
+ tal:condition="python: 'ricci_error' in nodeinfo">
+ Force the deletion of this node</option>
+ </select>
- <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" />
+ <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>
- <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>
+ <td class="cluster node node_action"
+ tal:condition="python: nodeinfo['nodestate'] != '0' and nodeinfo['nodestate'] != '1'">
+ <form method="post">
+ <select name="gourl">
+ <option value="">Choose a Task...</option>
+ <option tal:attributes="value nodeinfo/fence_url | nothing">Fence this node</option>
+ <option tal:attributes="value nodeinfo/force_delete_url | nothing">Force the deletion of this node</option>
+ </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>
- <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>
+ <tr class="cluster node info_middle">
+ <td class="cluster node node_status" colspan="2">
+ <strong class="cluster node">Status:</strong>
+ <span tal:attributes="class python: 'cluster node ' + status_class"
+ tal:content="python: cluster_node_status_str" />
+ </td>
+ </tr>
- <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="cluster node info_middle"
+ tal:condition="nodeinfo/gulm_lockserver">
+ <td class="cluster node node_status" colspan="2">
+ This node is a GULM lock server.
+ </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>
+ <tr class="cluster node info_bottom"
+ tal:condition="python: (nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1') and not 'ricci_error' in nodeinfo">
+ <td class="cluster node node_log" colspan="2">
+ <a class="cluster node"
+ tal:attributes="href nodeinfo/logurl" onClick="return popup_log(this, 'notes')">
+ Show recent log activity for this node
+ </a>
+ </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>
+ <hr/>
- <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>
+ <tal:block tal:condition="python: 'ricci_error' in nodeinfo">
+ <strong class="errmsgs">
+ The ricci agent for this node is unresponsive. Node-specific information is not available at this time.
+ </strong>
+ </tal:block>
- <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>
+ <tal:block tal:condition="python: not 'ricci_error' in nodeinfo">
+ <tal:block
+ tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'">
- <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"> </div>
- <strong>XVM fence daemon key distribution</strong>
- </td>
- </tr>
+ <h3>Cluster daemons running on this node</h3>
+ <form name="daemon_form" method="post">
+ <table class="systemsTable">
+ <thead>
+ <tr class="systemsTable">
+ <th class="systemsTable">Daemon</th>
+ <th class="systemsTable">Currently running</th>
+ <th class="systemsTable">Enabled at start-up</th>
+ </tr>
+ </thead>
+ <tfoot class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="3">
+ <div class="systemsTableEnd">
+ <input type="button" value="Update node daemon properties"
+ onclick="if (confirm('Update daemon properties?')) this.form.submit()" />
+ </div>
+ </td></tr>
+ </tfoot>
+ <tbody class="systemsTable">
+ <tr class="systemsTable" tal:repeat="daemon nodeinfo/d_states">
+ <td class="systemsTable"><span tal:replace="daemon/name"/></td>
+ <td class="systemsTable">
+ <tal:block tal:condition="python:daemon['name'] == 'cman'">
+ <span tal:replace="python: (daemon['running'] == 'true' or nodeinfo['nodestate'] == '0') and 'yes' or 'no'" />
+ </tal:block>
+ <tal:block tal:condition="python:daemon['name'] != 'cman'">
+ <span tal:replace="python: daemon['running'] == 'true' and 'yes' or 'no'" />
+ </tal:block>
+ </td>
+ <td class="systemsTable">
+ <input type="hidden" tal:attributes="
+ name python: '__daemon__:' + daemon['name'] + ':';
+ value daemon/name" />
- <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>
+ <input type="hidden" tal:attributes="
+ name python: '__daemon__:' + daemon['name'] + ':';
+ value python: daemon['enabled'] == 'true' and '1' or '0'" />
- <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>
+ <input type="checkbox" tal:attributes="
+ name python: '__daemon__:' + daemon['name'] + ':';
+ checked python: daemon['enabled'] == 'true' and 'checked'" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
- <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>
+ <input type="hidden" name="nodename"
+ tal:attributes="value nodeinfo/nodename | request/nodename | nothing" />
- <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>
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | nothing" />
- <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>
-
- </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>
-
-<div metal:define-macro="clusterprocess-form">
- <tal:block
- tal:define="result python: here.clusterTaskProcess(modelb, request)"/>
- <h2>Cluster Process Form</h2>
-</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/form-macros/macros/fence-form-apc" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-ilo" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-drac" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-rsa" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-rps10" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-ipmilan" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-manual" />
-</div>
-
-<div metal:define-macro="shared-fence-form-list">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
-</div>
-
-<div metal:define-macro="shared-fence-device-list">
-<tal:block tal:condition="exists: cur_fencedev">
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_apc'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_mcdata'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_wti'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_brocade'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_sanbox2'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_vixel'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_gnbd'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_egenera'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bladecenter'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bullpap'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_xvm'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
- </tal:block>
- <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_scsi'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
- </tal:block>
-</tal:block>
-</div>
-
-<div metal:define-macro="fence-instance-form-apc"
- 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/form-macros/macros/fence-instance-form-apc" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-egenera" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-wti" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-vixel" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-sanbox2" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-mcdata" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-gndb" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-bullpap" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-scsi" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-xvm" />
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-bladecenter" />
-</div>
-
-<div metal:define-macro="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/form-macros/macros/fence-instance-form-apc" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_mcdata'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-mcdata" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_wti'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-wti" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_brocade'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_sanbox2'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-sanbox2" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_vixel'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-vixel" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_gnbd'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-gnbd" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_egenera'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-egenera" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_bullpap'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-bullpap" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_scsi'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-scsi" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_xvm'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-xvm" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_bladecenter'">
- <tal:block
- metal:use-macro="here/form-macros/macros/fence-instance-form-bladecenter" />
- </tal:block>
-</div>
-
-<div metal:define-macro="node-form">
- <script type="text/javascript"
- src="/luci/homebase/homebase_common.js">
- </script>
- <script type="text/javascript"
- src="/luci/cluster/fence_device.js">
- </script>
- <script type="text/javascript"
- src="/luci/cluster/validate_fence.js">
- </script>
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? nodes ??? properties');
- </script>
- <tal:comment tal:replace="nothing">
- First table row is status icon, name, and dropdown
- Second row is daemon macro and failoverdom membership
- Third row is fencing macro
- </tal:comment>
-
- <tal:block tal:define="
- global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
-
- <tal:block tal:define="
- global nodestatus python: here.getClusterStatus(request, ricci_agent);
- global nodeinfo python: here.getNodeInfo(modelb, nodestatus, request);
- global status_class python: 'node_' + (nodeinfo['nodestate'] == '0' and 'active' or (nodeinfo['nodestate'] == '1' and 'inactive' or 'unknown'));
- global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'))"
- />
-
- <table class="cluster node" width="100%">
- <tr class="cluster node info_top">
- <td class="cluster node node_name">
- <img tal:attributes="
- src python: status_class + '.png'" />
- <strong class="cluster node">Node Name:</strong>
- <span
- tal:attributes="class python: 'cluster node ' + status_class"
- tal:content="nodeinfo/nodename" />
- </td>
-
- <td class="cluster node node_action"
- tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'">
- <form method="post">
- <select name="gourl">
- <option value="">Choose a Task...</option>
- <option tal:attributes="value nodeinfo/jl_url"
- tal:condition="python: not 'ricci_error' in nodeinfo">
- Have node <span tal:replace="python: nodeinfo['nodestate'] == '0' and 'leave' or 'join'" /> cluster
- </option>
- <option value="">----------</option>
- <option tal:attributes="value nodeinfo/fence_url">Fence this node</option>
- <option value="" tal:attributes="value nodeinfo/reboot_url"
- tal:condition="python: not 'ricci_error' in nodeinfo">
- Reboot this node
- </option>
- <option value="">----------</option>
- <option tal:attributes="value nodeinfo/delete_url"
- tal:condition="python: not 'ricci_error' in nodeinfo">
- Delete this node</option>
- <option tal:attributes="value nodeinfo/force_delete_url | nothing"
- tal:condition="python: 'ricci_error' in nodeinfo">
- Force the deletion of this node</option>
- </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>
-
- <td class="cluster node node_action"
- tal:condition="python: nodeinfo['nodestate'] != '0' and nodeinfo['nodestate'] != '1'">
- <form method="post">
- <select name="gourl">
- <option value="">Choose a Task...</option>
- <option tal:attributes="value nodeinfo/fence_url | nothing">Fence this node</option>
- <option tal:attributes="value nodeinfo/force_delete_url | nothing">Force the deletion of this node</option>
- </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 node info_middle">
- <td class="cluster node node_status" colspan="2">
- <strong class="cluster node">Status:</strong>
- <span tal:attributes="class python: 'cluster node ' + status_class"
- tal:content="python: cluster_node_status_str" />
- </td>
- </tr>
-
- <tr class="cluster node info_middle"
- tal:condition="nodeinfo/gulm_lockserver">
- <td class="cluster node node_status" colspan="2">
- This node is a GULM lock server.
- </td>
- </tr>
-
- <tr class="cluster node info_bottom"
- tal:condition="python: (nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1') and not 'ricci_error' in nodeinfo">
- <td class="cluster node node_log" colspan="2">
- <a class="cluster node"
- tal:attributes="href nodeinfo/logurl" onClick="return popup_log(this, 'notes')">
- Show recent log activity for this node
- </a>
- </td>
- </tr>
- </table>
-
- <hr/>
-
- <tal:block tal:condition="python: 'ricci_error' in nodeinfo">
- <strong class="errmsgs">
- The ricci agent for this node is unresponsive. Node-specific information is not available at this time.
- </strong>
- </tal:block>
-
- <tal:block tal:condition="python: not 'ricci_error' in nodeinfo">
- <tal:block
- tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'">
-
- <h3>Cluster daemons running on this node</h3>
- <form name="daemon_form" method="post">
- <table class="systemsTable">
- <thead>
- <tr class="systemsTable">
- <th class="systemsTable">Daemon</th>
- <th class="systemsTable">Currently running</th>
- <th class="systemsTable">Enabled at start-up</th>
- </tr>
- </thead>
- <tfoot class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="3">
- <div class="systemsTableEnd">
- <input type="button" value="Update node daemon properties"
- onclick="if (confirm('Update daemon properties?')) this.form.submit()" />
- </div>
- </td></tr>
- </tfoot>
- <tbody class="systemsTable">
- <tr class="systemsTable" tal:repeat="daemon nodeinfo/d_states">
- <td class="systemsTable"><span tal:replace="daemon/name"/></td>
- <td class="systemsTable">
- <tal:block tal:condition="python:daemon['name'] == 'cman'">
- <span tal:replace="python: (daemon['running'] == 'true' or nodeinfo['nodestate'] == '0') and 'yes' or 'no'" />
- </tal:block>
- <tal:block tal:condition="python:daemon['name'] != 'cman'">
- <span tal:replace="python: daemon['running'] == 'true' and 'yes' or 'no'" />
- </tal:block>
- </td>
- <td class="systemsTable">
- <input type="hidden" tal:attributes="
- name python: '__daemon__:' + daemon['name'] + ':';
- value daemon/name" />
-
- <input type="hidden" tal:attributes="
- name python: '__daemon__:' + daemon['name'] + ':';
- value python: daemon['enabled'] == 'true' and '1' or '0'" />
-
- <input type="checkbox" tal:attributes="
- name python: '__daemon__:' + daemon['name'] + ':';
- checked python: daemon['enabled'] == 'true' and 'checked'" />
- </td>
- </tr>
- </tbody>
- </table>
-
- <input type="hidden" name="nodename"
- tal:attributes="value nodeinfo/nodename | request/nodename | nothing" />
-
- <input type="hidden" name="clustername"
- tal:attributes="value request/clustername | nothing" />
-
- <input type="hidden" name="pagetype" value="55" />
- </form>
- </tal:block>
-</tal:block>
- <hr/>
-
- <div>
- <h3>Services on this Node</h3>
- <ul class="cluster node">
- <tal:block tal:condition="python: len(nodeinfo['currentservices']) == 0">
- <li>No cluster services are currently running here</li>
- </tal:block>
- <li class="cluster node cluster_service" tal:repeat="svc nodeinfo/currentservices">
- <a class="running" tal:attributes="href svc/svcurl"
- tal:content="svc/servicename" />
- </li>
- </ul>
- </div>
-
- <hr/>
-
- <div class="fdomblock">
- <h3>Failover Domain Membership</h3>
- <ul class="cluster node">
- <tal:block tal:condition="python: len(nodeinfo['fdoms']) == 0">
- <li>This node has no failover domain membership</li>
- </tal:block>
- <li class="cluster node node_fdom" tal:repeat="fdom nodeinfo/fdoms">
- <a class="cluster node" tal:attributes="href fdom/fdomurl">
- <span tal:replace="fdom/name"/>
- </a>
- </li>
- </ul>
- </div>
-
- <hr/>
-
- <div class="invisible" id="fence_device_list">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-list" />
- </div>
-
- <tal:block tal:define="
- global fenceinfo python: here.getFenceInfo(modelb, request);
- global fencedevinfo python: here.getFencesInfo(modelb, request)" />
-
- <div class="invisible" id="shared_fence_devices">
- <tal:block tal:repeat="cur_fencedev fencedevinfo/fencedevs">
- <tal:block metal:use-macro="here/form-macros/macros/shared-fence-device-list" />
- </tal:block>
- </div>
-
- <div class="invisible" id="fence_instances">
- <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-list" />
- </div>
-
- <div id="fence_selection_block" class="invisible">
- <form name="main_fence_form">
- <select name="select_div">
- <option value="fence-form-new-device">------ Use an existing Fence Device ------</option>
- <tal:block tal:repeat="f fencedevinfo/fencedevs">
- <option class="shared_fencedev"
- tal:attributes="value f/name"
- tal:content="python: f['name'] + ' (' + f['pretty_name'] + ')'"
- />
- </tal:block>
- <option value="fence-form-new-instance">------ Create a new Fence Device ------</option>
- <tal:block metal:use-macro="here/form-macros/macros/fence-option-list" />
- </select>
- <input type="hidden" name="fence_level" value="" />
- <input type="hidden" name="fence_num" value="" />
- </form>
- </div>
-
- <table id="fence_devices" class="cluster node fence">
- <tbody class="fence">
- <tr class="cluster node info_top fence">
- <td class="cluster node fence">
- <span class="fence">
- <strong class="cluster node">Main Fencing Method</strong>
- </span>
- </td>
-
- <td class="cluster node fence_backup">
- <span class="fence">
- <strong class="cluster node">Backup Fencing Method</strong>
- </span>
- </td>
- </tr>
-
- <tr class="cluster node info_top fence">
- <td class="cluster node fence_main fence">
- <div class="fence_container">
-
- <div id="fence_list_level1" tal:define="global cur_fence_num python: 0">
- <tal:block tal:condition="exists: fenceinfo/level1">
-
- <div class="fence_level"
- tal:repeat="cur_fencedev fenceinfo/level1"
- tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
-
- <tal:block tal:define="
- cur_fence_dev_id python: 'fence1_' + str(cur_fence_num);
- cur_fence_type cur_fencedev/agent | nothing;
- cur_fence_level python: 1">
-
- <form tal:attributes="name cur_fence_dev_id | string:[unknown]">
- <tal:block metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
- </form>
-
- <tal:block
- tal:define="global cur_instance_num python:0" />
-
- <div tal:attributes="id python: cur_fence_dev_id + '_instances'">
- <tal:block tal:condition="exists: cur_fencedev/instance_list">
- <tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fence_instances[\'' + cur_fence_dev_id + '\'] = ' + str(len(cur_fencedev['instance_list'])) + ';</script>'" />
- <tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
- <tal:block
- tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
-
- <div class="fence_instance"
- tal:attributes="
- name cur_fence_instance_id | nothing;
- id cur_fence_instance_id | nothing">
-
- <form
- tal:attributes="name cur_fence_instance_id | nothing">
- <tal:block metal:use-macro="here/form-macros/macros/fencedev-instance-cond-ladder" />
- </form>
- <tal:block
- tal:define="global cur_instance_num python:cur_instance_num + 1" />
- </div>
- </tal:block>
- </tal:block>
- </div>
- <div class="hbSubmit">
- <input type="button" name="remove_fence_dev"
- value="Remove this device"
- tal:attributes="
- onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
- <input tal:condition="cur_fencedev/isShared"
- name="add_instance" type="button"
- value="Add an instance"
- tal:attributes="onclick python: 'add_fence_instance(\'' + cur_fence_dev_id + '\',\'' + cur_fence_type + '\')'" />
- </div>
- <tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
- </tal:block>
- </div>
- </tal:block>
-
- <tal:block
- tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fences_level[0] = ' + str(cur_fence_num) + ';</script>'" />
- </div>
-
- <div class="fence_control">
- <a href="javascript:add_node_fence_device(1)">Add a fence device to this level</a>
- </div>
- </td>
-
- <td class="cluster node fence_main fence">
- <div class="fence_container">
-
- <div id="fence_list_level2" tal:define="global cur_fence_num python: 0">
- <tal:block tal:condition="exists: fenceinfo/level2">
-
- <div class="fence_level"
- tal:repeat="cur_fencedev fenceinfo/level2"
- tal:attributes="id python: 'fence2_' + str(cur_fence_num)">
-
- <tal:block tal:define="
- cur_fence_dev_id python: 'fence2_' + str(cur_fence_num);
- cur_fence_type cur_fencedev/agent | nothing;
- cur_fence_level python: 2">
-
- <form tal:attributes="name cur_fence_dev_id | string:[unknown]">
- <tal:block metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
- </form>
-
- <tal:block
- tal:define="global cur_instance_num python:0" />
-
- <div tal:attributes="id python: cur_fence_dev_id + '_instances'">
- <tal:block tal:condition="exists: cur_fencedev/instance_list">
- <tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fence_instances[\'' + cur_fence_dev_id + '\'] = ' + str(len(cur_fencedev['instance_list'])) + ';</script>'" />
- <tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
- <tal:block
- tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
-
- <div class="fence_instance"
- tal:attributes="
- name cur_fence_instance_id | nothing;
- id cur_fence_instance_id | nothing">
-
- <form
- tal:attributes="name cur_fence_instance_id | nothing">
- <tal:block metal:use-macro="here/form-macros/macros/fencedev-instance-cond-ladder" />
- </form>
- <tal:block
- tal:define="global cur_instance_num python:cur_instance_num + 1" />
- </div>
- </tal:block>
- </tal:block>
- </div>
- <div class="hbSubmit">
- <input type="button" name="remove_fence_dev"
- value="Remove this device"
- tal:attributes="
- onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
- <input tal:condition="cur_fencedev/isShared"
- name="add_instance" type="button"
- value="Add an instance"
- tal:attributes="onclick python: 'add_fence_instance(\'' + cur_fence_dev_id + '\',\'' + cur_fence_type + '\')'" />
- </div>
- <tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
- </tal:block>
- </div>
- </tal:block>
-
- <tal:block
- tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fences_level[1] = ' + str(cur_fence_num) + ';</script>'" />
- </div>
-
- <div class="fence_control">
- <a href="javascript:add_node_fence_device(2)">Add a fence device to this level</a>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="fence_control">
- <form name="fence1_master" method="post" action="">
- <input type="hidden" name="clustername"
- tal:attributes="value request/clustername | nothing" />
- <input type="hidden" name="nodename"
- tal:attributes="value request/nodename | nothing" />
- <input type="hidden" name="fence_level" value="1" />
- <input type="hidden" name="fence_xml" value="" />
- <input type="hidden" name="pagetype" value="58" />
- <input type="button"
- value="Update main fence properties"
- onclick="validate_node_fence_form(this.form, 'fence_list_level1')" />
- </form>
- </div>
- </td>
- <td>
- <div class="fence_control">
- <form name="fence2_master" method="post" action="">
- <input type="hidden" name="clustername"
- tal:attributes="value request/clustername | nothing" />
- <input type="hidden" name="nodename"
- tal:attributes="value request/nodename | nothing" />
- <input type="hidden" name="fence_level" value="2" />
- <input type="hidden" name="fence_xml" value="" />
- <input type="hidden" name="pagetype" value="58" />
- <input type="button"
- value="Update backup fence properties"
- onclick="validate_node_fence_form(this.form, 'fence_list_level2')" />
- </form>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
-</div>
-
-<div metal:define-macro="nodes-form">
- <script type="text/javascript"
- src="/luci/cluster/fence_device.js">
- </script>
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? nodes');
- </script>
-
-<div id="node_list">
- <tal:block tal:define="
- global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
-
- <tal:block tal:define="
- global status python: here.getClusterStatus(request, ricci_agent);
- global nds python: here.getNodesInfo(modelb, status, request)" />
-
- <div tal:repeat="nd nds">
- <tal:block
- tal:define="global node_class python: 'cluster node ' + ((nd['status'] == '0' and 'node_active' or (nd['status'] == '1' and 'node_inactive' or 'node_unknown')))" />
- <table class="cluster" width="100%">
- <tr class="node info_top">
- <td class="node node_name">
- <strong>Node Name:</strong>
- <a tal:content="nd/nodename"
- tal:attributes="
- href nd/configurl;
- class python: node_class"
- />
- </td>
-
- <td class="node node_action" tal:condition="python: nd['status'] == '0' or nd['status'] == '1'">
- <form method="post">
- <select class="node" name="gourl">
- <option value="">Choose a Task...</option>
- <option tal:attributes="value nd/jl_url">
- <span tal:condition="python: nd['status'] == '0'" tal:replace="string:Have node leave cluster" />
- <span tal:condition="python: nd['status'] == '1'" tal:replace="string:Have node join cluster" />
- </option>
- <option value="">----------</option>
- <option tal:attributes="value nd/fence_it_url">Fence this node</option>
- <option tal:attributes="value nd/reboot_url">Reboot this node</option>
- <option value="">----------</option>
- <option tal:attributes="value nd/delete_url">Delete this node</option>
- </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>
- <td class="node node_action" tal:condition="python: nd['status'] != '0' and nd['status'] != '1'">
- <form method="post">
- <select class="node" name="gourl">
- <option value="">Choose a Task...</option>
- <option tal:attributes="value nd/fence_it_url | nothing">Fence this node</option>
- <option tal:attributes="value nd/force_delete_url| nothing">Force the deletion of this node</option>
- </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="node info_middle">
- <td class="node_status" colspan="2">
- <strong class="cluster node">Status:</strong>
- <span tal:replace="nd/status_str"/>
- </td>
- </tr>
-
- <tr class="node info_middle"
- tal:condition="nd/gulm_lockserver">
- <td class="node node_status" colspan="2">
- This node is a GULM lock server.
- </td>
- </tr>
-
- <tr class="node info_bottom">
- <td class="node node_services">
- <strong class="cluster node">Services on this Node:</strong>
- <ul class="cluster node">
- <li tal:condition="python: len(nd['currentservices']) == 0">
- No cluster services are currently running here
- </li>
- <li class="cluster_service cluster node"
- tal:repeat="svc nd/currentservices">
- <a class="cluster running"
- tal:content="svc/servicename"
- tal:attributes="href svc/svcurl" />
- </li>
- </ul>
- </td>
-
- <td class="node node_fdom">
- <strong class="cluster node">Failover Domain Membership:</strong>
- <ul class="cluster node">
- <li tal:condition="python: len(nd['fdoms']) == 0">
- This node has no failover domain membership
- </li>
- <li class="node_fdom" tal:repeat="fdom nd/fdoms">
- <a class="cluster node"
- tal:content="fdom/name"
- tal:attributes="href fdom/fdomurl" />
- </li>
- </ul>
- </td>
- </tr>
-
- <tr class="node info_bottom">
- <td class="node node_fencing">
- <a class="cluster node"
- tal:attributes="href nd/fenceurl">
- Manage Fencing for this Node
- </a>
- </td>
- <td class="node node_logs">
- <a class="cluster node"
- onClick="return popup_log(this, 'notes')"
- tal:attributes="href nd/logurl">
- Show recent log activity for this node
- </a>
- </td>
- </tr>
- </table>
- <hr/>
- </div>
-</div>
-</div>
-
-<div metal:define-macro="nodelist-form">
- <h2>Node List Form</h2>
- </div>
-
-<div metal:define-macro="nodegrid-form">
- <h2>Node Grid Form</h2>
-</div>
-
-<div metal:define-macro="nodeconfig-form">
- <h2>Node Configuration Form</h2>
-</div>
-
-<div metal:define-macro="nodelogs-form">
- <h2>Recent Log Activity for <span tal:replace="request/nodename"/></h2>
- <hr/>
- <span tal:replace="structure python: here.getSystemLogs(request)"/>
-</div>
-
-<div metal:define-macro="nodeadd-form">
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? Add a new cluster node');
- </script>
-
- <script type="text/javascript"
- src="/luci/homebase/homebase_common.js">
- </script>
-
- <script type="text/javascript"
- src="/luci/homebase/validate_cluster_add.js">
- </script>
-
-
- <form name="add_node" action="" method="post"
- tal:define="
- global add_cluster request/SESSION/add_node | nothing;
- global cur_cluster_name add_cluster/name | request/clustername | request/form/clustername | nothing">
-
- <h2>Add a node to <span tal:replace="cur_cluster_name | string:this cluster" /></h2>
-
- <input type="hidden" name="addnode" value="1" />
-
- <input type="hidden" name="clustername"
- tal:attributes="value cur_cluster_name | string:[unknown]" />
-
- <input name="pagetype" type="hidden"
- tal:attributes="value request/form/pagetype | request/pagetype | string:15" />
-
- <input name="cluster_os" type="hidden"
- tal:attributes="value add_cluster/cluster_os | nothing" />
-
- <table id="systemsTable" class="systemsTable" cellspacing="0">
- <thead class="systemsTable">
- <tr class="systemsTable">
- <th class="systemsTable">Node Hostname</th>
- <th class="systemsTable">Root Password</th>
- <tal:block tal:condition="add_cluster">
- <th class="systemsTable">Key ID</th>
- <th class="systemsTable">Trust</th>
- </tal:block>
- <th></th>
- </tr>
- </thead>
-
- <tfoot class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="2">
- <div class="systemsTableEnd">
- <input type="button" value="Add another node"
- onClick="addSystem(this.form)" />
- </div>
- </td></tr>
- <tr class="systemsTable"><td colspan="2" class="systemsTable">
- <input type="hidden" name="trust_shown" value="1"
- tal:condition="add_cluster" />
- <ul class="vanilla deploy">
- <li class="vanilla">
- <input type="radio" name="download_pkgs" value="1"
- tal:attributes="checked python: (not add_cluster or not 'download_pkgs' in add_cluster or add_cluster['download_pkgs'] != 0) and 'checked' or ''" />
- Download packages
- </li>
- <li class="vanilla">
- <input type="radio" name="download_pkgs" value="0"
- tal:attributes="checked python: (add_cluster and 'download_pkgs' in add_cluster and add_cluster['download_pkgs'] == 0) and 'checked' or ''" />
- Use locally installed packages.
- </li>
- </ul>
- </td></tr>
- <tr class="systemsTable"><td colspan="2" class="systemsTable">
- <input type="checkbox" name="enable_storage"
- tal:attributes="
- checked add_cluster/shared_storage | string:checked" />
- Enable Shared Storage Support
- </td></tr>
- <tr class="systemsTable"><td colspan="2" class="systemsTable">
- <ul class="vanilla">
- <li class="vanilla">
- <input name="check_certs" type="checkbox"
- id="view_certs"
- onchange="view_certs_only(this.form, this.checked)" />
- View system certificates before sending any passwords.
- </li>
- <li class="vanilla"
- tal:attributes="id python: (not add_cluster or ('nodes' in add_cluster and len(add_cluster['nodes']) < 2)) and 'allSameDiv'">
- <input type="checkbox"
- name="allSameCheckBox" id="allSameCheckBox"
- onClick="allPasswdsSame(this.form)"
- tal:attributes="checked python: (add_cluster and add_cluster['identical_passwds']) and 'checked'"
- />
- Check if node passwords are identical.
- </li>
- </ul>
- </td></tr>
- </tfoot>
-
- <tal:block tal:define="global cur_sysnum python:0" />
-
- <tbody class="systemsTable" id="sys_tbody">
- <tal:block
- tal:condition="exists: add_cluster/nodes"
- tal:repeat="cur_sys add_cluster/nodes">
- <tr class="systemsTable"
- tal:attributes="id python: '__SYSTEM_ROW_%d' % cur_sysnum"
- tal:define="sys python: add_cluster['nodes'][cur_sys]">
- <td class="systemsTable">
- <input type="text"
- tal:attributes="
- value sys/host | nothing;
- id python: '__SYSTEM%d:Addr' % cur_sysnum;
- name python: '__SYSTEM%d:Addr' % cur_sysnum;
- class python: 'hbInputSys' + ('errors' in sys and ' error' or '');
- disabled python: ('auth' in sys and sys['host'].count('.') > 0) and 1 or 0"
- />
- </td>
- <td class="systemsTable">
- <tal:block tal:condition="not: exists: sys/auth">
- <input type="password"
- autocomplete="off"
- onchange="pwd0Change(this.form)"
- tal:attributes="
- value nothing;
- class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
- id python: '__SYSTEM%d:Passwd' % cur_sysnum;
- name python: '__SYSTEM%d:Passwd' % cur_sysnum" />
- </tal:block>
-
- <tal:block tal:condition="exists: sys/auth">
- <input type="text" onchange="pwd0Change(this.form)"
- disabled="disabled" value="[authenticated]"
- tal:attributes="
- class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
- id python: '__SYSTEM%d:Passwd' % cur_sysnum;
- name python: '__SYSTEM%d:Passwd' % cur_sysnum" />
- </tal:block>
- </td>
- <td tal:condition="add_cluster" class="systemsTable">
- <img
- tal:attributes="
- src python: 'trusted' in sys and 'lock-ok.png' or ('fp' in sys and 'lock-closed.png' or 'lock-open.png');
- title sys/fp | string:no key fingerprint available" />
- <input type="hidden"
- tal:condition="exists: sys/fp"
- tal:attributes="
- id python: '__SYSTEM%dFingerprint' % cur_sysnum;
- name python: '__SYSTEM%dFingerprint' % cur_sysnum;
- value sys/fp | nothing" />
- </td>
- <td tal:condition="add_cluster" class="systemsTable">
- <input type="checkbox" tal:attributes="
- checked exists: sys/fp;
- id python: '__SYSTEM%dTrusted' % cur_sysnum;
- name python: '__SYSTEM%dTrusted' % cur_sysnum;
- disabled python: 'trusted' in sys"
- />
- </td>
- <td class="systemsTable">
- <img src="delete-row.png" class="deleteRow"
- title="delete this row"
- tal:attributes="
- onclick python: 'delete_element_id(\'__SYSTEM_ROW_%d\')' % cur_sysnum" />
- </td>
- </tr>
- <tal:block
- tal:define="global cur_sysnum python: cur_sysnum + 1" />
- </tal:block>
-
- <tr class="systemsTable" id="__SYSTEM_ROW_0"
- tal:condition="not: add_cluster">
- <td class="systemsTable">
- <input class="hbInputSys" type="text"
- id="__SYSTEM0:Addr" name="__SYSTEM0:Addr" />
- </td>
- <td class="systemsTable">
- <input type="password"
- onchange="pwd0Change(this.form)"
- class="hbInputPass" autocomplete="off"
- id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" />
- </td>
- <td class="systemsTable">
- <img src="delete-row.png" class="deleteRow"
- title="delete this row"
- onclick="delete_element_id('__SYSTEM_ROW_0')" />
- </td>
- <tal:block tal:define="global cur_sysnum python:1" />
- </tr>
- </tbody>
- </table>
-
- <input name="numStorage" id="numStorage" type="hidden"
- tal:attributes="value cur_sysnum" />
-
- <div class="hbSubmit" id="hbSubmit">
- <input type="button" name="Submit" value="Submit"
- onClick="validateForm(this.form)" />
- </div>
- </form>
-
- <div tal:condition="add_cluster">
- <tal:block
- tal:define="x python: request.SESSION.delete('add_node')" />
- </div>
-</div>
-
-<div metal:define-macro="nodeprocess-form">
- <tal:block
- tal:define="result python: here.nodeTaskProcess(modelb, request)">
-
- <div id="errmsgsdiv" class="errmsgs"
- tal:condition="python: result and len(result) > 1 and 'errors' in result[1]">
- <p class="errmsgs">The following errors occurred:</p>
-
- <ul class="statusmsg">
- <tal:block tal:repeat="e python: result[1]['errors']">
- <li class="statusmsg" tal:content="python:e" />
- </tal:block>
- </ul>
- </div>
- </tal:block>
-</div>
-
-<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@/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@/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/form-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="clustername"
- tal:attributes="value clusterinfo/clustername" />
- <input type="button" value="Submit"
- onClick="forms_to_xml(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/form-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" />
+ <input type="hidden" name="pagetype" value="55" />
+ </form>
</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="/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/form-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/form-macros/macros/serviceconfig-type-macro" />
+</tal:block>
+ <hr/>
- <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>
+ <h3>Services on this Node</h3>
+ <ul class="cluster node">
+ <tal:block tal:condition="python: len(nodeinfo['currentservices']) == 0">
+ <li>No cluster services are currently running here</li>
+ </tal:block>
+ <li class="cluster node cluster_service" tal:repeat="svc nodeinfo/currentservices">
+ <a class="running" tal:attributes="href svc/svcurl"
+ tal:content="svc/servicename" />
+ </li>
+ </ul>
</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="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.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>
+ <hr/>
- <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/form-macros/macros/serviceconfig-type-macro" />
- </tal:block>
+ <div class="fdomblock">
+ <h3>Failover Domain Membership</h3>
+ <ul class="cluster node">
+ <tal:block tal:condition="python: len(nodeinfo['fdoms']) == 0">
+ <li>This node has no failover domain membership</li>
+ </tal:block>
+ <li class="cluster node node_fdom" tal:repeat="fdom nodeinfo/fdoms">
+ <a class="cluster node" tal:attributes="href fdom/fdomurl">
+ <span tal:replace="fdom/name"/>
+ </a>
+ </li>
+ </ul>
</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>
-
-<div metal:define-macro="resources-form">
- <h2>Resources Form</h2>
-</div>
-
-<div metal:define-macro="resourcelist-form">
- <h2>Resource List Form</h2>
-</div>
-
-<div metal:define-macro="resourceadd-form">
- <h2>Resource Add Form</h2>
-</div>
-
-<div metal:define-macro="resourceconfig-form">
- <h2>Resource Configuration Form</h2>
-</div>
-<div metal:define-macro="resource-form">
- <h2>Resource Form</h2>
-</div>
-
-<div metal:define-macro="resourceprocess-form">
- <h2>Resource Process Form</h2>
-</div>
-
-<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>
+ <hr/>
- <div class="fdomordered">
- <h4>This Failover Domain is
- <strong>
- <span tal:replace="python: fdom['ordered'] == True and 'Ordered' or 'Unordered'" />
- </strong>
+ <div class="invisible" id="fence_device_list">
+ <tal:block metal:use-macro="here/fence-macros/macros/fence-form-list" />
</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>
+ <tal:block tal:define="
+ global fenceinfo python: here.getFenceInfo(modelb, request);
+ global fencedevinfo python: here.getFencesInfo(modelb, request)" />
- <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 class="invisible" id="shared_fence_devices">
+ <tal:block tal:repeat="cur_fencedev fencedevinfo/fencedevs">
+ <tal:block metal:use-macro="here/fence-macros/macros/shared-fence-device-list" />
+ </tal:block>
</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 class="invisible" id="fence_instances">
+ <tal:block metal:use-macro="here/fence-macros/macros/fence-instance-form-list" />
</div>
+ <div id="fence_selection_block" class="invisible">
+ <form name="main_fence_form">
+ <select name="select_div">
+ <option value="fence-form-new-device">------ Use an existing Fence Device ------</option>
+ <tal:block tal:repeat="f fencedevinfo/fencedevs">
+ <option class="shared_fencedev"
+ tal:attributes="value f/name"
+ tal:content="python: f['name'] + ' (' + f['pretty_name'] + ')'"
+ />
+ </tal:block>
+ <option value="fence-form-new-instance">------ Create a new Fence Device ------</option>
+ <tal:block metal:use-macro="here/fence-macros/macros/fence-option-list" />
+ </select>
+ <input type="hidden" name="fence_level" value="" />
+ <input type="hidden" name="fence_num" value="" />
+ </form>
</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 id="fence_devices" class="cluster node fence">
+ <tbody class="fence">
+ <tr class="cluster node info_top fence">
+ <td class="cluster node fence">
+ <span class="fence">
+ <strong class="cluster node">Main Fencing Method</strong>
+ </span>
+ </td>
- <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>
+ <td class="cluster node fence_backup">
+ <span class="fence">
+ <strong class="cluster node">Backup Fencing Method</strong>
+ </span>
+ </td>
+ </tr>
- <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>
+ <tr class="cluster node info_top fence">
+ <td class="cluster node fence_main fence">
+ <div class="fence_container">
- <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>
+ <div id="fence_list_level1" tal:define="global cur_fence_num python: 0">
+ <tal:block tal:condition="exists: fenceinfo/level1">
-</tal:block>
+ <div class="fence_level"
+ tal:repeat="cur_fencedev fenceinfo/level1"
+ tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
-<div metal:define-macro="fdomadd-form">
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? failover domains ??? Add a failover domain');
- </script>
+ <tal:block tal:define="
+ cur_fence_dev_id python: 'fence1_' + str(cur_fence_num);
+ cur_fence_type cur_fencedev/agent | nothing;
+ cur_fence_level python: 1">
- <h2>Add a Failover Domain</h2>
- <tal:block tal:define="fdom python:{}">
- <tal:block metal:use-macro="here/form-macros/macros/fdom-macro" />
- </tal:block>
-</div>
+ <form tal:attributes="name cur_fence_dev_id | string:[unknown]">
+ <tal:block metal:use-macro="here/fence-macros/macros/fencedev-cond-ladder" />
+ </form>
-<div metal:define-macro="fdomconfig-form">
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? failover domains ??? Configure a failover domain');
- </script>
-</div>
+ <tal:block
+ tal:define="global cur_instance_num python:0" />
-<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/form-macros/macros/fdom-macro" />
- </tal:block>
-</div>
+ <div tal:attributes="id python: cur_fence_dev_id + '_instances'">
+ <tal:block tal:condition="exists: cur_fencedev/instance_list">
+ <tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fence_instances[\'' + cur_fence_dev_id + '\'] = ' + str(len(cur_fencedev['instance_list'])) + ';</script>'" />
+ <tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
+ <tal:block
+ tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
-<div metal:define-macro="fdomprocess-form">
- <h2>Failover Domain Process Form</h2>
-</div>
+ <div class="fence_instance"
+ tal:attributes="
+ name cur_fence_instance_id | nothing;
+ id cur_fence_instance_id | nothing">
-<div metal:define-macro="fencedevs-form">
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? shared fence devices');
- </script>
+ <form
+ tal:attributes="name cur_fence_instance_id | nothing">
+ <tal:block metal:use-macro="here/fence-macros/macros/fencedev-instance-cond-ladder" />
+ </form>
+ <tal:block
+ tal:define="global cur_instance_num python:cur_instance_num + 1" />
+ </div>
+ </tal:block>
+ </tal:block>
+ </div>
+ <div class="hbSubmit">
+ <input type="button" name="remove_fence_dev"
+ value="Remove this device"
+ tal:attributes="
+ onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
+ <input tal:condition="cur_fencedev/isShared"
+ name="add_instance" type="button"
+ value="Add an instance"
+ tal:attributes="onclick python: 'add_fence_instance(\'' + cur_fence_dev_id + '\',\'' + cur_fence_type + '\')'" />
+ </div>
+ <tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
+ </tal:block>
+ </div>
+ </tal:block>
- <h2>Shared Fence Devices for Cluster: <span tal:replace="request/clustername" /></h2>
+ <tal:block
+ tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fences_level[0] = ' + str(cur_fence_num) + ';</script>'" />
+ </div>
- <tal:block tal:define="
- global fencedevinfo python: here.getFencesInfo(modelb, request);
- global fencedevs python: fencedevinfo['fencedevs']" />
+ <div class="fence_control">
+ <a href="javascript:add_node_fence_device(1)">Add a fence device to this level</a>
+ </div>
+ </td>
- <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>
+ <td class="cluster node fence_main fence">
+ <div class="fence_container">
- <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 id="fence_list_level2" tal:define="global cur_fence_num python: 0">
+ <tal:block tal:condition="exists: fenceinfo/level2">
-<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 class="fence_level"
+ tal:repeat="cur_fencedev fenceinfo/level2"
+ tal:attributes="id python: 'fence2_' + str(cur_fence_num)">
-<div metal:define-macro="fencedevadd-form">
- <script type="text/javascript"
- src="/luci/cluster/fence_device.js">
- </script>
+ <tal:block tal:define="
+ cur_fence_dev_id python: 'fence2_' + str(cur_fence_num);
+ cur_fence_type cur_fencedev/agent | nothing;
+ cur_fence_level python: 2">
- <script type="text/javascript"
- src="/luci/homebase/homebase_common.js">
- </script>
+ <form tal:attributes="name cur_fence_dev_id | string:[unknown]">
+ <tal:block metal:use-macro="here/fence-macros/macros/fencedev-cond-ladder" />
+ </form>
- <script type="text/javascript"
- src="/luci/cluster/validate_fence.js">
- </script>
+ <tal:block
+ tal:define="global cur_instance_num python:0" />
- <script type="text/javascript">
- set_page_title('Luci ??? cluster ??? fence devices - Add a new fence device');
- </script>
+ <div tal:attributes="id python: cur_fence_dev_id + '_instances'">
+ <tal:block tal:condition="exists: cur_fencedev/instance_list">
+ <tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fence_instances[\'' + cur_fence_dev_id + '\'] = ' + str(len(cur_fencedev['instance_list'])) + ';</script>'" />
+ <tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
+ <tal:block
+ tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
- <h2>Add a Sharable Fence Device</h2>
+ <div class="fence_instance"
+ tal:attributes="
+ name cur_fence_instance_id | nothing;
+ id cur_fence_instance_id | nothing">
- <div id="invisible" class="invisible">
- <tal:block metal:use-macro="here/form-macros/macros/shared-fence-form-list" />
- </div>
+ <form
+ tal:attributes="name cur_fence_instance_id | nothing">
+ <tal:block metal:use-macro="here/fence-macros/macros/fencedev-instance-cond-ladder" />
+ </form>
+ <tal:block
+ tal:define="global cur_instance_num python:cur_instance_num + 1" />
+ </div>
+ </tal:block>
+ </tal:block>
+ </div>
+ <div class="hbSubmit">
+ <input type="button" name="remove_fence_dev"
+ value="Remove this device"
+ tal:attributes="
+ onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
+ <input tal:condition="cur_fencedev/isShared"
+ name="add_instance" type="button"
+ value="Add an instance"
+ tal:attributes="onclick python: 'add_fence_instance(\'' + cur_fence_dev_id + '\',\'' + cur_fence_type + '\')'" />
+ </div>
+ <tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
+ </tal:block>
+ </div>
+ </tal:block>
- <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>
+ <tal:block
+ tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fences_level[1] = ' + str(cur_fence_num) + ';</script>'" />
+ </div>
+
+ <div class="fence_control">
+ <a href="javascript:add_node_fence_device(2)">Add a fence device to this level</a>
+ </div>
</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/form-macros/macros/shared-fence-option-list" />
- </select>
- </form>
-
- <form name="fencedevaddform" action="" method="post">
- <div id="fence_container">
- </div>
- <div class="hbSubmit">
+ <tr>
+ <td>
+ <div class="fence_control">
+ <form name="fence1_master" method="post" action="">
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | nothing" />
+ <input type="hidden" name="nodename"
+ tal:attributes="value request/nodename | nothing" />
+ <input type="hidden" name="fence_level" value="1" />
+ <input type="hidden" name="fence_xml" value="" />
+ <input type="hidden" name="pagetype" value="58" />
<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>
+ value="Update main fence properties"
+ onclick="validate_node_fence_form(this.form, 'fence_list_level1')" />
+ </form>
+ </div>
+ </td>
+ <td>
+ <div class="fence_control">
+ <form name="fence2_master" method="post" action="">
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | nothing" />
+ <input type="hidden" name="nodename"
+ tal:attributes="value request/nodename | nothing" />
+ <input type="hidden" name="fence_level" value="2" />
+ <input type="hidden" name="fence_xml" value="" />
+ <input type="hidden" name="pagetype" value="58" />
+ <input type="button"
+ value="Update backup fence properties"
+ onclick="validate_node_fence_form(this.form, 'fence_list_level2')" />
+ </form>
+ </div>
</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">
+<div metal:define-macro="nodes-form">
+ <script type="text/javascript"
+ src="/luci/cluster/fence_device.js">
+ </script>
<script type="text/javascript">
- set_page_title('Luci ??? cluster ??? fence devices - Configure a fence device');
+ set_page_title('Luci ??? cluster ??? nodes');
</script>
- <h3>Configure a Fence Device</h3>
+<div id="node_list">
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
- <tal:block tal:define="fencedevs python: here.getFenceInfo(modelb, None)">
+ <tal:block tal:define="
+ global status python: here.getClusterStatus(request, ricci_agent);
+ global nds python: here.getNodesInfo(modelb, status, request)" />
- <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"
+ <div tal:repeat="nd nds">
+ <tal:block
+ tal:define="global node_class python: 'cluster node ' + ((nd['status'] == '0' and 'node_active' or (nd['status'] == '1' and 'node_inactive' or 'node_unknown')))" />
+ <table class="cluster" width="100%">
+ <tr class="node info_top">
+ <td class="node node_name">
+ <strong>Node Name:</strong>
+ <a tal:content="nd/nodename"
tal:attributes="
- href python:str('/luci/cluster/index_html?pagetype=54&fencename=' + f['name'] + '&clustername=' + request['clustername'])">
- configure
- </a>
+ href nd/configurl;
+ class python: node_class"
+ />
</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/form-macros/macros/fence-form-apc" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_mcdata'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_wti'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_ilo'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-ilo" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_drac'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-drac" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_rsa'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-rsa" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_brocade'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_sanbox2'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_vixel'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
- </tal:block>
-
- <tal:block tal:condition="python: cur_fence_type == 'fence_gnbd'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
- </tal:block>
- <tal:block tal:condition="python: cur_fence_type == 'fence_egenera'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
- </tal:block>
+ <td class="node node_action" tal:condition="python: nd['status'] == '0' or nd['status'] == '1'">
+ <form method="post">
+ <select class="node" name="gourl">
+ <option value="">Choose a Task...</option>
+ <option tal:attributes="value nd/jl_url">
+ <span tal:condition="python: nd['status'] == '0'" tal:replace="string:Have node leave cluster" />
+ <span tal:condition="python: nd['status'] == '1'" tal:replace="string:Have node join cluster" />
+ </option>
+ <option value="">----------</option>
+ <option tal:attributes="value nd/fence_it_url">Fence this node</option>
+ <option tal:attributes="value nd/reboot_url">Reboot this node</option>
+ <option value="">----------</option>
+ <option tal:attributes="value nd/delete_url">Delete this node</option>
+ </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>
+ <td class="node node_action" tal:condition="python: nd['status'] != '0' and nd['status'] != '1'">
+ <form method="post">
+ <select class="node" name="gourl">
+ <option value="">Choose a Task...</option>
+ <option tal:attributes="value nd/fence_it_url | nothing">Fence this node</option>
+ <option tal:attributes="value nd/force_delete_url| nothing">Force the deletion of this node</option>
+ </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>
- <tal:block tal:condition="python: cur_fence_type == 'fence_bladecenter'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
- </tal:block>
+ <tr class="node info_middle">
+ <td class="node_status" colspan="2">
+ <strong class="cluster node">Status:</strong>
+ <span tal:replace="nd/status_str"/>
+ </td>
+ </tr>
- <tal:block tal:condition="python: cur_fence_type == 'fence_bullpap'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
- </tal:block>
+ <tr class="node info_middle"
+ tal:condition="nd/gulm_lockserver">
+ <td class="node node_status" colspan="2">
+ This node is a GULM lock server.
+ </td>
+ </tr>
- <tal:block tal:condition="python: cur_fence_type == 'fence_rps10'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-rps10" />
- </tal:block>
+ <tr class="node info_bottom">
+ <td class="node node_services">
+ <strong class="cluster node">Services on this Node:</strong>
+ <ul class="cluster node">
+ <li tal:condition="python: len(nd['currentservices']) == 0">
+ No cluster services are currently running here
+ </li>
+ <li class="cluster_service cluster node"
+ tal:repeat="svc nd/currentservices">
+ <a class="cluster running"
+ tal:content="svc/servicename"
+ tal:attributes="href svc/svcurl" />
+ </li>
+ </ul>
+ </td>
- <tal:block tal:condition="python: cur_fence_type == 'fence_ipmilan'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-ipmilan" />
- </tal:block>
+ <td class="node node_fdom">
+ <strong class="cluster node">Failover Domain Membership:</strong>
+ <ul class="cluster node">
+ <li tal:condition="python: len(nd['fdoms']) == 0">
+ This node has no failover domain membership
+ </li>
+ <li class="node_fdom" tal:repeat="fdom nd/fdoms">
+ <a class="cluster node"
+ tal:content="fdom/name"
+ tal:attributes="href fdom/fdomurl" />
+ </li>
+ </ul>
+ </td>
+ </tr>
- <tal:block tal:condition="python: cur_fence_type == 'fence_xvm'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
- </tal:block>
+ <tr class="node info_bottom">
+ <td class="node node_fencing">
+ <a class="cluster node"
+ tal:attributes="href nd/fenceurl">
+ Manage Fencing for this Node
+ </a>
+ </td>
+ <td class="node node_logs">
+ <a class="cluster node"
+ onClick="return popup_log(this, 'notes')"
+ tal:attributes="href nd/logurl">
+ Show recent log activity for this node
+ </a>
+ </td>
+ </tr>
+ </table>
+ <hr/>
+ </div>
+</div>
+</div>
- <tal:block tal:condition="python: cur_fence_type == 'fence_scsi'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
- </tal:block>
+<div metal:define-macro="nodelist-form">
+ <h2>Node List Form</h2>
+ </div>
- <tal:block tal:condition="python: cur_fence_type == 'fence_manual'">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-manual" />
- </tal:block>
+<div metal:define-macro="nodegrid-form">
+ <h2>Node Grid Form</h2>
+</div>
- <tal:block tal:condition="exists:cur_fencedev/unknown">
- <tal:block metal:use-macro="here/form-macros/macros/fence-form-unknown" />
- </tal:block>
+<div metal:define-macro="nodeconfig-form">
+ <h2>Node Configuration Form</h2>
</div>
+<div metal:define-macro="nodelogs-form">
+ <h2>Recent Log Activity for <span tal:replace="request/nodename"/></h2>
+ <hr/>
+ <span tal:replace="structure python: here.getSystemLogs(request)"/>
+</div>
-<div metal:define-macro="fencedev-form">
+<div metal:define-macro="nodeadd-form">
<script type="text/javascript">
- set_page_title('Luci ??? cluster ??? fence devices - Configure a fence device');
+ set_page_title('Luci ??? cluster ??? Add a new cluster node');
</script>
<script type="text/javascript"
@@ -5276,161 +1076,213 @@
</script>
<script type="text/javascript"
- src="/luci/cluster/validate_fence.js">
+ src="/luci/homebase/validate_cluster_add.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/form-macros/macros/fencedev-cond-ladder" />
+ <form name="add_node" action="" method="post"
+ tal:define="
+ global add_cluster request/SESSION/add_node | nothing;
+ global cur_cluster_name add_cluster/name | request/clustername | request/form/clustername | nothing">
- <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>
+ <h2>Add a node to <span tal:replace="cur_cluster_name | string:this cluster" /></h2>
- <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>
+ <input type="hidden" name="addnode" value="1" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value cur_cluster_name | string:[unknown]" />
-<div metal:define-macro="fencedevprocess-form">
- <h2>Fence Device Process Form</h2>
-</div>
+ <input name="pagetype" type="hidden"
+ tal:attributes="value request/form/pagetype | request/pagetype | string:15" />
-<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>
+ <input name="cluster_os" type="hidden"
+ tal:attributes="value add_cluster/cluster_os | nothing" />
- <form name="svcform" method="post" action="">
+ <table id="systemsTable" class="systemsTable" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable">
+ <th class="systemsTable">Node Hostname</th>
+ <th class="systemsTable">Root Password</th>
+ <tal:block tal:condition="add_cluster">
+ <th class="systemsTable">Key ID</th>
+ <th class="systemsTable">Trust</th>
+ </tal:block>
+ <th></th>
+ </tr>
+ </thead>
- <input type="hidden" name="pagetype"
- tal:attributes="value request/pagetype | nothing" />
+ <tfoot class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="button" value="Add another node"
+ onClick="addSystem(this.form)" />
+ </div>
+ </td></tr>
+ <tr class="systemsTable"><td colspan="2" class="systemsTable">
+ <input type="hidden" name="trust_shown" value="1"
+ tal:condition="add_cluster" />
+ <ul class="vanilla deploy">
+ <li class="vanilla">
+ <input type="radio" name="download_pkgs" value="1"
+ tal:attributes="checked python: (not add_cluster or not 'download_pkgs' in add_cluster or add_cluster['download_pkgs'] != 0) and 'checked' or ''" />
+ Download packages
+ </li>
+ <li class="vanilla">
+ <input type="radio" name="download_pkgs" value="0"
+ tal:attributes="checked python: (add_cluster and 'download_pkgs' in add_cluster and add_cluster['download_pkgs'] == 0) and 'checked' or ''" />
+ Use locally installed packages.
+ </li>
+ </ul>
+ </td></tr>
+ <tr class="systemsTable"><td colspan="2" class="systemsTable">
+ <input type="checkbox" name="enable_storage"
+ tal:attributes="
+ checked add_cluster/shared_storage | string:checked" />
+ Enable Shared Storage Support
+ </td></tr>
+ <tr class="systemsTable"><td colspan="2" class="systemsTable">
+ <ul class="vanilla">
+ <li class="vanilla">
+ <input name="check_certs" type="checkbox"
+ id="view_certs"
+ onchange="view_certs_only(this.form, this.checked)" />
+ View system certificates before sending any passwords.
+ </li>
+ <li class="vanilla"
+ tal:attributes="id python: (not add_cluster or ('nodes' in add_cluster and len(add_cluster['nodes']) < 2)) and 'allSameDiv'">
+ <input type="checkbox"
+ name="allSameCheckBox" id="allSameCheckBox"
+ onClick="allPasswdsSame(this.form)"
+ tal:attributes="checked python: (add_cluster and add_cluster['identical_passwds']) and 'checked'"
+ />
+ Check if node passwords are identical.
+ </li>
+ </ul>
+ </td></tr>
+ </tfoot>
- <input type="hidden" name="systemname"
- tal:attributes="value request/systemname | nothing" />
+ <tal:block tal:define="global cur_sysnum python:0" />
- <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>
+ <tbody class="systemsTable" id="sys_tbody">
+ <tal:block
+ tal:condition="exists: add_cluster/nodes"
+ tal:repeat="cur_sys add_cluster/nodes">
+ <tr class="systemsTable"
+ tal:attributes="id python: '__SYSTEM_ROW_%d' % cur_sysnum"
+ tal:define="sys python: add_cluster['nodes'][cur_sys]">
+ <td class="systemsTable">
+ <input type="text"
+ tal:attributes="
+ value sys/host | nothing;
+ id python: '__SYSTEM%d:Addr' % cur_sysnum;
+ name python: '__SYSTEM%d:Addr' % cur_sysnum;
+ class python: 'hbInputSys' + ('errors' in sys and ' error' or '');
+ disabled python: ('auth' in sys and sys['host'].count('.') > 0) and 1 or 0"
+ />
+ </td>
+ <td class="systemsTable">
+ <tal:block tal:condition="not: exists: sys/auth">
+ <input type="password"
+ autocomplete="off"
+ onchange="pwd0Change(this.form)"
+ tal:attributes="
+ value nothing;
+ class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
+ id python: '__SYSTEM%d:Passwd' % cur_sysnum;
+ name python: '__SYSTEM%d:Passwd' % cur_sysnum" />
+ </tal:block>
- <tr tal:repeat="s svcinfo">
- <td class="systemsTable">
- <span tal:content="s/name |string:[unknown]"
- tal:attributes="title s/desc | nothing" />
- </td>
+ <tal:block tal:condition="exists: sys/auth">
+ <input type="text" onchange="pwd0Change(this.form)"
+ disabled="disabled" value="[authenticated]"
+ tal:attributes="
+ class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
+ id python: '__SYSTEM%d:Passwd' % cur_sysnum;
+ name python: '__SYSTEM%d:Passwd' % cur_sysnum" />
+ </tal:block>
+ </td>
+ <td tal:condition="add_cluster" class="systemsTable">
+ <img
+ tal:attributes="
+ src python: 'trusted' in sys and 'lock-ok.png' or ('fp' in sys and 'lock-closed.png' or 'lock-open.png');
+ title sys/fp | string:no key fingerprint available" />
+ <input type="hidden"
+ tal:condition="exists: sys/fp"
+ tal:attributes="
+ id python: '__SYSTEM%dFingerprint' % cur_sysnum;
+ name python: '__SYSTEM%dFingerprint' % cur_sysnum;
+ value sys/fp | nothing" />
+ </td>
+ <td tal:condition="add_cluster" class="systemsTable">
+ <input type="checkbox" tal:attributes="
+ checked exists: sys/fp;
+ id python: '__SYSTEM%dTrusted' % cur_sysnum;
+ name python: '__SYSTEM%dTrusted' % cur_sysnum;
+ disabled python: 'trusted' in sys"
+ />
+ </td>
+ <td class="systemsTable">
+ <img src="delete-row.png" class="deleteRow"
+ title="delete this row"
+ tal:attributes="
+ onclick python: 'delete_element_id(\'__SYSTEM_ROW_%d\')' % cur_sysnum" />
+ </td>
+ </tr>
+ <tal:block
+ tal:define="global cur_sysnum python: cur_sysnum + 1" />
+ </tal:block>
- <td class="systemsTable">
- <span
- tal:content="s/state |string:[unknown]"
- tal:attributes="id python: '__STATUS__' + s['name']" />
- </td>
+ <tr class="systemsTable" id="__SYSTEM_ROW_0"
+ tal:condition="not: add_cluster">
+ <td class="systemsTable">
+ <input class="hbInputSys" type="text"
+ id="__SYSTEM0:Addr" name="__SYSTEM0:Addr" />
+ </td>
+ <td class="systemsTable">
+ <input type="password"
+ onchange="pwd0Change(this.form)"
+ class="hbInputPass" autocomplete="off"
+ id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" />
+ </td>
+ <td class="systemsTable">
+ <img src="delete-row.png" class="deleteRow"
+ title="delete this row"
+ onclick="delete_element_id('__SYSTEM_ROW_0')" />
+ </td>
+ <tal:block tal:define="global cur_sysnum python:1" />
+ </tr>
+ </tbody>
+ </table>
- <td class="systemsTable">
- <input type="checkbox"
- tal:attributes="
- name s/name;
- id s/name;
- checked python: s['enabled'] and 'checked' or ''"
- />
- </td>
+ <input name="numStorage" id="numStorage" type="hidden"
+ tal:attributes="value cur_sysnum" />
- <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>
+ <div class="hbSubmit" id="hbSubmit">
+ <input type="button" name="Submit" value="Submit"
+ onClick="validateForm(this.form)" />
+ </div>
</form>
-</div>
-<div metal:define-macro="get-cluster-members-form">
- <tal:block tal:define="ret python: here.get_cluster_nodes_async(request)" />
+ <div tal:condition="add_cluster">
+ <tal:block
+ tal:define="x python: request.SESSION.delete('add_node')" />
+ </div>
</div>
-<div metal:define-macro="system-svc-update-form">
- <tal:block tal:define="ret python: here.validate_manage_svc(request)" />
+<div metal:define-macro="nodeprocess-form">
+ <tal:block
+ tal:define="result python: here.nodeTaskProcess(modelb, request)">
+
+ <div id="errmsgsdiv" class="errmsgs"
+ tal:condition="python: result and len(result) > 1 and 'errors' in result[1]">
+ <p class="errmsgs">The following errors occurred:</p>
+
+ <ul class="statusmsg">
+ <tal:block tal:repeat="e python: result[1]['errors']">
+ <li class="statusmsg" tal:content="python:e" />
+ </tal:block>
+ </ul>
+ </div>
+ </tal:block>
</div>
<div metal:define-macro="conf_editor-form">
@@ -5461,6 +1313,15 @@
</form>
</div>
+<div metal:define-macro="clusterprocess-form">
+ <tal:block
+ tal:define="result python: here.clusterTaskProcess(modelb, request)"/>
+ <h2>Cluster Process Form</h2>
+</div>
+
+<div metal:define-macro="get-cluster-members-form">
+ <tal:block tal:define="ret python: here.get_cluster_nodes_async(request)" />
+</div>
</body>
</html>
next reply other threads:[~2007-11-19 18:23 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 18:23 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-09 20:26 [Cluster-devel] conga/luci/cluster form-macros rmccabe
2007-07-26 20:31 rmccabe
2007-06-12 15:33 rmccabe
2007-02-28 21:54 rmccabe
2007-02-28 21:42 rmccabe
2007-02-14 15:06 rmccabe
2007-02-14 15:04 rmccabe
2007-02-09 20:33 rmccabe
2007-02-09 20:32 rmccabe
2007-02-02 1:03 rmccabe
2007-01-30 21:39 jparsons
2007-01-30 21:06 jparsons
2007-01-26 16:53 rmccabe
2007-01-24 20:05 rmccabe
2007-01-22 21:18 rmccabe
2007-01-16 17:38 rmccabe
2007-01-16 17:37 rmccabe
2007-01-15 18:57 rmccabe
2007-01-15 18:57 rmccabe
2007-01-15 17:17 rmccabe
2007-01-09 22:20 rmccabe
2007-01-07 17:36 rmccabe
2006-12-22 17:18 kupcevic
2006-12-20 22:07 jparsons
2006-12-20 20:24 jparsons
2006-12-18 22:15 jparsons
2006-12-13 23:55 rmccabe
2006-12-13 23:54 rmccabe
2006-12-04 22:59 rmccabe
2006-11-30 22:31 jparsons
2006-11-30 22:31 jparsons
2006-11-30 22:21 jparsons
2006-11-30 22:19 jparsons
2006-11-30 21:28 jparsons
2006-11-30 21:24 jparsons
2006-11-30 20:47 jparsons
2006-11-30 20:45 jparsons
2006-11-30 20:10 jparsons
2006-11-29 22:24 jparsons
2006-11-28 19:39 jparsons
2006-11-20 20:21 jparsons
2006-11-20 20:13 jparsons
2006-11-07 1:31 jparsons
2006-11-03 21:11 jparsons
2006-11-03 21:09 jparsons
2006-11-03 21:07 jparsons
2006-10-31 13:23 rmccabe
2006-10-16 20:34 jparsons
2006-10-16 18:58 rmccabe
2006-10-13 21:01 jparsons
2006-10-11 20:57 jparsons
2006-10-11 16:25 jparsons
2006-10-04 17:45 jparsons
2006-09-28 20:20 rmccabe
2006-09-25 15:59 rmccabe
2006-09-25 15:46 jparsons
2006-09-22 20:58 jparsons
2006-09-22 20:30 jparsons
2006-09-22 20:08 jparsons
2006-08-30 23:40 rmccabe
2006-08-30 22:57 rmccabe
2006-08-16 23:40 jparsons
2006-08-16 21:48 jparsons
2006-08-14 14:53 jparsons
2006-08-13 19:18 jparsons
2006-08-13 19:14 jparsons
2006-08-13 19:04 jparsons
2006-08-13 18:46 jparsons
2006-08-13 18:42 jparsons
2006-08-13 18:35 jparsons
2006-08-13 14:54 jparsons
2006-08-13 14:50 jparsons
2006-08-13 14:38 jparsons
2006-08-13 13:49 jparsons
2006-08-12 17:52 jparsons
2006-08-11 14:23 jparsons
2006-08-11 14:07 jparsons
2006-08-11 0:23 jparsons
2006-08-10 23:51 jparsons
2006-08-10 23:48 jparsons
2006-08-10 23:44 jparsons
2006-08-10 23:40 jparsons
2006-08-10 15:49 jparsons
2006-08-10 14:16 jparsons
2006-08-09 21:38 jparsons
2006-08-02 17:27 rmccabe
2006-08-01 15:43 jparsons
2006-07-28 19:49 jparsons
2006-07-25 20:17 jparsons
2006-07-25 17:40 jparsons
2006-07-24 20:10 jparsons
2006-07-21 17:16 jparsons
2006-07-14 16:09 jparsons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071119182308.10624.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).