[conga-luci-1stgen] RHEL5-active: Restore AWOL code to add SSL config support for fence_ilo (2e3882c)
by rmccabe@fedorahosted.org
Repository : http://git.fedorahosted.org/git/?p=conga-luci-1stgen.git
On branch : RHEL5-active
>---------------------------------------------------------------
commit 2e3882c5b37d946b6d422ae372beb23fa95ac593
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 30 13:12:45 2012 -0400
Restore AWOL code to add SSL config support for fence_ilo
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
>---------------------------------------------------------------
luci/cluster/fence-macros | 13 +++++++++++--
luci/site/luci/Extensions/FenceHandler.py | 6 ++++++
luci/site/luci/var/Data.fs | Bin 4741918 -> 4736469 bytes
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/luci/cluster/fence-macros b/luci/cluster/fence-macros
index d3e8020..f5f226e 100644
--- a/luci/cluster/fence-macros
+++ b/luci/cluster/fence-macros
@@ -1096,16 +1096,25 @@
<td>
<input type="text" name="passwd_script"
tal:attributes="
- disabled cur_fencedev/isShared | nothing;
value cur_fencedev/passwd_script | nothing" />
</td>
</tr>
<tr>
+ <td>Use SSL connections</td>
+ <td>
+ <input tal:condition="exists:cur_fencedev"
+ type="checkbox" name="ssl"
+ tal:attributes="
+ checked python:(cur_fencedev and cur_fencedev.has_key('ssl') and (cur_fencedev['ssl'] == '1' or cur_fencedev['ssl'].lower() == 'true')) and 'checked' or ''" />
+ <input tal:condition="not:exists:cur_fencedev"
+ type="checkbox" name="ssl" />
+ </td>
+ </tr>
+ <tr>
<td>Power wait (seconds)</td>
<td>
<input type="text" name="power_wait"
tal:attributes="
- disabled cur_fencedev/isShared | nothing;
value cur_fencedev/power_wait | nothing" />
</td>
</tr>
diff --git a/luci/site/luci/Extensions/FenceHandler.py b/luci/site/luci/Extensions/FenceHandler.py
index c67a191..cc40803 100644
--- a/luci/site/luci/Extensions/FenceHandler.py
+++ b/luci/site/luci/Extensions/FenceHandler.py
@@ -1737,6 +1737,12 @@ def val_ilo_fd(form, fencedev):
except:
pass
+ use_ssl = form.has_key('ssl') and form['ssl'].lower() in ('1', 'on', 'true')
+ if use_ssl:
+ fencedev.addAttribute('ssl', '1')
+ else:
+ fencedev.removeAttribute('ssl')
+
if not has_passwd:
errors.append(FD_PROVIDE_PASSWD)
diff --git a/luci/site/luci/var/Data.fs b/luci/site/luci/var/Data.fs
index c2c2263..1190f83 100644
Binary files a/luci/site/luci/var/Data.fs and b/luci/site/luci/var/Data.fs differ