Commit 73208370 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_promise: Drop alarm since it certificate_authority_tool was removed

parent b0c34951
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_checkPromiseCertificateAuthority</string> </value>
</item>
<item>
<key> <string>alarm_notification_mode</string> </key>
<value>
<tuple>
<string>never</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>promise_certificate_autority_tool</string> </value>
</item>
<item>
<key> <string>periodicity_day_frequency</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="DateTime" module="DateTime.DateTime"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>0.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>solve_method_id</string> </key>
<value> <string>Alarm_installPromiseCertificateAuthority</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Certificate Authority Tool</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.CMFActivity.ActiveResult import ActiveResult
portal = context.getPortalObject()
portal_certificate_authority = getattr(portal, 'portal_certificate_authority', None)
promise_ca_path = portal.getPromiseParameter('portal_certificate_authority', 'certificate_authority_path')
if promise_ca_path is None:
severity = 0
summary = "Nothing to do."
detail = ""
else:
if portal_certificate_authority is None:
severity = 1
summary = "Certificate Authority Tool is not present"
detail = ""
elif portal_certificate_authority.certificate_authority_path != promise_ca_path:
severity = 1
summary = "Certificate Authority Tool (OpenSSL)is not configured as Expected"
detail = "Expect %s\nGot %s" % (portal_certificate_authority.certificate_authority_path, promise_ca_path)
else:
severity = 0
summary = "Nothing to do."
detail = ""
active_result = ActiveResult()
active_result.edit(
summary=summary,
severity=severity,
detail=detail)
context.newActiveProcess().postResult(active_result)
portal = context.getPortalObject()
portal_certificate_authority = portal.portal_certificate_authority
promise_ca_path = portal.getPromiseParameter('portal_certificate_authority', 'certificate_authority_path')
portal_certificate_authority.manage_editCertificateAuthorityTool(
certificate_authority_path=promise_ca_path)
......@@ -37,7 +37,7 @@ class TestERP5Promise(ERP5TypeTestCase):
"""
Return the list of business templates.
"""
return ("erp5_base", "erp5_certificate_authority", "erp5_promise")
return ("erp5_base", "erp5_promise")
def _test_promise_alarm(self, alarm_id):
alarm = self.portal.portal_alarms[alarm_id]
......@@ -62,9 +62,6 @@ class TestERP5Promise(ERP5TypeTestCase):
self.portal.portal_memcached.default_memcached_plugin.setUrlString(None)
self._test_promise_alarm("promise_memcached_server")
def test_promise_certificate_autority_tool(self):
self._test_promise_alarm("promise_certificate_autority_tool")
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5Promise))
......
portal_alarms/promise_certificate_autority_tool
portal_alarms/promise_conversion_server
portal_alarms/promise_install_bt5
portal_alarms/promise_kumofs_server
portal_alarms/promise_mailhost_configuration
portal_alarms/promise_memcached_server
portal_alarms/promise_template_tool_configuration
\ No newline at end of file
portal_alarms/promise_template_tool_configuration
......@@ -420,12 +420,6 @@ class IntrospectionTool(LogMixin, BaseTool):
collect_information_by_property(conn,'connection_string')
# collect information from certificate authority
certificate_authority = getattr(portal, 'portal_certificate_authority',
None)
if certificate_authority is not None:
collect_information_by_property(certificate_authority,
'certificate_authority_path')
return connection_dict
security.declareProtected(Permissions.ManagePortal,
......
<h1 tal:replace="structure context/manage_page_header">PAGE HEADER</h1>
<h2 tal:replace="structure here/manage_tabs"> TABS </h2>
<h2 tal:define="form_title string:Edit ERP5 Certificate Authority Tool"
tal:replace="structure context/manage_form_title">FORM TITLE</h2>
<p class="form-help">Please input the Certificate Authority path</p>
<form action="manage_editCertificateAuthorityTool" method="POST">
<table
tal:define="certificate_authority_path request/certificate_authority_path|context/certificate_authority_path|string:; openssl_binary request/openssl_binary|context/openssl_binary|string:;">
<tr>
<td>Absolute path to configured Certificate Authority</td>
<td>
<input type="text" name="certificate_authority_path" value=""
tal:attributes="value certificate_authority_path;" />
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="save"/>
</td>
</tr>
</table>
</form>
<h1 tal:replace="structure context/manage_page_footer">PAGE FOOTER</h1>
......@@ -165,11 +165,6 @@ def _createTestPromiseConfigurationFile(promise_path, bt5_repository_path_list=N
promise_config.set('portal_templates', 'repository',
' '.join(bt5_repository_path_list))
if os.environ.get('TEST_CA_PATH') is not None:
promise_config.add_section('portal_certificate_authority')
promise_config.set('portal_certificate_authority', 'certificate_authority_path',
os.environ['TEST_CA_PATH'])
promise_config.write(open(promise_path, 'w'))
def profile_if_environ(environment_var_name):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment