Commit 80907aa6 authored by Rafael Monnerat's avatar Rafael Monnerat

Release new Configurator for SlapOS Master

 - Rename business template to follow project convention.
 - Use alarms on post-configuration step
 - bt5 list for configurator relies on a vifib_erp5 dependencies.
parent 276935b0
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>Default</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<value>
<list>
<string>your_message</string>
</list>
</value>
</item>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_displayVifibDownloadForm</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_empty</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Ready</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="EditorField" module="Products.ERP5Form.EditorField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_message</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string>text_area</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string encoding="cdata"><![CDATA[
&nbsp;
]]></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/BusinessConfiguration_viewDisplayVifibDownloadFormRenderer</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
##############################################################################
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.ERP5Configurator.tests.ConfiguratorTestMixin import \
TestLiveConfiguratorWorkflowMixin
from Products.ERP5Type.tests.Sequence import SequenceList
class TestVifibConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
"""
Configurator Mixin Class
"""
# The list of standard business templates that the configurator should force
# to install
user_reference = "demo"
standard_bt5_list = (
'erp5_simulation',
'erp5_administration',
'erp5_pdm',
'erp5_trade',
'erp5_simulation_test',
'erp5_item',
'erp5_open_trade',
'erp5_forge',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_crm',
'erp5_jquery',
'erp5_jquery_ui',
'erp5_knowledge_pad',
'erp5_web',
'erp5_dms',
'erp5_l10n_fr',
'erp5_content_translation',
'erp5_software_pdm',
'erp5_computer_immobilisation',
'erp5_accounting',
'erp5_accounting_l10n_fr',
'erp5_tax_resource',
'erp5_discount_resource',
'erp5_invoicing',
'erp5_ods_style',
'erp5_odt_style',
'erp5_ooo_import',
'erp5_simplified_invoicing',
'erp5_legacy_tax_system',
'erp5_commerce',
'erp5_project',
'erp5_xhtml_jquery_style',
'erp5_credential',
'erp5_km',
'erp5_web_download_theme',
'vifib_mysql_innodb_catalog',
'vifib_core',
'vifib_base',
'vifib_slap',
'vifib_forge_release',
'vifib_software_pdm',
'vifib_web',
'vifib_open_trade',
'vifib_l10n_fr',
'vifib_data',
'vifib_data_category',
'vifib_data_web',
'vifib_erp5')
def getBusinessTemplateList(self):
return ('erp5_core_proxy_field_legacy',
'erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_workflow',
'erp5_configurator',
'erp5_configurator_vifib',)
def stepCreateBusinessConfiguration(self, sequence=None,\
sequence_list=None, **kw):
""" Create one Business Configuration """
module = self.portal.business_configuration_module
business_configuration = module.newContent(
portal_type="Business Configuration",
title='Test Configurator Vifib Workflow')
next_dict = {}
sequence.edit(business_configuration=business_configuration,
next_dict=next_dict)
def stepCheckConfigureInstallationForm(self, sequence=None,\
sequence_list=None, **kw):
""" Check the installation form """
response_dict = sequence.get("response_dict")
# configuration is finished. We are at the Install state.
# On maxma demo, installation is the first slide.
self.assertEquals('show', response_dict['command'])
self.assertEquals('Install', response_dict['next'])
def stepSetVifibWorkflow(self, sequence=None, sequence_list=None, **kw):
""" Set Consulting Workflow into Business Configuration """
business_configuration = sequence.get("business_configuration")
self.setBusinessConfigurationWorkflow(business_configuration,
"workflow_module/vifib_configuration_workflow")
def stepCheckVifibObjectList(self, sequence=None, sequence_list=None, **kw):
""" Check if objects are placed into the appropriate state """
self.assertNotEquals(None, getattr(self.portal,
"portal_certificate_authority", None))
self.assertNotEquals(None, getattr(self.portal, "portal_slap", None))
# Verify if acl_user is appropriatted configured.
# XXX Not implemented yet
# Check Gadgets
for gadget in self.portal.portal_gadgets.searchFolder():
self.assertEquals('public', gadget.getValidationState(),
"%s is not public but %s" % (gadget.getRelativeUrl(),
gadget.getValidationState()))
gadget.Base_checkConsistency()
### STEPS
DEFAULT_SEQUENCE_LIST = """
stepCreateBusinessConfiguration
stepTic
stepSetVifibWorkflow
stepTic
stepConfiguratorNext
stepTic
stepCheckBT5ConfiguratorItem
stepCheckConfigureInstallationForm
stepSetupInstallConfiguration
stepConfiguratorNext
stepTic
stepCheckInstallConfiguration
stepStartConfigurationInstallation
stepTic
stepCheckInstanceIsConfigured%(country)s
stepCheckVifibObjectList
"""
def test_vifib_workflow(self):
""" Test the consulting workflow configuration"""
self.all_username_list = ["demo"]
self.accountant_username_list = self.all_username_list
self.sales_and_purchase_username_list = self.all_username_list
self.warehouse_username_list = self.all_username_list
self.simple_username_list = self.all_username_list
self.restricted_security = 0
sequence_list = SequenceList()
sequence_string = self.DEFAULT_SEQUENCE_LIST % dict(country='France')
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
import unittest
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVifibConfiguratorWorkflow))
return suite
Configuration workflow for create a vifib master.
\ No newline at end of file
workflow_module/slapos_configuration_workflow
workflow_module/slapos_configuration_workflow/**
\ No newline at end of file
erp5_configurator_vifib
\ No newline at end of file
testVifibConfigurationWorkflow
\ No newline at end of file
erp5_configurator_vifib
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>source/workflow_module/slapos_configuration_workflow/1</string> <string>source/workflow_module/vifib_configuration_workflow/1</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>slapos_configuration_workflow</string> </value> <value> <string>vifib_configuration_workflow</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/56</string> <string>destination/workflow_module/vifib_configuration_workflow/56</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/64</string> <string>destination/workflow_module/vifib_configuration_workflow/64</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/11</string> <string>destination/workflow_module/vifib_configuration_workflow/11</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</item> </item>
<item> <item>
<key> <string>transition_form_id</string> </key> <key> <string>transition_form_id</string> </key>
<value> <string>BusinessConfiguration_displayVifibDownloadForm</string> </value> <value> <string>BusinessConfiguration_displayDownloadForm</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/14</string> <string>destination/workflow_module/vifib_configuration_workflow/14</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/29</string> <string>destination/workflow_module/vifib_configuration_workflow/29</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/30</string> <string>destination/workflow_module/vifib_configuration_workflow/30</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/55</string> <string>destination/workflow_module/vifib_configuration_workflow/55</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/slapos_configuration_workflow/63</string> <string>destination/workflow_module/vifib_configuration_workflow/63</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>erp5_configurator_vifib</string> </value> <value> <string>vifib_configurator</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -52,12 +52,15 @@ ...@@ -52,12 +52,15 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n \n
bt5_installation_list = (\'vifib_erp5\',)\n bt5_update_catalog_list = (\'erp5_ingestion_mysql_innodb_catalog\',\n
\'vifib_mysql_innodb_catalog\')\n
\n \n
bt5_installation_list = bt5_update_catalog_list + (\'vifib_erp5\',)\n
\n
for name in bt5_installation_list:\n for name in bt5_installation_list:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
title=name, bt5_id=name,\n title=name, bt5_id=name,\n
update_catalog=1)\n update_catalog=(name in bt5_update_catalog_list))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>60.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_promise</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,35 +50,26 @@ ...@@ -50,35 +50,26 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>""" This script will be called to apply the customization. """\n <value> <string>promise_dict = {\n
from AccessControl import getSecurityManager\n \'IExtractionPlugin\': [\n
from Products.ERP5Type.Log import log\n \'Vifib Browser ID Extraction Plugin\',\n
\n \'Vifib Facebook Server Extraction Plugin\',\n
portal = context.getPortalObject()\n \'Vifib Google Server Extraction Plugin\',\n
for gadget in portal.portal_gadgets.objectValues():\n # \'ERP5 Bearer Extraction Plugin\',\n
if gadget.getValidationState() == \'invisible\':\n \'ERP5 Facebook Extraction Plugin\',\n
gadget.visible()\n \'ERP5 Google Extraction Plugin\',\n
gadget.public()\n ],\n
\n }\n
context.BusinessCondiguration_additionalConfiguration()\n context.Alarm_checkPromiseVifibPASBase(promise_dict, tag, fixit=fixit, **kw)\n
\n
print "Indexing translations"\n
portal.ERP5Site_updateTranslationTable()\n
\n
# clear cache so user security is recalculated\n
portal.portal_caches.clearAllCache()\n
print "Clear cache."\n
\n
log("%s" % printed)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>tag, fixit=False, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>BusinessConfiguration_afterVifibConfiguration</string> </value> <value> <string>Alarm_checkPromiseVifibExternalPAS</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.CMFActivity.ActiveResult import ActiveResult\n
\n
portal = context.getPortalObject()\n
wrong_module_list = []\n
for module_id in portal.objectIds(spec=(\'ERP5 Folder\',)) + ["portal_simulation", "portal_activities"]:\n
module = portal.restrictedTraverse(module_id)\n
if module.getIdGenerator() != \'_generatePerDayId\':\n
wrong_module_list.append(module.getRelativeUrl())\n
if fixit:\n
module.setIdGenerator(\'_generatePerDayId\')\n
\n
if len(wrong_module_list) != 0:\n
summary = "Some modules have incorrect ID generator"\n
if fixit:\n
summary += ", fixed."\n
severity = 0\n
else:\n
severity = 1\n
detail = "List: %s" % (\', \'.join(wrong_module_list), )\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result = ActiveResult()\n
active_result.edit(\n
summary=summary, \n
severity=severity,\n
detail=detail)\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tag, fixit=False, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_checkPromiseVifibModuleIdGenerator</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>promise_dict = {\n
\'IExtractionPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
],\n
\'IAuthenticationPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
\'Vifib Shadow Authentication Plugin\',\n
],\n
\'IGroupsPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
\'Vifib Shadow Authentication Plugin\',\n
],\n
\'IUserEnumerationPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
\'Vifib Shadow Authentication Plugin\'\n
]\n
}\n
context.Alarm_checkPromiseVifibPASBase(promise_dict, tag, fixit=fixit, **kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tag, fixit=False, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_checkPromiseVifibPAS</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.CMFActivity.ActiveResult import ActiveResult\n
\n
portal = context.getPortalObject()\n
def mergePASDictDifference(portal, d, fixit):\n
plugins = portal.acl_users.plugins\n
error_list = []\n
plugin_type_info = plugins.listPluginTypeInfo()\n
for plugin, active_list in d.iteritems():\n
plugin_info = [q for q in plugin_type_info if q[\'id\'] == plugin][0]\n
found_list = plugins.listPlugins(plugin_info[\'interface\'])\n
meta_type_list = [q[1].meta_type for q in found_list]\n
for expected in active_list:\n
if expected not in meta_type_list:\n
error = \'Plugin %s missing %s.\' % (plugin, expected)\n
if fixit: \n
existing = [q for q in portal.acl_users.objectValues() if q.meta_type == expected]\n
if len(existing) == 0:\n
error_list.append(\'%s not found\' % expected)\n
else:\n
plugins.activatePlugin(plugin_info[\'interface\'], existing[0].getId())\n
error += \' Fixed.\'\n
error_list.append(error)\n
\n
return error_list\n
\n
pas_difference = mergePASDictDifference(portal, promise_dict, fixit)\n
if len(pas_difference) != 0:\n
severity = 1\n
summary = "PAS not configured as expected"\n
detail = "Difference:\\n%s" % (\'\\n\'.join(pas_difference), )\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result = ActiveResult()\n
active_result.edit(\n
summary=summary, \n
severity=severity,\n
detail=detail)\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>promise_dict, tag, fixit=False, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_checkPromiseVifibPASBase</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,50 +50,7 @@ ...@@ -50,50 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># This script contains some steps which are not yet supported\n <value> <string>context.activeSense(fixit=1)\n
# by configuration items. Each feature should be back ported to\n
# ERP5Configurator as an specific Configuration Item.\n
\n
portal = context.getPortalObject() \n
\n
## Create new portal tool for Vifib\n
if getattr(portal, "portal_certificate_authority", None ) is None:\n
portal.manage_addProduct[\'ERP5\'].manage_addTool(\'ERP5 Certificate Authority Tool\', None)\n
print "Created portal_certificate_authority"\n
else:\n
print "portal_certificate_authority already exists."\n
\n
## Set Authentification Plugin\n
plugin_id = "vifib_auth"\n
user_folder = context.acl_users\n
if plugin_id not in user_folder.objectIds():\n
# check if it\'s not already created\n
user_folder.manage_addProduct[\'Vifib\'].addVifibMachineAuthenticationPlugin(\n
id = plugin_id, \n
title = "Vifib Machine Authentication Plugin")\n
print "%s Plugin added at acl_users." % plugin_id\n
else:\n
print "%s Plugin already added added at acl_users." % plugin_id\n
\n
vifib_plugin = getattr(user_folder, plugin_id)\n
vifib_plugin.manage_activateInterfaces(interfaces=[\'IAuthenticationPlugin\',\n
\'IUserEnumerationPlugin\', \n
\'IGroupsPlugin\', \n
\'IExtractionPlugin\' ])\n
print "Enabled "\n
## This is a hack, the initial users should be created by traditional \n
## user configurator state.\n
##test_vifib_admin = self.person_module.searchFolder(portal_type="Person", \n
## reference="test_vifib_admin")\n
\n
##if len(user.searchFolder(portal_type="Assignment", validation_date="started")) == 0:\n
## assignment = test_vifib_admin.newContent(portal_type="Assignment")\n
## assigment.setGroup("group/vifib")\n
## assignment.start()\n
\n
\n
\n
return printed\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -102,7 +59,7 @@ return printed\n ...@@ -102,7 +59,7 @@ return printed\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>BusinessCondiguration_additionalConfiguration</string> </value> <value> <string>Alarm_fixPromiseVifibExternalPAS</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.activeSense(fixit=1)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_fixPromiseVifibModuleIdGenerator</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,14 @@ ...@@ -2,10 +2,14 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_bind_names</string> </key>
<value> <value>
...@@ -20,6 +24,18 @@ ...@@ -20,6 +24,18 @@
<key> <string>_asgns</string> </key> <key> <string>_asgns</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item> <item>
<key> <string>name_subpath</string> </key> <key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value> <value> <string>traverse_subpath</string> </value>
...@@ -33,40 +49,17 @@ ...@@ -33,40 +49,17 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_body</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <value> <string>context.activeSense(fixit=1)\n
</string> </value>
<h4 i18n:translate=""\n
i18n:domain="ui"> The SlapOS master is going to be installed.</h4>\n
\n
\n
<p i18n:translate=""\n
i18n:domain="ui">\n
Please proceed using Install button below. \n
In the next page you will receive automatically updated installation status report.\n
</p>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item> </item>
<item> <item>
<key> <string>expand</string> </key> <key> <string>_params</string> </key>
<value> <int>0</int> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>BusinessConfiguration_viewDisplayVifibDownloadFormRenderer</string> </value> <value> <string>Alarm_fixPromiseVifibPAS</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Final download form message</unicode> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
Configuration workflow for create a SlapOS master.
\ No newline at end of file
27
\ No newline at end of file
workflow_module/vifib_configuration_workflow
workflow_module/vifib_configuration_workflow/**
\ No newline at end of file
vifib_configurator
vifib_promise
\ No newline at end of file
vifib_configurator
\ No newline at end of file
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