Commit 245dae34 authored by Alain Takoudjou's avatar Alain Takoudjou

Merge branch 'operation-control'

Conflicts:
	CHANGES.txt
	master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage/my_busy_computer_partition_list.xml
	master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Computer_viewCurrentUsage/your_busy_computer_partition_list.xml
	master/bt5/slapos_cloud/bt/revision
	master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Computer_checkSoftwareInstanceState.xml
	master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/ERP5Site_isSupportRequestCreationClosed.xml
	master/bt5/slapos_crm/bt/revision
	master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/Alarm_updateSoftwareReleaseCapacity.xml
	master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/SoftwareInstance_viewAsWeb/my_text_content.xml
	master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/SoftwareInstance_viewAsWeb/your_connection_listbox.xml
	master/bt5/slapos_erp5/bt/revision
	master/bt5/slapos_hypermedia/ExtensionTemplateItem/SlapOSHypermedia.py
	master/bt5/slapos_hypermedia/TestTemplateItem/portal_components/test.erp5.testSlapOSHypermediaSkins.py
	master/bt5/slapos_hypermedia/bt/revision
	master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareProduct_viewMassUpgradeDialog/your_comment.xml
	master/bt5/slapos_pdm/bt/revision
	master/bt5/slapos_pdm/bt/template_test_id_list
	master/bt5/slapos_rest_api/bt/revision
	master/bt5/slapos_slap_tool/bt/revision
	master/bt5/slapos_web/SkinTemplateItem/portal_skins/slapos_rss/WebSection_getRSSDescriptionContent.xml
	master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewHelpRender/your_ad.xml
	master/bt5/slapos_web/bt/revision
	setup.py
	slapos/cli/collect.py
	slapos/cli_legacy/bang.py
	slapos/collect/__init__.py
	slapos/collect/db.py
	slapos/collect/entity.py
	slapos/collect/reporter.py
	slapos/collect/snapshot.py
	slapos/grid/slapgrid.py
	slapos/proxy/views.py
	slapos/slap/slap.py
	slapos/tests/slap.py
	slapos/tests/slapgrid.py
	slapos/tests/slapproxy/__init__.py
	slapos/version.py
parents 58bc658e 24a0d229
from Products.ERP5.Document.OrderBuilder import OrderBuilder from Products.ERP5.Document.GeneratedDeliveryBuilder import GeneratedDeliveryBuilder
from Products.ERP5.Document.SimulatedDeliveryBuilder import BUILDING_KEY
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5.mixin.builder import BuilderMixin from Products.ERP5.mixin.builder import BuilderMixin
class SlapOSAccountingQuantityUpdatingOrderBuilder(OrderBuilder): class SlapOSAccountingQuantityUpdatingOrderBuilder(GeneratedDeliveryBuilder):
def _setDeliveryMovementProperties(self, delivery_movement, def _setDeliveryMovementProperties(self, delivery_movement,
simulation_movement, property_dict, simulation_movement, property_dict,
update_existing_movement=0, update_existing_movement=0,
...@@ -15,9 +13,6 @@ class SlapOSAccountingQuantityUpdatingOrderBuilder(OrderBuilder): ...@@ -15,9 +13,6 @@ class SlapOSAccountingQuantityUpdatingOrderBuilder(OrderBuilder):
and delivery movement. and delivery movement.
""" """
delivery = delivery_movement.getExplanationValue() delivery = delivery_movement.getExplanationValue()
building = getTransactionalVariable()[BUILDING_KEY]
if delivery in building:
building.add(delivery_movement)
simulation_movement.recursiveReindexObject(activate_kw=dict( simulation_movement.recursiveReindexObject(activate_kw=dict(
activate_kw or (), tag='built:'+delivery.getPath())) activate_kw or (), tag='built:'+delivery.getPath()))
BuilderMixin._setDeliveryMovementProperties( BuilderMixin._setDeliveryMovementProperties(
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSAccountingQuantityUpdatingOrderBuilder</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.SlapOSAccountingQuantityUpdatingOrderBuilder</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SubscriptionItemRootSimulationRule</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.SubscriptionItemRootSimulationRule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>F: 36, 0: Unable to import \'Products.ERP5Type.Document.Predicate\' (import-error)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 42, 0: Method \'_newProfitAndLossMovement\' is abstract in class \'RuleMixin\' but is not overridden (abstract-method)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSAccounting</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.SlapOSAccounting</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 52, 58: Unused variable \'e\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -5,4 +5,7 @@ ...@@ -5,4 +5,7 @@
<portal_type id="Consumption Document Module"> <portal_type id="Consumption Document Module">
<item>Computer Consumption TioXML File</item> <item>Computer Consumption TioXML File</item>
</portal_type> </portal_type>
<portal_type id="Sale Invoice Transaction">
<item>Invoice Line</item>
</portal_type>
</hidden_content_type_list> </hidden_content_type_list>
\ No newline at end of file
<?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>if kw.get(\'created_by_builder\', 0): \n
return\n
\n
context.newContent(portal_type=\'Sale Invoice Transaction Line\',\n
id=\'income\',)\n
context.newContent(portal_type=\'Sale Invoice Transaction Line\',\n
id=\'receivable\', )\n
context.newContent(portal_type=\'Sale Invoice Transaction Line\',\n
id=\'collected_vat\',)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>*args, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleInvoiceTransaction_init</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
############################################################################## ##############################################################################
import transaction import transaction
import functools from functools import wraps
from Products.ERP5Type.tests.utils import createZODBPythonScript from Products.ERP5Type.tests.utils import createZODBPythonScript
from Products.SlapOS.tests.testSlapOSMixin import \ from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin, withAbort testSlapOSMixin, withAbort
...@@ -38,7 +38,7 @@ class Simulator: ...@@ -38,7 +38,7 @@ class Simulator:
def simulateByEditWorkflowMark(script_name): def simulateByEditWorkflowMark(script_name):
def wrapper(func): def wrapper(func):
@functools.wraps(func) @wraps(func)
def wrapped(self, *args, **kwargs): def wrapped(self, *args, **kwargs):
if script_name in self.portal.portal_skins.custom.objectIds(): if script_name in self.portal.portal_skins.custom.objectIds():
raise ValueError('Precondition failed: %s exists in custom' % script_name) raise ValueError('Precondition failed: %s exists in custom' % script_name)
...@@ -46,20 +46,21 @@ def simulateByEditWorkflowMark(script_name): ...@@ -46,20 +46,21 @@ def simulateByEditWorkflowMark(script_name):
script_name, script_name,
'*args, **kwargs', '*args, **kwargs',
'# Script body\n' '# Script body\n'
"""context.portal_workflow.doActionFor(context, action='edit_action', comment='Visited by %s') """%script_name ) """context.portal_workflow.doActionFor(context, action='edit_action', comment='Visited by %s') """ % script_name )
transaction.commit() transaction.commit()
try: try:
func(self, *args, **kwargs) result = func(self, *args, **kwargs)
finally: finally:
if script_name in self.portal.portal_skins.custom.objectIds(): if script_name in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_name) self.portal.portal_skins.custom.manage_delObjects(script_name)
transaction.commit() transaction.commit()
return result
return wrapped return wrapped
return wrapper return wrapper
def simulateByTitlewMark(script_name): def simulateByTitlewMark(script_name):
def wrapper(func): def wrapper(func):
@functools.wraps(func) @wraps(func)
def wrapped(self, *args, **kwargs): def wrapped(self, *args, **kwargs):
if script_name in self.portal.portal_skins.custom.objectIds(): if script_name in self.portal.portal_skins.custom.objectIds():
raise ValueError('Precondition failed: %s exists in custom' % script_name) raise ValueError('Precondition failed: %s exists in custom' % script_name)
...@@ -73,11 +74,12 @@ if context.getTitle() == 'Not visited by %s': ...@@ -73,11 +74,12 @@ if context.getTitle() == 'Not visited by %s':
""" %(script_name, script_name)) """ %(script_name, script_name))
transaction.commit() transaction.commit()
try: try:
func(self, *args, **kwargs) result = func(self, *args, **kwargs)
finally: finally:
if script_name in self.portal.portal_skins.custom.objectIds(): if script_name in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_name) self.portal.portal_skins.custom.manage_delObjects(script_name)
transaction.commit() transaction.commit()
return result
return wrapped return wrapped
return wrapper return wrapper
...@@ -477,6 +479,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin): ...@@ -477,6 +479,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
destination_section_value=person) destination_section_value=person)
instance = self.portal.software_instance_module\ instance = self.portal.software_instance_module\
.template_slave_instance.Base_createCloneDocument(batch_mode=1) .template_slave_instance.Base_createCloneDocument(batch_mode=1)
previous_delivery = self.portal.sale_packing_list_module.newContent( previous_delivery = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List') portal_type='Sale Packing List')
new_id = self.generateNewId() new_id = self.generateNewId()
...@@ -1327,6 +1330,9 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin): ...@@ -1327,6 +1330,9 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
@withAbort @withAbort
def test_SimulationMovement_buildSlapOS(self): def test_SimulationMovement_buildSlapOS(self):
build_simulator = tempfile.mkstemp()[1]
activate_simulator = tempfile.mkstemp()[1]
business_process = self.portal.business_process_module.newContent( business_process = self.portal.business_process_module.newContent(
portal_type='Business Process') portal_type='Business Process')
root_business_link = business_process.newContent( root_business_link = business_process.newContent(
...@@ -1344,8 +1350,6 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin): ...@@ -1344,8 +1350,6 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
causality=business_link.getRelativeUrl(), causality=business_link.getRelativeUrl(),
portal_type='Simulation Movement') portal_type='Simulation Movement')
build_simulator = tempfile.mkstemp()[1]
activate_simulator = tempfile.mkstemp()[1]
try: try:
from Products.CMFActivity.ActiveObject import ActiveObject from Products.CMFActivity.ActiveObject import ActiveObject
ActiveObject.original_activate = ActiveObject.activate ActiveObject.original_activate = ActiveObject.activate
...@@ -1409,6 +1413,9 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin): ...@@ -1409,6 +1413,9 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
@withAbort @withAbort
def test_SimulationMovement_buildSlapOS_withDelivery(self): def test_SimulationMovement_buildSlapOS_withDelivery(self):
build_simulator = tempfile.mkstemp()[1]
activate_simulator = tempfile.mkstemp()[1]
delivery = self.portal.sale_packing_list_module.newContent( delivery = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List') portal_type='Sale Packing List')
delivery_line = delivery.newContent(portal_type='Sale Packing List Line') delivery_line = delivery.newContent(portal_type='Sale Packing List Line')
...@@ -1431,8 +1438,6 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin): ...@@ -1431,8 +1438,6 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
delivery=delivery_line.getRelativeUrl(), delivery=delivery_line.getRelativeUrl(),
portal_type='Simulation Movement') portal_type='Simulation Movement')
build_simulator = tempfile.mkstemp()[1]
activate_simulator = tempfile.mkstemp()[1]
try: try:
from Products.CMFActivity.ActiveObject import ActiveObject from Products.CMFActivity.ActiveObject import ActiveObject
ActiveObject.original_activate = ActiveObject.activate ActiveObject.original_activate = ActiveObject.activate
...@@ -1499,17 +1504,18 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin): ...@@ -1499,17 +1504,18 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin):
@withAbort @withAbort
def _test_Delivery_manageBuildingCalculatingDelivery(self, state, empty=False): def _test_Delivery_manageBuildingCalculatingDelivery(self, state, empty=False):
updateCausalityState_simulator = tempfile.mkstemp()[1]
updateSimulation_simulator = tempfile.mkstemp()[1]
delivery = self.portal.sale_packing_list_module.newContent( delivery = self.portal.sale_packing_list_module.newContent(
title='Not visited by Delivery_manageBuildingCalculatingDelivery', title='Not visited by Delivery_manageBuildingCalculatingDelivery',
portal_type='Sale Packing List') portal_type='Sale Packing List')
self.portal.portal_workflow._jumpToStateFor(delivery, state) self.portal.portal_workflow._jumpToStateFor(delivery, state)
updateCausalityState_simulator = tempfile.mkstemp()[1]
updateSimulation_simulator = tempfile.mkstemp()[1]
try: try:
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
Delivery.original_updateCausalityState = Delivery\ Delivery.original_updateCausalityState = Delivery.updateCausalityState
.updateCausalityState Delivery.original_updateSimulation = Delivery.updateSimulation
Delivery.updateCausalityState = Simulator( Delivery.updateCausalityState = Simulator(
updateCausalityState_simulator, 'updateCausalityState') updateCausalityState_simulator, 'updateCausalityState')
Delivery.updateSimulation = Simulator( Delivery.updateSimulation = Simulator(
...@@ -1538,7 +1544,9 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin): ...@@ -1538,7 +1544,9 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin):
) )
finally: finally:
Delivery.updateCausalityState = Delivery.original_updateCausalityState Delivery.updateCausalityState = Delivery.original_updateCausalityState
Delivery.updateSimulation = Delivery.original_updateSimulation
delattr(Delivery, 'original_updateCausalityState') delattr(Delivery, 'original_updateCausalityState')
delattr(Delivery, 'original_updateSimulation')
if os.path.exists(updateCausalityState_simulator): if os.path.exists(updateCausalityState_simulator):
os.unlink(updateCausalityState_simulator) os.unlink(updateCausalityState_simulator)
if os.path.exists(updateSimulation_simulator): if os.path.exists(updateSimulation_simulator):
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingAlarm</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 30, 10: Use of eval (eval-used)</string>
<string>W:278, 16: Unused variable \'update_line\' (unused-variable)</string>
<string>W:350, 16: Unused variable \'update_line\' (unused-variable)</string>
<string>W:350, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:407, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:528, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:528, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:588, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:649, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:649, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:688, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:688, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:1364, 20: Use of eval (eval-used)</string>
<string>W:1365, 23: Use of eval (eval-used)</string>
<string>W:1386, 20: Use of eval (eval-used)</string>
<string>W:1387, 23: Use of eval (eval-used)</string>
<string>W:1452, 20: Use of eval (eval-used)</string>
<string>W:1453, 23: Use of eval (eval-used)</string>
<string>W:1462, 20: Use of eval (eval-used)</string>
<string>W:1463, 23: Use of eval (eval-used)</string>
<string>W:1526, 35: Use of eval (eval-used)</string>
<string>W:1527, 31: Use of eval (eval-used)</string>
<string>W:1695, 4: Unused variable \'movement\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingBuilder</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingBuilder</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 11, 0: Unused import transaction (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
# #
############################################################################## ##############################################################################
from testSlapOSCloudConstraint import TestSlapOSConstraintMixin from erp5.component.test.testSlapOSCloudConstraint import TestSlapOSConstraintMixin
from Products.ERP5Type.Base import WorkflowMethod from Products.ERP5Type.Base import WorkflowMethod
from Products.SlapOS.tests.testSlapOSMixin import withAbort from Products.SlapOS.tests.testSlapOSMixin import withAbort
from Products.ERP5Type.tests.backportUnittest import skip from Products.ERP5Type.tests.backportUnittest import skip
...@@ -20,12 +20,12 @@ class TestHostingSubscription(TestSlapOSConstraintMixin): ...@@ -20,12 +20,12 @@ class TestHostingSubscription(TestSlapOSConstraintMixin):
portal_type='Hosting Subscription') portal_type='Hosting Subscription')
def afterSetUp(self): def afterSetUp(self):
super(TestHostingSubscription, self).afterSetUp() TestSlapOSConstraintMixin.afterSetUp(self)
self._createHostingSubscription() self._createHostingSubscription()
def beforeTearDown(self): def beforeTearDown(self):
transaction.abort() transaction.abort()
super(TestHostingSubscription, self).beforeTearDown() TestSlapOSConstraintMixin.beforeTearDown(self)
def test_periodicity_hour_list_value(self): def test_periodicity_hour_list_value(self):
value = 7 value = 7
...@@ -115,15 +115,15 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin): ...@@ -115,15 +115,15 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin):
def test_price_currency(self): def test_price_currency(self):
invoice = self.portal.accounting_module.newContent( invoice = self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction') portal_type='Sale Invoice Transaction')
message = "Arity Error for Relation ['price_currency'], arity is equal "\ message = "Arity Error for Relation ['price_currency'] and Type "\
"to 0 but should be between 1 and 1" "('Currency',), arity is equal to 0 but should be between 1 and 1"
self._test_currency(invoice, invoice.setPriceCurrency, message) self._test_currency(invoice, invoice.setPriceCurrency, message)
def test_resource(self): def test_resource(self):
invoice = self.portal.accounting_module.newContent( invoice = self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction') portal_type='Sale Invoice Transaction')
message = "Arity Error for Relation ['resource'], arity is equal "\ message = "Arity Error for Relation ['resource'] and Type "\
"to 0 but should be between 1 and 1" "('Currency',), arity is equal to 0 but should be between 1 and 1"
self._test_currency(invoice, invoice.setResource, message) self._test_currency(invoice, invoice.setResource, message)
@withAbort @withAbort
...@@ -131,8 +131,8 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin): ...@@ -131,8 +131,8 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin):
invoice = self.portal.accounting_module.newContent( invoice = self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction') portal_type='Sale Invoice Transaction')
setter = invoice.setSpecialise setter = invoice.setSpecialise
message = "Arity Error for Relation ['specialise'], arity is equal "\ message = "Arity Error for Relation ['specialise'] and Type "\
"to 0 but should be at least 1" "('Sale Trade Condition',), arity is equal to 0 but should be at least 1"
self.assertTrue(message in self.getMessageList(invoice)) self.assertTrue(message in self.getMessageList(invoice))
sale_condition = self.portal.sale_trade_condition_module.newContent( sale_condition = self.portal.sale_trade_condition_module.newContent(
...@@ -264,10 +264,10 @@ class TestSalePackingList(TestSlapOSConstraintMixin): ...@@ -264,10 +264,10 @@ class TestSalePackingList(TestSlapOSConstraintMixin):
@withAbort @withAbort
def _test_category_arrow(self, category): def _test_category_arrow(self, category):
message = "Arity Error for Relation ['%s'], arity is equal to "\ message = "Arity Error for Relation ['%s'] and Type ('Organisation', "\
"0 but should be between 1 and 1" % category "'Person'), arity is equal to 0 but should be between 1 and 1" % category
message_2 = "Arity Error for Relation ['%s'], arity is equal to "\ message_2 = "Arity Error for Relation ['%s'] and Type ('Organisation', "\
"2 but should be between 1 and 1" % category "'Person'), arity is equal to 2 but should be between 1 and 1" % category
delivery = self.portal.sale_packing_list_module.newContent( delivery = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List') portal_type='Sale Packing List')
resource = self.portal.service_module.newContent( resource = self.portal.service_module.newContent(
...@@ -308,10 +308,10 @@ class TestSalePackingList(TestSlapOSConstraintMixin): ...@@ -308,10 +308,10 @@ class TestSalePackingList(TestSlapOSConstraintMixin):
@withAbort @withAbort
def test_specialise(self): def test_specialise(self):
category = 'specialise' category = 'specialise'
message = "Arity Error for Relation ['%s'], arity is equal to "\ message = "Arity Error for Relation ['%s'] and Type ('Sale Trade Condition"\
"0 but should be between 1 and 1" % category "',), arity is equal to 0 but should be between 1 and 1" % category
message_2 = "Arity Error for Relation ['%s'], arity is equal to "\ message_2 = "Arity Error for Relation ['%s'] and Type ('Sale Trade Condition"\
"2 but should be between 1 and 1" % category "',), arity is equal to 2 but should be between 1 and 1" % category
delivery = self.portal.sale_packing_list_module.newContent( delivery = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List') portal_type='Sale Packing List')
resource = self.portal.service_module.newContent( resource = self.portal.service_module.newContent(
...@@ -362,10 +362,10 @@ class TestSalePackingListLine(TestSlapOSConstraintMixin): ...@@ -362,10 +362,10 @@ class TestSalePackingListLine(TestSlapOSConstraintMixin):
@withAbort @withAbort
def test_resource_arity(self): def test_resource_arity(self):
category = 'resource' category = 'resource'
message = "Arity Error for Relation ['%s'], arity is equal to "\ message = "Arity Error for Relation ['%s'] and Type ('Service',), arity is"\
"0 but should be between 1 and 1" % category " equal to 0 but should be between 1 and 1" % category
message_2 = "Arity Error for Relation ['%s'], arity is equal to "\ message_2 = "Arity Error for Relation ['%s'] and Type ('Service',), arity is"\
"2 but should be between 1 and 1" % category " equal to 2 but should be between 1 and 1" % category
delivery_line = self.portal.sale_packing_list_module.newContent( delivery_line = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List').newContent( portal_type='Sale Packing List').newContent(
portal_type='Sale Packing List Line') portal_type='Sale Packing List Line')
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingConstraint</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingInteractionWorkflow</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingInteractionWorkflow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 7, 0: Unused import addToDate (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingRule</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingRule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 22, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:174, 4: Unused variable \'line\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSConsumptionSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSConsumptionSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 9, 0: Unused import withAbort (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSContractAlarm</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSContractAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSContractSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSContractSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 65, 4: Unused variable \'person\' (unused-variable)</string>
<string>W: 65, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W: 72, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W: 81, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W: 92, 4: Unused variable \'person\' (unused-variable)</string>
<string>W: 92, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:100, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:100, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:109, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:109, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:119, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:131, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:148, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:176, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:193, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:210, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W:233, 22: Unused variable \'subscription\' (unused-variable)</string>
<string>W: 7, 0: Unused import wraps (unused-import)</string>
<string>W: 8, 0: Unused import createZODBPythonScript (unused-import)</string>
<string>W: 9, 0: Unused import difflib (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -4,5 +4,7 @@ erp5_accounting_l10n_fr ...@@ -4,5 +4,7 @@ erp5_accounting_l10n_fr
erp5_open_trade erp5_open_trade
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_tiosafe_core erp5_tiosafe_core
erp5_simulation
erp5_movement_table_catalog
slapos_cloud slapos_cloud
erp5_dms erp5_dms
\ No newline at end of file
SubscriptionItemRootSimulationRule document.erp5.SlapOSAccountingQuantityUpdatingOrderBuilder
SlapOSAccountingQuantityUpdatingOrderBuilder document.erp5.SubscriptionItemRootSimulationRule
\ No newline at end of file \ No newline at end of file
SlapOSAccounting extension.erp5.SlapOSAccounting
\ No newline at end of file \ No newline at end of file
Cloud Contract Module | Cloud Contract Cloud Contract Module | Cloud Contract
Consumption Document Module | Computer Consumption TioXML File Consumption Document Module | Computer Consumption TioXML File
Sale Invoice Transaction | Invoice Line
\ No newline at end of file
testSlapOSAccountingSkins test.erp5.testSlapOSConsumptionSkins
testSlapOSConsumptionSkins test.erp5.testSlapOSAccountingConstraint
testSlapOSContractAlarm test.erp5.testSlapOSAccountingRule
testSlapOSContractSkins test.erp5.testSlapOSAccountingBuilder
testSlapOSAccountingAlarm test.erp5.testSlapOSContractSkins
testSlapOSAccountingBuilder test.erp5.testSlapOSAccountingInteractionWorkflow
testSlapOSAccountingConstraint test.erp5.testSlapOSAccountingSkins
testSlapOSAccountingInteractionWorkflow test.erp5.testSlapOSAccountingAlarm
testSlapOSAccountingRule test.erp5.testSlapOSContractAlarm
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Person</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.Person</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SoftwareInstance</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.SoftwareInstance</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSCloud</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.SlapOSCloud</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSSecurity</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.SlapOSSecurity</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 34, 32: Redefining built-in \'object\' (redefined-builtin)</string>
<string>W: 54, 4: Use raise ErrorClass(args) instead of raise ErrorClass, args. (old-raise-syntax)</string>
<string>W: 60, 32: Redefining built-in \'object\' (redefined-builtin)</string>
<string>W: 86, 4: Use raise ErrorClass(args) instead of raise ErrorClass, args. (old-raise-syntax)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -1686,17 +1686,6 @@ class TestSlapOSGarbageCollectStoppedRootTreeAlarm(testSlapOSMixin): ...@@ -1686,17 +1686,6 @@ class TestSlapOSGarbageCollectStoppedRootTreeAlarm(testSlapOSMixin):
instance.Instance_tryToStopCollect() instance.Instance_tryToStopCollect()
self.assertEqual('stop_requested', instance.getSlapState()) self.assertEqual('stop_requested', instance.getSlapState())
def test_Instance_tryToStopCollect_started_instance(self):
instance = self.createInstance()
hosting_subscription = instance.getSpecialiseValue()
self.portal.portal_workflow._jumpToStateFor(hosting_subscription,
'stop_requested')
self.assertEqual('start_requested', instance.getSlapState())
instance.Instance_tryToStopCollect()
self.assertEqual('stop_requested', instance.getSlapState())
def test_Instance_tryToStopCollect_destroyed_instance(self): def test_Instance_tryToStopCollect_destroyed_instance(self):
instance = self.createInstance() instance = self.createInstance()
hosting_subscription = instance.getSpecialiseValue() hosting_subscription = instance.getSpecialiseValue()
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudAlarm</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>E:1689, 2: method already defined line 1678 (function-redefined)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:706, 15: Unused variable \'partition1\' (unused-variable)</string>
<string>W:707, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:770, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:908, 15: Unused variable \'partition1\' (unused-variable)</string>
<string>W:909, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:2079, 4: Unused variable \'partition\' (unused-variable)</string>
<string>W:2097, 4: Unused variable \'partition\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -58,8 +58,8 @@ class TestSlapOSComputerPartitionConstraint(TestSlapOSConstraintMixin): ...@@ -58,8 +58,8 @@ class TestSlapOSComputerPartitionConstraint(TestSlapOSConstraintMixin):
software_instance.immediateReindexObject() software_instance.immediateReindexObject()
slave_instance.immediateReindexObject() slave_instance.immediateReindexObject()
consistency_message = "Arity Error for Relation ['default_aggregate'], " \ consistency_message = "Arity Error for Relation ['default_aggregate'] and " \
"arity is equal to 1 but should be between 0 and 0" "Type ('Software Instance', 'Slave Instance'), arity is equal to 1 but should be between 0 and 0"
# test the test: no expected message found # test the test: no expected message found
current_message_list = self.getMessageList(partition) current_message_list = self.getMessageList(partition)
...@@ -104,8 +104,9 @@ class TestSlapOSComputerPartitionConstraint(TestSlapOSConstraintMixin): ...@@ -104,8 +104,9 @@ class TestSlapOSComputerPartitionConstraint(TestSlapOSConstraintMixin):
slave_instance.immediateReindexObject() slave_instance.immediateReindexObject()
slave_instance_2.immediateReindexObject() slave_instance_2.immediateReindexObject()
consistency_message = "Arity Error for Relation ['default_aggregate'], " \ consistency_message = "Arity Error for Relation ['default_aggregate'] and "\
"arity is equal to 0 but should be between 1 and 1" "Type ('Software Instance',), arity is equal to 0 but should "\
"be between 1 and 1"
# test the test: no expected message found # test the test: no expected message found
current_message_list = self.getMessageList(partition) current_message_list = self.getMessageList(partition)
...@@ -121,8 +122,9 @@ class TestSlapOSComputerPartitionConstraint(TestSlapOSConstraintMixin): ...@@ -121,8 +122,9 @@ class TestSlapOSComputerPartitionConstraint(TestSlapOSConstraintMixin):
software_instance_2.edit(aggregate=partition.getRelativeUrl()) software_instance_2.edit(aggregate=partition.getRelativeUrl())
software_instance.immediateReindexObject() software_instance.immediateReindexObject()
software_instance_2.immediateReindexObject() software_instance_2.immediateReindexObject()
consistency_message_2 = "Arity Error for Relation ['default_aggregate'], " \ consistency_message_2 = "Arity Error for Relation ['default_aggregate'] and" \
"arity is equal to 2 but should be between 1 and 1" " Type ('Software Instance',), arity is equal to 2 but should be " \
"between 1 and 1"
self.assertTrue(consistency_message_2 in self.getMessageList(partition)) self.assertTrue(consistency_message_2 in self.getMessageList(partition))
# check case for many Slave Instane # check case for many Slave Instane
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudConstraint</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudDocument</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudDocument</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudSecurityGroup</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudSecurityGroup</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 56, 8: Unused variable \'plugin_name\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -30,7 +30,7 @@ import unittest ...@@ -30,7 +30,7 @@ import unittest
import random import random
import transaction import transaction
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
from testSlapOSCloudSecurityGroup import TestSlapOSSecurityMixin from erp5.component.test.testSlapOSCloudSecurityGroup import TestSlapOSSecurityMixin
class TestSlapOSShadowPerson(TestSlapOSSecurityMixin): class TestSlapOSShadowPerson(TestSlapOSSecurityMixin):
def test_active(self): def test_active(self):
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudShadow</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudShadow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>F: 33, 0: Unable to import \'testSlapOSCloudSecurityGroup\' (import-error)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudWorkflow</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudWorkflow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>F:2762, 4: Unable to import \'Products.ERP5Type.Document.Alarm\' (import-error)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
325
\ No newline at end of file
SoftwareInstance document.erp5.Person
Person document.erp5.SoftwareInstance
\ No newline at end of file \ No newline at end of file
SlapOSSecurity extension.erp5.SlapOSCloud
SlapOSCloud extension.erp5.SlapOSSecurity
\ No newline at end of file \ No newline at end of file
testSlapOSCloudAlarm test.erp5.testSlapOSCloudAlarm
testSlapOSCloudConstraint test.erp5.testSlapOSCloudWorkflow
testSlapOSCloudSecurityGroup test.erp5.testSlapOSCloudSecurityGroup
testSlapOSCloudShadow test.erp5.testSlapOSCloudConstraint
testSlapOSCloudWorkflow test.erp5.testSlapOSCloudDocument
testSlapOSCloudDocument test.erp5.testSlapOSCloudShadow
\ No newline at end of file \ No newline at end of file
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n \n
bt5_update_catalog_list = (\'erp5_ingestion_mysql_innodb_catalog\',\n bt5_update_catalog_list = (\'erp5_ingestion_mysql_innodb_catalog\',\n
\'slapos_cloud\')\n \'slapos_cloud\', \'erp5_accounting\',\n
\'erp5_movement_table_catalog\')\n
\n \n
bt5_installation_list = bt5_update_catalog_list + (\'slapos_erp5\',)\n bt5_installation_list = bt5_update_catalog_list + (\'slapos_erp5\',)\n
\n \n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSConfigurator</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSConfigurator</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 10, 0: Unused import Unauthorized (unused-import)</string>
<string>W: 8, 0: Unused import withAbort (unused-import)</string>
<string>W: 13, 0: Unused import time (unused-import)</string>
<string>W: 11, 0: Unused import DateTime (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
testSlapOSConfigurator test.erp5.testSlapOSConfigurator
\ No newline at end of file \ No newline at end of file
...@@ -76,6 +76,10 @@ ...@@ -76,6 +76,10 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>Web-TEMPLATE</string> </value> <value> <string>Web-TEMPLATE</string> </value>
...@@ -112,8 +116,8 @@ ...@@ -112,8 +116,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1359032820.0</float> <float>1359036420.0</float>
<string>GMT+1</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
...@@ -573,6 +577,51 @@ ...@@ -573,6 +577,51 @@
</value> </value>
</item> </item>
</dictionary> </dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>937.58325.30915.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="3.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1411993815.1</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list> </list>
</tuple> </tuple>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCRMAlarm</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCRMAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -39,6 +39,7 @@ class TestSlapOSPerson_checkToCreateRegularisationRequest(testSlapOSMixin): ...@@ -39,6 +39,7 @@ class TestSlapOSPerson_checkToCreateRegularisationRequest(testSlapOSMixin):
portal_type='Person', portal_type='Person',
title="Person %s" % new_id, title="Person %s" % new_id,
reference="TESTPERS-%s" % new_id, reference="TESTPERS-%s" % new_id,
default_email_text="live_test_%s@example.org" % new_id,
) )
@simulate('Entity_statBalance', '*args, **kwargs', 'return "1"') @simulate('Entity_statBalance', '*args, **kwargs', 'return "1"')
...@@ -297,6 +298,7 @@ class TestSlapOSRegularisationRequest_checkToSendUniqEvent(testSlapOSMixin): ...@@ -297,6 +298,7 @@ class TestSlapOSRegularisationRequest_checkToSendUniqEvent(testSlapOSMixin):
portal_type='Person', portal_type='Person',
title="Person %s" % new_id, title="Person %s" % new_id,
reference="TESTPERS-%s" % new_id, reference="TESTPERS-%s" % new_id,
default_email_text="live_test_%s@example.org" % new_id,
) )
def createRegularisationRequest(self): def createRegularisationRequest(self):
...@@ -438,6 +440,7 @@ class TestSlapOSRegularisationRequest_cancelInvoiceIfPersonOpenOrderIsEmpty( ...@@ -438,6 +440,7 @@ class TestSlapOSRegularisationRequest_cancelInvoiceIfPersonOpenOrderIsEmpty(
portal_type='Person', portal_type='Person',
title="Person %s" % new_id, title="Person %s" % new_id,
reference="TESTPERS-%s" % new_id, reference="TESTPERS-%s" % new_id,
default_email_text="live_test_%s@example.org" % new_id,
) )
def createRegularisationRequest(self): def createRegularisationRequest(self):
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCRMSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCRMSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:206, 12: Unused variable \'event\' (unused-variable)</string>
<string>W:215, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:1328, 4: Unused variable \'hosting_subscription\' (unused-variable)</string>
<string>W:1349, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1372, 4: Unused variable \'hosting_subscription\' (unused-variable)</string>
<string>W:1394, 4: Unused variable \'hosting_subscription\' (unused-variable)</string>
<string>W:1704, 4: Unused variable \'hosting_subscription\' (unused-variable)</string>
<string>W:1725, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1748, 4: Unused variable \'hosting_subscription\' (unused-variable)</string>
<string>W:1770, 4: Unused variable \'hosting_subscription\' (unused-variable)</string>
<string>W:1807, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:2033, 2: Arguments number differs from overridden method (arguments-differ)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCRMSupportRequestGeneration</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCRMSupportRequestGeneration</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:108, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:111, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:117, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:118, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:120, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W: 68, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W: 95, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:895, 4: Unused variable \'software_installation\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
51
\ No newline at end of file
testSlapOSCRMSkins test.erp5.testSlapOSCRMSkins
testSlapOSCRMAlarm test.erp5.testSlapOSCRMAlarm
testSlapOSCRMSupportRequestGeneration test.erp5.testSlapOSCRMSupportRequestGeneration
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple>
<string>subordination</string>
<string>parent</string>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: [\'Career\', \'Organisation\', \'Person\', \'Computer\']</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple>
<string>assignment</string>
</tuple>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Group define the corporate group and the business unit structure. Group is acquired through careers and subordination.</string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>group</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Group</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple>
<string>subordination</string>
<string>parent</string>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple>
<string>default_address</string>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: [\'Address\', \'Organisation\', \'Person\', \'Computer\']</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>region</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Region</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple>
<string>parent</string>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple>
<string>default_career</string>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: [\'Career\', \'Computer\']</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>subordination</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Subordination</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5Alarm</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5Alarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:103, 4: Redefining built-in \'id\' (redefined-builtin)</string>
<string>W: 6, 0: Unused import skip (unused-import)</string>
<string>W: 7, 0: Unused import json (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# #
############################################################################## ##############################################################################
from testSlapOSCloudSecurityGroup import TestSlapOSSecurityMixin from erp5.component.test.testSlapOSCloudSecurityGroup import TestSlapOSSecurityMixin
import re import re
import xml_marshaller import xml_marshaller
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5DefaultScenario</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5DefaultScenario</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>F: 8, 0: Unable to import \'testSlapOSCloudSecurityGroup\' (import-error)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 15, 0: Reimport \'re\' (imported line 9) (reimported)</string>
<string>W:529, 4: Unused variable \'click_result\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5GroupRoleSecurity</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5GroupRoleSecurity</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
from testSlapOSERP5GroupRoleSecurity import TestSlapOSGroupRoleSecurityMixin from erp5.component.test.testSlapOSERP5GroupRoleSecurity import TestSlapOSGroupRoleSecurityMixin
import transaction import transaction
class TestSlapOSLocalPermissionSlapOSInteractionWorkflow( class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>F: 2, 0: Unable to import \'testSlapOSERP5GroupRoleSecurity\' (import-error)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5SiteDump</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5SiteDump</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -147,7 +147,6 @@ erp5_upgrader ...@@ -147,7 +147,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -190,6 +189,7 @@ erp5_rss_core ...@@ -190,6 +189,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -197,9 +197,9 @@ erp5_vcs ...@@ -197,9 +197,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
erp5_xhtml_style erp5_xhtml_style
external_method external_method
Images Images
...@@ -249,7 +249,6 @@ erp5_upgrader ...@@ -249,7 +249,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -293,6 +292,7 @@ erp5_rss_core ...@@ -293,6 +292,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -300,9 +300,9 @@ erp5_vcs ...@@ -300,9 +300,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
erp5_xhtml_style erp5_xhtml_style
external_method external_method
Images Images
...@@ -353,7 +353,6 @@ erp5_upgrader ...@@ -353,7 +353,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -397,6 +396,7 @@ erp5_rss_core ...@@ -397,6 +396,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -404,9 +404,9 @@ erp5_vcs ...@@ -404,9 +404,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
erp5_xhtml_style erp5_xhtml_style
external_method external_method
Images Images
...@@ -457,7 +457,6 @@ erp5_upgrader ...@@ -457,7 +457,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -499,6 +498,7 @@ erp5_rss_core ...@@ -499,6 +498,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -506,9 +506,9 @@ erp5_vcs ...@@ -506,9 +506,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
external_method external_method
Images Images
activity activity
...@@ -558,7 +558,6 @@ erp5_upgrader ...@@ -558,7 +558,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -600,6 +599,7 @@ erp5_rss_core ...@@ -600,6 +599,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -607,9 +607,9 @@ erp5_vcs ...@@ -607,9 +607,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
erp5_xhtml_style erp5_xhtml_style
external_method external_method
Images Images
...@@ -660,7 +660,6 @@ erp5_upgrader ...@@ -660,7 +660,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -702,6 +701,7 @@ erp5_rss_core ...@@ -702,6 +701,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -709,9 +709,9 @@ erp5_vcs ...@@ -709,9 +709,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
external_method external_method
Images Images
activity activity
...@@ -761,7 +761,6 @@ erp5_upgrader ...@@ -761,7 +761,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -803,6 +802,7 @@ erp5_rss_core ...@@ -803,6 +802,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -810,9 +810,9 @@ erp5_vcs ...@@ -810,9 +810,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
external_method external_method
Images Images
activity activity
...@@ -863,7 +863,6 @@ erp5_upgrader ...@@ -863,7 +863,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -905,6 +904,7 @@ erp5_rss_core ...@@ -905,6 +904,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -912,9 +912,9 @@ erp5_vcs ...@@ -912,9 +912,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
external_method external_method
Images Images
activity activity
...@@ -965,7 +965,6 @@ erp5_upgrader ...@@ -965,7 +965,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -1007,6 +1006,7 @@ erp5_rss_core ...@@ -1007,6 +1006,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -1014,9 +1014,9 @@ erp5_vcs ...@@ -1014,9 +1014,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
erp5_xhtml_style erp5_xhtml_style
external_method external_method
Images Images
...@@ -1068,7 +1068,6 @@ erp5_upgrader ...@@ -1068,7 +1068,6 @@ erp5_upgrader
erp5_access_tab erp5_access_tab
erp5_access_token erp5_access_token
erp5_accounting erp5_accounting
erp5_accounting_bbb
erp5_administration erp5_administration
erp5_base erp5_base
erp5_bearer_token erp5_bearer_token
...@@ -1110,6 +1109,7 @@ erp5_rss_core ...@@ -1110,6 +1109,7 @@ erp5_rss_core
erp5_secure_payment erp5_secure_payment
erp5_simplified_invoicing erp5_simplified_invoicing
erp5_software_pdm erp5_software_pdm
erp5_stock_cache
erp5_system_event erp5_system_event
erp5_toolbox erp5_toolbox
erp5_trade erp5_trade
...@@ -1117,9 +1117,9 @@ erp5_vcs ...@@ -1117,9 +1117,9 @@ erp5_vcs
erp5_web erp5_web
erp5_web_crm erp5_web_crm
erp5_web_minimal_theme erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library erp5_web_widget_library
erp5_workflow erp5_workflow
erp5_xhtml_jquery_style
erp5_xhtml_style erp5_xhtml_style
external_method external_method
Images Images
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSERP5SkinSelection</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSERP5SkinSelection</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
182
\ No newline at end of file
testSlapOSERP5Alarm test.erp5.testSlapOSERP5Alarm
testSlapOSERP5DefaultScenario test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow
testSlapOSERP5GroupRoleSecurity test.erp5.testSlapOSERP5SiteDump
testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow test.erp5.testSlapOSERP5GroupRoleSecurity
testSlapOSERP5SiteDump test.erp5.testSlapOSERP5SkinSelection
testSlapOSERP5SkinSelection test.erp5.testSlapOSERP5DefaultScenario
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSHypermediaScenario</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSHypermediaScenario</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 36, 28: Unused variable \'api_path\' (unused-variable)</string>
<string>W: 36, 38: Unused variable \'api_query\' (unused-variable)</string>
<string>W: 36, 4: Unused variable \'api_scheme\' (unused-variable)</string>
<string>W:232, 4: Unused variable \'news_hal\' (unused-variable)</string>
<string>W:341, 4: Unused variable \'software_hal\' (unused-variable)</string>
<string>W: 37, 8: Unused variable \'api_fragment\' (unused-variable)</string>
<string>W: 3, 0: Unused import transaction (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -40,6 +40,7 @@ def simulate(script_id, params_string, code_string): ...@@ -40,6 +40,7 @@ def simulate(script_id, params_string, code_string):
raise ValueError('Precondition failed: %s exists in custom' % script_id) raise ValueError('Precondition failed: %s exists in custom' % script_id)
createZODBPythonScript(self.portal.portal_skins.custom, createZODBPythonScript(self.portal.portal_skins.custom,
script_id, params_string, code_string) script_id, params_string, code_string)
transaction.commit()
try: try:
result = f(self, *args, **kw) result = f(self, *args, **kw)
finally: finally:
...@@ -78,7 +79,6 @@ class ERP5HALJSONStyleSkinsMixin(ERP5TypeTestCase): ...@@ -78,7 +79,6 @@ class ERP5HALJSONStyleSkinsMixin(ERP5TypeTestCase):
def beforeTearDown(self): def beforeTearDown(self):
transaction.abort() transaction.abort()
class TestBase_getRequestHeader(ERP5HALJSONStyleSkinsMixin):
def test_getRequestHeader_REQUEST_disallowed(self): def test_getRequestHeader_REQUEST_disallowed(self):
self.changeSkin('Hal') self.changeSkin('Hal')
self.assertRaises( self.assertRaises(
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSHypermediaSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSHypermediaSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 39, 0: Dangerous default value {} as argument (dangerous-default-value)</string>
<string>W: 15, 0: Unused import sys (unused-import)</string>
<string>W: 14, 0: Unused import os (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
testSlapOSHypermediaScenario test.erp5.testSlapOSHypermediaScenario
testSlapOSHypermediaSkins test.erp5.testSlapOSHypermediaSkins
\ No newline at end of file \ No newline at end of file
...@@ -330,7 +330,7 @@ return Foo() ...@@ -330,7 +330,7 @@ return Foo()
'Visited by PaymentTransaction_createPayzenEvent', 'Visited by PaymentTransaction_createPayzenEvent',
transaction.workflow_history['edit_workflow'][-1]['comment']) transaction.workflow_history['edit_workflow'][-1]['comment'])
self.assertEqual( self.assertEqual(
None, "",
transaction.workflow_history['edit_workflow'][-2]['comment']) transaction.workflow_history['edit_workflow'][-2]['comment'])
self.assertEquals(transaction.getSimulationState(), 'stopped') self.assertEquals(transaction.getSimulationState(), 'stopped')
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPayzenAlarm</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPayzenAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 35, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 57, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 78, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:101, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:150, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:168, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:186, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:206, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:229, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:243, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:257, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:312, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:339, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:381, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:403, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:424, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:447, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 6, 0: Unused import skip (unused-import)</string>
<string>W: 7, 0: Unused import json (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPayzenBuilder</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPayzenBuilder</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 13, 26: Redefining name \'transaction\' from outer scope (line 10) (redefined-outer-name)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPayzenSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPayzenSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 45, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 51, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 72, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 76, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 83, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W: 88, 6: Unused variable \'mapping\' (unused-variable)</string>
<string>W:103, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:102, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:124, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:158, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:164, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:175, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:174, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:197, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:196, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:205, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:204, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:214, 4: Redefining name \'transaction\' from outer scope (line 2) (redefined-outer-name)</string>
<string>W:213, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:243, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:252, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:260, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:270, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:282, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:292, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:308, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:325, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:343, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:371, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:385, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:402, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:420, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:442, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:466, 4: Unused variable \'date\' (unused-variable)</string>
<string>W:491, 4: Unused variable \'date\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPayzenWorkflow</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPayzenWorkflow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:121, 4: Unused variable \'transaction_date\' (unused-variable)</string>
<string>W:121, 22: Unused variable \'payzen_id\' (unused-variable)</string>
<string>W:278, 4: Unused variable \'transaction_date\' (unused-variable)</string>
<string>W:278, 22: Unused variable \'payzen_id\' (unused-variable)</string>
<string>W: 5, 0: Unused import expectedFailure (unused-import)</string>
<string>W: 7, 0: Unused import setSecurityManager (unused-import)</string>
<string>W: 12, 0: Unused import wraps (unused-import)</string>
<string>W: 7, 0: Unused import getSecurityManager (unused-import)</string>
<string>W: 6, 0: Unused import UnsupportedWorkflowMethod (unused-import)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
116
\ No newline at end of file
testSlapOSPayzenSkins test.erp5.testSlapOSPayzenBuilder
testSlapOSPayzenAlarm test.erp5.testSlapOSPayzenSkins
testSlapOSPayzenWorkflow test.erp5.testSlapOSPayzenAlarm
testSlapOSPayzenBuilder test.erp5.testSlapOSPayzenWorkflow
\ No newline at end of file \ No newline at end of file
# Copyright (c) 2013 Nexedi SA and Contributors. All Rights Reserved.
import transaction
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin
from Products.ERP5Type.tests.utils import createZODBPythonScript
class TestSlapOSUpgradeDecisionProcess(testSlapOSMixin):
def afterSetUp(self):
super(TestSlapOSUpgradeDecisionProcess, self).afterSetUp()
self.new_id = self.generateNewId()
def generateNewId(self):
return "%sTEST" % self.portal.portal_ids.generateNewId(
id_group=('slapos_core_test'))
def _makeUpgradeDecision(self, confirm=True):
upgrade_decision = self.portal.\
upgrade_decision_module.newContent(
portal_type="Upgrade Decision",
title="TESTUPDE-%s" % self.new_id)
if confirm:
upgrade_decision.confirm()
return upgrade_decision
def _makeComputer(self,new_id):
# Clone computer document
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
computer = self.portal.computer_module\
.template_computer.Base_createCloneDocument(batch_mode=1)
computer.edit(
title="computer ticket %s" % (new_id, ),
reference="TESTCOMPT-%s" % (new_id, ),
source_administration_value=person
)
computer.validate()
return computer
def _simulateScript(self, script_name, fake_return='True'):
if script_name in self.portal.portal_skins.custom.objectIds():
raise ValueError('Precondition failed: %s exists in custom' % script_name)
createZODBPythonScript(self.portal.portal_skins.custom,
script_name,
'*args, **kwargs',
'# Script body\n'
"""portal_workflow = context.portal_workflow
portal_workflow.doActionFor(context, action='edit_action', comment='Visited by %s')
return %s
""" % (script_name, fake_return ))
transaction.commit()
def _dropScript(self, script_name):
if script_name in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_name)
transaction.commit()
def test_alarm_upgrade_decision_process_hosting_subscription(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.start()
self.tic()
self._simulateScript('UpgradeDecision_processUpgrade', 'True')
try:
self.portal.portal_alarms.slapos_pdm_upgrade_decision_process_started.activeSense()
self.tic()
finally:
self._dropScript('UpgradeDecision_processUpgrade')
self.assertEqual(
'Visited by UpgradeDecision_processUpgrade',
upgrade_decision.workflow_history['edit_workflow'][-1]['comment'])
def test_alarm_upgrade_decision_process_planned(self):
upgrade_decision = self._makeUpgradeDecision(confirm=0)
upgrade_decision.plan()
self.tic()
self._simulateScript('UpgradeDecision_notify')
try:
self.portal.portal_alarms.slapos_pdm_upgrade_decision_process_planned.\
activeSense()
self.tic()
finally:
self._dropScript('UpgradeDecision_notify')
self.assertEqual('Visited by UpgradeDecision_notify',
upgrade_decision.workflow_history['edit_workflow'][-1]['comment'])
def test_alarm_upgrade_decision_process_stopped(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.start()
upgrade_decision.stop()
self.tic()
self._simulateScript('UpgradeDecision_notifyDelivered')
try:
self.portal.portal_alarms.slapos_pdm_upgrade_decision_process_stopped.\
activeSense()
self.tic()
finally:
self._dropScript('UpgradeDecision_notifyDelivered')
self.assertEqual('Visited by UpgradeDecision_notifyDelivered',
upgrade_decision.workflow_history['edit_workflow'][-1]['comment'])
def test_alarm_computer_create_upgrade_decision(self):
computer = self._makeComputer(self.new_id)
computer.edit(allocation_scope = 'open/public')
computer2 = self._makeComputer(self.generateNewId())
computer2.edit(allocation_scope = 'open/personal')
self._simulateScript('Computer_checkAndCreateUpgradeDecision')
try:
self.portal.portal_alarms.slapos_pdm_computer_create_upgrade_decision.\
activeSense()
self.tic()
finally:
self._dropScript('Computer_checkAndCreateUpgradeDecision')
self.assertEqual('Visited by Computer_checkAndCreateUpgradeDecision',
computer.workflow_history['edit_workflow'][-1]['comment'])
self.assertNotEqual('Visited by Computer_checkAndCreateUpgradeDecision',
computer2.workflow_history['edit_workflow'][-1]['comment'])
def test_alarm_hosting_subscription_create_upgrade_decision(self):
computer = self._makeComputer(self.new_id)
computer.edit(allocation_scope = 'open/public')
computer2 = self._makeComputer(self.generateNewId())
computer2.edit(allocation_scope = 'open/personal')
self._simulateScript('Computer_hostingSubscriptionCreateUpgradeDecision')
try:
self.portal.portal_alarms.slapos_pdm_hosting_subscription_create_upgrade_decision.\
activeSense()
self.tic()
finally:
self._dropScript('Computer_hostingSubscriptionCreateUpgradeDecision')
self.assertEqual('Visited by Computer_hostingSubscriptionCreateUpgradeDecision',
computer.workflow_history['edit_workflow'][-1]['comment'])
self.assertNotEqual('Visited by Computer_hostingSubscriptionCreateUpgradeDecision',
computer2.workflow_history['edit_workflow'][-1]['comment'])
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPDMAlarm</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPDMAlarm</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 13, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W: 25, 2: Arguments number differs from overridden method (arguments-differ)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
# -*- coding:utf-8 -*-
##############################################################################
#
# Copyright (c) 2002-2013 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility 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
# guarantees 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
##############################################################################
import transaction
from functools import wraps
from Products.SlapOS.tests.testSlapOSMixin import testSlapOSMixin
from Products.ERP5Type.tests.utils import createZODBPythonScript
from DateTime import DateTime
def simulate(script_id, params_string, code_string):
def upperWrap(f):
@wraps(f)
def decorated(self, *args, **kw):
if script_id in self.portal.portal_skins.custom.objectIds():
raise ValueError('Precondition failed: %s exists in custom' % script_id)
createZODBPythonScript(self.portal.portal_skins.custom,
script_id, params_string, code_string)
try:
result = f(self, *args, **kw)
finally:
if script_id in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_id)
transaction.commit()
return result
return decorated
return upperWrap
class TestSlapOSPDMSkins(testSlapOSMixin):
def afterSetUp(self):
super(TestSlapOSPDMSkins, self).afterSetUp()
self.new_id = self.generateNewId()
self.request_kw = dict(
software_title=self.generateNewSoftwareTitle(),
software_type=self.generateNewSoftwareType(),
instance_xml=self.generateSafeXml(),
sla_xml=self.generateEmptyXml(),
shared=False,
state="started"
)
def beforeTearDown(self):
id_list = []
for upgrade_decision in self.portal.portal_catalog(
portal_type="Upgrade Decision", reference="UD-TEST%"):
id_list.append(upgrade_decision.getId())
self.portal.upgrade_decision_module.manage_delObjects(id_list)
self.tic()
def generateNewId(self):
return "%sTEST" % self.portal.portal_ids.generateNewId(
id_group=('slapos_core_test'))
def _makePerson(self,new_id):
# Clone person document
person_user = self.portal.person_module.template_member.\
Base_createCloneDocument(batch_mode=1)
person_user.edit(
title="live_test_%s" % new_id,
reference="live_test_%s" % new_id,
default_email_text="live_test_%s@example.org" % new_id,
)
person_user.validate()
for assignment in person_user.contentValues(portal_type="Assignment"):
assignment.open()
transaction.commit()
return person_user
def _makeComputer(self,new_id):
# Clone computer document
computer = self.portal.computer_module\
.template_computer.Base_createCloneDocument(batch_mode=1)
computer.edit(
title="computer start %s" % (new_id, ),
reference="TESTCOMPS-%s" % (new_id, )
)
computer.validate()
return computer
def _makeComputerPartitions(self,computer):
for i in range(1, 5):
id_ = 'partition%s' % (i, )
p = computer.newContent(portal_type='Computer Partition',
id=id_,
title=id_,
reference=id_,
default_network_address_ip_address='ip_address_%s' % i,
default_network_address_netmask='netmask_%s' % i)
p.markFree()
p.validate()
def _markComputerPartitionBusy(self, computer, software_instance):
for partition in computer.contentValues(portal_type='Computer Partition'):
if partition.getSlapState() == 'free':
software_instance.edit(aggregate=partition.getRelativeUrl())
partition.markBusy()
break;
def _makeSoftwareProduct(self, new_id):
software_product = self.portal.software_product_module\
.template_software_product.Base_createCloneDocument(batch_mode=1)
software_product.edit(
reference='TESTSOFTPROD-%s' % new_id,
title='Test software product %s' % new_id
)
software_product.validate()
software_product.publish()
return software_product
def _makeSoftwareRelease(self, new_id):
software_release = self.portal.software_release_module\
.template_software_release.Base_createCloneDocument(batch_mode=1)
software_release.edit(
url_string=self.generateNewSoftwareReleaseUrl(),
reference='TESTSOFTRELS-%s' % new_id,
title='Start requested for %s' % new_id
)
software_release.release()
return software_release
def _requestSoftwareRelease(self, new_id, software_product_url, effective_date=None):
software_release = self._makeSoftwareRelease(new_id)
if not effective_date:
effective_date = DateTime()
software_release.edit(
aggregate_value=software_product_url,
effective_date=effective_date
)
software_release.publish()
return software_release
def _makeCustomSoftwareRelease(self, new_id, software_product_url, software_url):
software_release = self._makeSoftwareRelease(new_id)
software_release.edit(
aggregate_value=software_product_url,
url_string=software_url
)
software_release.publish()
return software_release
def _makeSoftwareInstallation(self, new_id, computer, software_release_url):
software_installation = self.portal\
.software_installation_module.template_software_installation\
.Base_createCloneDocument(batch_mode=1)
software_installation.edit(
url_string=software_release_url,
aggregate=computer.getRelativeUrl(),
reference='TESTSOFTINSTS-%s' % new_id,
title='Start requested for %s' % computer.getUid()
)
software_installation.validate()
software_installation.requestStart()
return software_installation
def _makeHostingSubscription(self, new_id):
hosting_subscription = self.portal\
.hosting_subscription_module.template_hosting_subscription\
.Base_createCloneDocument(batch_mode=1)
hosting_subscription.validate()
hosting_subscription.edit(
title= "Test hosting sub start %s" % new_id,
reference="TESTHSS-%s" % new_id,
)
return hosting_subscription
def _makeSoftwareInstance(self, hosting_subscription, software_url):
kw = dict(
software_release=software_url,
software_type=self.generateNewSoftwareType(),
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
software_title=hosting_subscription.getTitle(),
state='started'
)
hosting_subscription.requestStart(**kw)
hosting_subscription.requestInstance(**kw)
def _makeFullHostingSubscription(self, new_id, software_url="", person=None):
if not person:
person = self._makePerson(new_id)
hosting_subscription = self.portal\
.hosting_subscription_module.template_hosting_subscription\
.Base_createCloneDocument(batch_mode=1)
hosting_subscription.edit(
title=self.request_kw['software_title'],
reference="TESTHS-%s" % new_id,
url_string=software_url,
source_reference=self.request_kw['software_type'],
text_content=self.request_kw['instance_xml'],
sla_xml=self.request_kw['sla_xml'],
root_slave=self.request_kw['shared'],
destination_section=person.getRelativeUrl()
)
hosting_subscription.validate()
self.portal.portal_workflow._jumpToStateFor(hosting_subscription, 'start_requested')
return hosting_subscription
def _makeFullSoftwareInstance(self, hosting_subscription, software_url):
software_instance = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
software_instance.edit(
title=self.request_kw['software_title'],
reference="TESTSI-%s" % self.generateNewId(),
url_string=software_url,
source_reference=self.request_kw['software_type'],
text_content=self.request_kw['instance_xml'],
sla_xml=self.request_kw['sla_xml'],
specialise=hosting_subscription.getRelativeUrl()
)
hosting_subscription.edit(
predecessor=software_instance.getRelativeUrl()
)
self.portal.portal_workflow._jumpToStateFor(software_instance, 'start_requested')
software_instance.validate()
return software_instance
def _makeUpgradeDecision(self):
return self.portal.\
upgrade_decision_module.newContent(
portal_type="Upgrade Decision",
title="TESTUPDE-%s" % self.new_id)
def _makeUpgradeDecisionLine(self, upgrade_decision):
return upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
title="TESTUPDE-%s" % self.new_id)
def test_getSortedSoftwareReleaseListFromSoftwareProduct(self):
new_id = self.generateNewId()
software_product = self._makeSoftwareProduct(new_id)
release_list = software_product.SoftwareProduct_getSortedSoftwareReleaseList(
software_product.getReference())
self.assertEqual(release_list, [])
# published software release
software_release1 = self._makeSoftwareRelease(new_id)
software_release1.edit(aggregate_value=software_product.getRelativeUrl(),
url_string='http://example.org/1-%s.cfg' % new_id,
effective_date=(DateTime() + 5)
)
software_release1.publish()
software_release2 = self._makeSoftwareRelease(self.generateNewId())
software_release2.edit(aggregate_value=software_product.getRelativeUrl(),
url_string='http://example.org/2-%s.cfg' % new_id
)
software_release2.publish()
# 1 released software release, should not appear
software_release3 = self._makeSoftwareRelease(new_id)
self.assertTrue(software_release3.getValidationState() == 'released')
software_release3.edit(aggregate_value=software_product.getRelativeUrl(),
url_string='http://example.org/3-%s.cfg' % new_id
)
self.tic()
release_list = software_product.SoftwareProduct_getSortedSoftwareReleaseList(
software_product.getReference())
self.assertEquals([release.getUrlString() for release in release_list],
['http://example.org/2-%s.cfg' % new_id, 'http://example.org/1-%s.cfg' % new_id])
def test_getSortedSoftwareReleaseListFromSoftwareProduct_Changed(self):
new_id = self.generateNewId()
software_product = self._makeSoftwareProduct(new_id)
release_list = software_product.SoftwareProduct_getSortedSoftwareReleaseList(
software_product.getReference())
self.assertEqual(release_list, [])
# 2 published software releases
software_release2 = self._makeSoftwareRelease(self.generateNewId())
software_release2.publish()
software_release2.edit(aggregate_value=software_product.getRelativeUrl(),
url_string='http://example.org/2-%s.cfg' % new_id,
effective_date=(DateTime() - 2)
)
# Newest software release
software_release1 = self._makeSoftwareRelease(new_id)
software_release1.publish()
software_release1.edit(aggregate_value=software_product.getRelativeUrl(),
url_string='http://example.org/1-%s.cfg' % new_id,
effective_date=DateTime()
)
self.tic()
release_list = software_product.SoftwareProduct_getSortedSoftwareReleaseList(
software_product.getReference())
self.assertEquals([release.getUrlString() for release in release_list],
['http://example.org/1-%s.cfg' % new_id, 'http://example.org/2-%s.cfg' % new_id])
release_list = software_product.SoftwareProduct_getSortedSoftwareReleaseList(
software_release_url='http://example.org/1-%s.cfg' % new_id)
self.assertEquals([release.getUrlString() for release in release_list],
['http://example.org/1-%s.cfg' % new_id, 'http://example.org/2-%s.cfg' % new_id])
def test_HostingSubscription_getNewerSofwareRelease(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
software_product = self._makeSoftwareProduct(self.new_id)
oldest_software_url = 'http://example.org/oldest-%s.cfg' % self.new_id
newest_software_url = 'http://example.org/newest-%s.cfg' % self.new_id
self._makeCustomSoftwareRelease(self.new_id,
software_product.getRelativeUrl(),
oldest_software_url)
self._makeCustomSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl(),
newest_software_url)
self._makeSoftwareInstallation(self.new_id, computer, oldest_software_url)
hosting_subscription = self._makeFullHostingSubscription(self.new_id,
oldest_software_url, person)
self.tic()
self.assertEqual(hosting_subscription.HostingSubscription_getNewerSofwareRelease(),
None)
self._makeFullSoftwareInstance(hosting_subscription, oldest_software_url)
self.tic()
release = hosting_subscription.HostingSubscription_getNewerSofwareRelease()
self.assertEqual(release.getUrlString(), newest_software_url)
def testHostingSubscription_getUpgradableSoftwareRelease_no_installation(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
self._makeComputerPartitions(computer)
software_product = self._makeSoftwareProduct(self.new_id)
oldest_software_url = 'http://example.org/oldest-%s.cfg' % self.new_id
newest_software_url = 'http://example.org/newest-%s.cfg' % self.new_id
self._makeCustomSoftwareRelease(self.new_id,
software_product.getRelativeUrl(),
oldest_software_url)
self._makeSoftwareInstallation(self.new_id, computer, oldest_software_url)
hs = self._makeFullHostingSubscription(self.new_id,
oldest_software_url, person)
self.tic()
self.assertEqual(hs.HostingSubscription_getUpgradableSoftwareRelease(),
None)
self._makeFullSoftwareInstance(hs, oldest_software_url)
self._markComputerPartitionBusy(computer, hs.getPredecessorValue())
self._makeCustomSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl(),
newest_software_url)
self.tic()
self.assertEqual(hs.HostingSubscription_getUpgradableSoftwareRelease(),
None)
def testHostingSubscription_getUpgradableSoftwareRelease(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
self._makeComputerPartitions(computer)
software_product = self._makeSoftwareProduct(self.new_id)
oldest_software_url = 'http://example.org/oldest-%s.cfg' % self.new_id
newest_software_url = 'http://example.org/newest-%s.cfg' % self.new_id
self._makeCustomSoftwareRelease(self.new_id,
software_product.getRelativeUrl(),
oldest_software_url)
self._makeSoftwareInstallation(self.new_id, computer, oldest_software_url)
hs = self._makeFullHostingSubscription(self.new_id,
oldest_software_url, person)
self._makeFullSoftwareInstance(hs, oldest_software_url)
self._markComputerPartitionBusy(computer, hs.getPredecessorValue())
self._makeCustomSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl(),
newest_software_url)
self._makeSoftwareInstallation(self.generateNewId(), computer,
newest_software_url)
# software_release should be ignored!
software_release = self._makeSoftwareRelease(self.generateNewId())
self._makeSoftwareInstallation(self.generateNewId(),
computer, software_release.getUrlString())
self.tic()
release = hs.HostingSubscription_getUpgradableSoftwareRelease()
self.assertEqual(release.getUrlString(), newest_software_url)
self.portal.portal_workflow._jumpToStateFor(hs, 'destroy_requested')
self.tic()
self.assertEqual(hs.HostingSubscription_getUpgradableSoftwareRelease(),
None)
def testUpgradeDecision_getComputer(self):
computer = self._makeComputer(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(computer)
found_computer = upgrade_decision.UpgradeDecision_getComputer()
self.assertEquals(computer.getRelativeUrl(),
found_computer.getRelativeUrl())
def testUpgradeDecision_getComputer_2_lines(self):
computer = self._makeComputer(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(computer)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
found_computer = upgrade_decision.UpgradeDecision_getComputer()
self.assertEquals(computer.getRelativeUrl(),
found_computer.getRelativeUrl())
def testUpgradeDecision_getComputer_2_computer(self):
computer = self._makeComputer(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(computer)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(computer)
self.assertRaises(ValueError, upgrade_decision.UpgradeDecision_getComputer)
def testUpgradeDecision_getComputer_O_computer(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
found_computer = upgrade_decision.UpgradeDecision_getComputer()
self.assertEquals(None, found_computer)
def testUpgradeDecision_getHostingSubscription(self):
hosting_subscription = self._makeHostingSubscription(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(hosting_subscription)
found_hosting_subscription = upgrade_decision.UpgradeDecision_getHostingSubscription()
self.assertEquals(hosting_subscription.getRelativeUrl(),
found_hosting_subscription.getRelativeUrl())
def testUpgradeDecision_getHostingSubscription_2_lines(self):
hosting_subscription = self._makeHostingSubscription(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(hosting_subscription)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
found_hosting_subscription = upgrade_decision.UpgradeDecision_getHostingSubscription()
self.assertEquals(hosting_subscription.getRelativeUrl(),
found_hosting_subscription.getRelativeUrl())
def testUpgradeDecision_getHostingSubscription_2_hosting(self):
hosting_subscription = self._makeHostingSubscription(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(hosting_subscription)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(hosting_subscription)
self.assertRaises(ValueError, upgrade_decision.UpgradeDecision_getHostingSubscription)
def testUpgradeDecision_getHostingSubscription_O_hosting(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
found_hosting_subscription = upgrade_decision.UpgradeDecision_getHostingSubscription()
self.assertEquals(None, found_hosting_subscription)
def testUpgradeDecision_getSoftwareRelease(self):
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(software_release)
found_software_release = upgrade_decision.UpgradeDecision_getSoftwareRelease()
self.assertEquals(software_release.getRelativeUrl(),
found_software_release.getRelativeUrl())
def testUpgradeDecision_getSoftwareRelease_2_lines(self):
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(software_release)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
found_software_release = upgrade_decision.UpgradeDecision_getSoftwareRelease()
self.assertEquals(software_release.getRelativeUrl(),
found_software_release.getRelativeUrl())
def testUpgradeDecision_getSoftwareRelease_2_sr(self):
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(software_release)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValue(software_release)
self.assertRaises(ValueError, upgrade_decision.UpgradeDecision_getSoftwareRelease)
def testUpgradeDecision_getSoftwareRelease_O_sr(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
found_software_release = upgrade_decision.UpgradeDecision_getSoftwareRelease()
self.assertEquals(None, found_software_release)
def testUpgradeDecision_upgradeHostingSubscription(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
hosting_subscription.edit(
destination_section_value = person.getRelativeUrl())
self._makeSoftwareInstance(hosting_subscription,
hosting_subscription.getUrlString())
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList(
[software_release, hosting_subscription])
self.tic()
slap_state = hosting_subscription.getSlapState()
self.assertFalse(upgrade_decision.UpgradeDecision_upgradeHostingSubscription())
self.assertNotEqual(software_release.getUrlString(),
hosting_subscription.getUrlString())
upgrade_decision.confirm()
upgrade_decision.start()
# Check that url_string change, but slap state doesn't
self.assertNotEqual(software_release.getUrlString(),
hosting_subscription.getUrlString())
self.assertTrue(upgrade_decision.UpgradeDecision_upgradeHostingSubscription())
self.assertEqual(software_release.getUrlString(),
hosting_subscription.getUrlString())
self.assertEqual(slap_state, hosting_subscription.getSlapState())
self.assertEqual('stopped', upgrade_decision.getSimulationState())
def testUpgradeDecision_processUpgradeeHostingSubscription(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
hosting_subscription.edit(
destination_section_value = person.getRelativeUrl())
self._makeSoftwareInstance(hosting_subscription,
hosting_subscription.getUrlString())
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList(
[software_release, hosting_subscription])
self.tic()
slap_state = hosting_subscription.getSlapState()
self.assertFalse(upgrade_decision.UpgradeDecision_processUpgrade())
self.assertNotEqual(software_release.getUrlString(),
hosting_subscription.getUrlString())
upgrade_decision.confirm()
upgrade_decision.start()
# Check that url_string change, but slap state doesn't
self.assertNotEqual(software_release.getUrlString(),
hosting_subscription.getUrlString())
self.assertTrue(upgrade_decision.UpgradeDecision_processUpgrade())
self.assertEqual(software_release.getUrlString(),
hosting_subscription.getUrlString())
self.assertEqual(slap_state, hosting_subscription.getSlapState())
self.assertEqual('stopped', upgrade_decision.getSimulationState())
def testUpgradeDecision_upgradeHostingSubscription_no_software_release(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
hosting_subscription.edit(
destination_section_value = person.getRelativeUrl())
self._makeSoftwareInstance(hosting_subscription,
hosting_subscription.getUrlString())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([hosting_subscription])
self.tic()
upgrade_decision.confirm()
upgrade_decision.start()
self.assertFalse(upgrade_decision.UpgradeDecision_upgradeHostingSubscription())
self.assertEqual('started', upgrade_decision.getSimulationState())
def testUpgradeDecision_upgradeHostingSubscription_no_hosting_subscripion(self):
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release])
self.tic()
upgrade_decision.confirm()
upgrade_decision.start()
self.assertFalse(upgrade_decision.UpgradeDecision_upgradeHostingSubscription())
self.assertEqual('started', upgrade_decision.getSimulationState())
def testUpgradeDecision_upgradeComputer_no_software_release(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(
source_administration_value = person.getRelativeUrl())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([computer])
self.tic()
upgrade_decision.confirm()
upgrade_decision.start()
self.assertFalse(upgrade_decision.UpgradeDecision_upgradeComputer())
self.assertEqual('started', upgrade_decision.getSimulationState())
def testUpgradeDecision_upgradeComputer_no_hosting_subscripion(self):
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release])
self.tic()
upgrade_decision.confirm()
upgrade_decision.start()
self.assertFalse(upgrade_decision.UpgradeDecision_upgradeComputer())
self.assertEqual('started', upgrade_decision.getSimulationState())
def testUpgradeDecision_upgradeComputer(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
url = software_release.getUrlString()
self.tic()
self.assertFalse(upgrade_decision.UpgradeDecision_upgradeComputer())
upgrade_decision.confirm()
upgrade_decision.start()
self.assertTrue(upgrade_decision.UpgradeDecision_upgradeComputer())
self.tic()
software_installation = computer.getAggregateRelatedValue(
portal_type='Software Installation')
self.assertEqual('start_requested', software_installation.getSlapState())
self.assertEqual(url, software_installation.getUrlString())
self.assertEqual('validated', software_installation.getValidationState())
self.assertEqual('stopped', upgrade_decision.getSimulationState())
def testUpgradeDecision_processUpgradeComputer(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
url = software_release.getUrlString()
self.tic()
self.assertFalse(upgrade_decision.UpgradeDecision_processUpgrade())
upgrade_decision.confirm()
upgrade_decision.start()
self.assertTrue(upgrade_decision.UpgradeDecision_processUpgrade())
self.tic()
software_installation = computer.getAggregateRelatedValue(
portal_type='Software Installation')
self.assertEqual('start_requested', software_installation.getSlapState())
self.assertEqual(url, software_installation.getUrlString())
self.assertEqual('validated', software_installation.getValidationState())
self.assertEqual('stopped', upgrade_decision.getSimulationState())
def testSoftwareRelease_createUpgradeDecision_computer(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = software_release.SoftwareRelease_createUpgradeDecision(
source_url=computer.getRelativeUrl(),
title="TEST-SRUPDE-%s" % self.new_id)
self.tic()
self.assertEqual(upgrade_decision.getSimulationState(), 'draft')
self.assertEqual(upgrade_decision.getDestinationSection(),
person.getRelativeUrl())
decision_line = upgrade_decision.contentValues(
portal_type='Upgrade Decision Line')[0]
self.assertEqual(decision_line.getTitle(),
'Request decision upgrade for %s on Computer %s' % (
software_release.getTitle(), computer.getReference())
)
self.assertEqual(decision_line.getAggregate(portal_type='Computer'),
computer.getRelativeUrl())
self.assertEqual(decision_line.getAggregate(portal_type='Software Release'),
software_release.getRelativeUrl())
def testSoftwareRelease_createUpgradeDecision_hostingSubscription(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
hosting_subscription.edit(
destination_section_value = person.getRelativeUrl())
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = software_release.SoftwareRelease_createUpgradeDecision(
source_url=hosting_subscription.getRelativeUrl(),
title="TEST-SRUPDE-%s" % self.new_id)
self.tic()
self.assertEqual(upgrade_decision.getSimulationState(), 'draft')
self.assertEqual(upgrade_decision.getDestinationSection(),
person.getRelativeUrl())
decision_line = upgrade_decision.contentValues(
portal_type='Upgrade Decision Line')[0]
self.assertEqual(decision_line.getAggregate(portal_type='Hosting Subscription'),
hosting_subscription.getRelativeUrl())
self.assertEqual(decision_line.getAggregate(portal_type='Software Release'),
software_release.getRelativeUrl())
def testSoftwareRelease_getUpgradeDecisionInProgress(self):
computer = self._makeComputer(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
software_release2 = self._makeSoftwareRelease(self.generateNewId())
upgrade_decision.confirm()
reference = upgrade_decision.getReference()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress.getReference(), reference)
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
software_release.getUid())
self.assertEqual(in_progress.getReference(), reference)
in_progress = software_release2.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress, None)
def testSoftwareRelease_getUpgradeDecisionInProgress_cancelled(self):
computer = self._makeComputer(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
upgrade_decision.confirm()
upgrade_decision.cancel()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress, None)
upgrade_decision2 = self._makeUpgradeDecision()
upgrade_decision_line2 = self._makeUpgradeDecisionLine(upgrade_decision2)
upgrade_decision_line2.setAggregateValueList([software_release, computer])
upgrade_decision2.confirm()
upgrade_decision2.start()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress.getReference(), upgrade_decision2.getReference())
def testSoftwareRelease_getUpgradeDecisionInProgress_hosting_subs(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
hosting_subscription.edit(
destination_section_value = person.getRelativeUrl())
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release,
hosting_subscription])
upgrade_decision.confirm()
reference = upgrade_decision.getReference()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
hosting_subscription.getUid())
self.assertEqual(in_progress.getReference(), reference)
upgrade_decision.cancel()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
hosting_subscription.getUid())
self.assertEqual(in_progress, None)
def testSoftwareRelease_getUpgradeDecisionInProgress_software_product(self):
computer = self._makeComputer(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
software_release2 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
software_release3 = self._makeSoftwareRelease(self.generateNewId())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
upgrade_decision.confirm()
reference = upgrade_decision.getReference()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress.getReference(), reference)
in_progress = software_release2.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress.getReference(), reference)
in_progress = software_release3.SoftwareRelease_getUpgradeDecisionInProgress(
computer.getUid())
self.assertEqual(in_progress, None)
def testSoftwareRelease_getUpgradeDecisionInProgress_software_product_hs(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
hosting_subscription.edit(
destination_section_value = person.getRelativeUrl())
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
software_release2 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
software_release3 = self._makeSoftwareRelease(self.generateNewId())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release,
hosting_subscription])
upgrade_decision.confirm()
reference = upgrade_decision.getReference()
reference = upgrade_decision.getReference()
self.tic()
in_progress = software_release.SoftwareRelease_getUpgradeDecisionInProgress(
hosting_subscription.getUid())
self.assertEqual(in_progress.getReference(), reference)
in_progress = software_release2.SoftwareRelease_getUpgradeDecisionInProgress(
hosting_subscription.getUid())
self.assertEqual(in_progress.getReference(), reference)
in_progress = software_release3.SoftwareRelease_getUpgradeDecisionInProgress(
hosting_subscription.getUid())
self.assertEqual(in_progress, None)
def testUpgradeDecision_tryToCancel(self):
computer = self._makeComputer(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
software_release2 = self._makeSoftwareRelease(self.generateNewId())
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
upgrade_decision.confirm()
upgrade_decision2 = self._makeUpgradeDecision()
upgrade_decision_line2 = self._makeUpgradeDecisionLine(upgrade_decision2)
upgrade_decision_line2.setAggregateValueList([software_release, computer])
upgrade_decision2.confirm()
upgrade_decision2.start()
url = software_release.getUrlString()
url2 = software_release2.getUrlString()
# Cancel is not possible with the same url_string
self.assertEqual(upgrade_decision.UpgradeDecision_tryToCancel(url), False)
self.assertEqual(upgrade_decision.UpgradeDecision_tryToCancel(url2), True)
self.assertEqual(upgrade_decision.getSimulationState(), 'cancelled')
# Cancel is no longer possible
self.assertEqual(upgrade_decision2.UpgradeDecision_tryToCancel(url), False)
self.assertEqual(upgrade_decision2.UpgradeDecision_tryToCancel(url2), False)
self.assertEqual(upgrade_decision2.getSimulationState(), 'started')
def testComputer_checkAndCreateUpgradeDecision(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person,
allocation_scope="open/public")
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
self._makeSoftwareInstallation(self.new_id,
computer, software_release.getUrlString())
self.tic()
upgrade_decision = computer.Computer_checkAndCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision), 0)
software_release2 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
# Should be ignored, Publication Date is for tomorrow
self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl(),
(DateTime() + 1))
self.tic()
upgrade_decision = computer.Computer_checkAndCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision), 1)
self.assertEqual(upgrade_decision[0].getSimulationState(), 'started')
computer_aggregate = upgrade_decision[0].UpgradeDecision_getComputer()
self.assertEqual(computer_aggregate.getReference(),
computer.getReference())
release = upgrade_decision[0].UpgradeDecision_getSoftwareRelease()
self.assertEqual(release.getUrlString(),
software_release2.getUrlString())
self.tic()
upgrade_decision2 = computer.Computer_checkAndCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision2), 0)
def testComputer_checkAndCreateUpgradeDecision_personal_with_exist(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person,
allocation_scope="open/personal")
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
self._makeSoftwareInstallation(self.new_id,
computer, software_release.getUrlString())
self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self.tic()
upgrade_decision = computer.Computer_checkAndCreateUpgradeDecision()[0]
self.assertEqual(upgrade_decision.getSimulationState(), 'planned')
software_release3 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self.tic()
upgrade_decision2 = computer.Computer_checkAndCreateUpgradeDecision()[0]
self.assertEqual(upgrade_decision.getSimulationState(), 'cancelled')
self.assertEqual(upgrade_decision2.getSimulationState(), 'planned')
release = upgrade_decision2.UpgradeDecision_getSoftwareRelease()
self.assertEqual(release.getUrlString(),
software_release3.getUrlString())
def testComputer_checkAndCreateUpgradeDecision_public_with_exist(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person,
allocation_scope="open/public")
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
self._makeSoftwareInstallation(self.new_id,
computer, software_release.getUrlString())
self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self.tic()
upgrade_decision = computer.Computer_checkAndCreateUpgradeDecision()[0]
self.assertEqual(upgrade_decision.getSimulationState(), 'started')
self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self.tic()
upgrade_decision2 = computer.Computer_checkAndCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision2), 0)
self.assertEqual(upgrade_decision.getSimulationState(), 'started')
def testComputer_hostingSubscriptionCreateUpgradeDecision_no_newer(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
self._makeComputerPartitions(computer)
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
url_string = software_release.getUrlString()
self._makeSoftwareInstallation(self.new_id, computer, url_string)
self.tic()
upgrade_decision = computer.Computer_hostingSubscriptionCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision), 0)
# Create Hosting Subscription
hosting_subscription = self._makeFullHostingSubscription(self.new_id,
url_string, person)
self.tic()
upgrade_decision = computer.Computer_hostingSubscriptionCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision), 0)
self._makeFullSoftwareInstance(hosting_subscription, url_string)
self._markComputerPartitionBusy(computer,
hosting_subscription.getPredecessorValue())
self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self.tic()
upgrade_decision = computer.Computer_hostingSubscriptionCreateUpgradeDecision()
self.assertEqual(len(upgrade_decision), 0)
def testComputer_hostingSubscriptionCreateUpgradeDecision(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
self._makeComputerPartitions(computer)
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
url_string = software_release.getUrlString()
self._makeSoftwareInstallation(self.new_id, computer, url_string)
# Create Hosting Subscription and Software Instance
hosting_subscription = self._makeFullHostingSubscription(self.new_id,
url_string, person)
self._makeFullSoftwareInstance(hosting_subscription, url_string)
self._markComputerPartitionBusy(computer,
hosting_subscription.getPredecessorValue())
# Install the Newest software release
software_release2 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self._makeSoftwareInstallation(self.generateNewId(), computer,
software_release2.getUrlString())
self.tic()
up_decision = computer.Computer_hostingSubscriptionCreateUpgradeDecision()[0]
self.assertEqual(up_decision.getSimulationState(), 'planned')
self.assertEqual(up_decision.UpgradeDecision_getHostingSubscription().\
getReference(), hosting_subscription.getReference())
self.assertEqual(up_decision.UpgradeDecision_getSoftwareRelease().\
getUrlString(), software_release2.getUrlString())
self.tic()
up_decision2 = computer.Computer_hostingSubscriptionCreateUpgradeDecision()
self.assertEqual(len(up_decision2), 0)
def testComputer_hostingSubscriptionCreateUpgradeDecision_with_exist(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
computer.edit(source_administration_value=person)
self._makeComputerPartitions(computer)
software_product = self._makeSoftwareProduct(self.new_id)
software_release = self._requestSoftwareRelease(self.new_id,
software_product.getRelativeUrl())
url_string = software_release.getUrlString()
self._makeSoftwareInstallation(self.new_id, computer, url_string)
# Create Hosting Subscription and Software Instance
hosting_subscription = self._makeFullHostingSubscription(self.new_id,
url_string, person)
self._makeFullSoftwareInstance(hosting_subscription, url_string)
self._markComputerPartitionBusy(computer,
hosting_subscription.getPredecessorValue())
# Install the Newest software release
software_release2 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self._makeSoftwareInstallation(self.generateNewId(), computer,
software_release2.getUrlString())
self.tic()
up_decision = computer.Computer_hostingSubscriptionCreateUpgradeDecision()[0]
self.assertEqual(up_decision.getSimulationState(), 'planned')
# Install the another software release
software_release3 = self._requestSoftwareRelease(self.generateNewId(),
software_product.getRelativeUrl())
self._makeSoftwareInstallation(self.generateNewId(), computer,
software_release3.getUrlString())
self.tic()
up_decision2 = computer.Computer_hostingSubscriptionCreateUpgradeDecision()[0]
self.assertEqual(up_decision2.getSimulationState(), 'planned')
self.assertEqual(up_decision.getSimulationState(), 'cancelled')
release = up_decision2.UpgradeDecision_getSoftwareRelease()
self.assertEqual(release.getUrlString(),
software_release3.getUrlString())
def testBase_acceptUpgradeDecision_no_reference(self):
upgrade_decision = self._makeUpgradeDecision()
self.assertRaises(ValueError, self.portal.Base_acceptUpgradeDecision, None)
def testBase_acceptUpgradeDecision_duplicated_reference(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTBADREFERENCE")
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTBADREFERENCE")
self.tic()
self.assertRaises(ValueError, self.portal.Base_acceptUpgradeDecision, None)
def testBase_acceptUpgradeDecision_no_upgrade_decision(self):
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-UNEXISTING')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Unable%20to%20find%20the%20Upgrade%20Decision."),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_draft_upgrade_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTDRAFT")
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTDRAFT')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20the%20upgrade%20is%20not%20possible%20yet%21"),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_planned_upgrade_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTPLANNED")
upgrade_decision.plan()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTPLANNED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20the%20upgrade%20is%20not%20possible%20yet%21"),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_confirmed_upgrade_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTCONFIRMED")
upgrade_decision.confirm()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTCONFIRMED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=This%20Upgrade%20Decision%20has%20been%20"\
"requested%2C%20it%20will%20be%20processed%20in%20few%20minutes."),
"%s contains the wrong message" % redirect_url)
self.assertEquals(upgrade_decision.getSimulationState(), 'started')
def testBase_acceptUpgradeDecision_started_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTSTARTED")
upgrade_decision.start()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTSTARTED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=This%20Upgrade%20Decision%20is%20already%20Started."),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_stop_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTSTOP")
upgrade_decision.start()
upgrade_decision.stop()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTSTOP')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=This%20Upgrade%20Decision%20has%20been%20already%20processed."),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_delivered_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTDELIVERED")
upgrade_decision.start()
upgrade_decision.stop()
upgrade_decision.deliver()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTDELIVERED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=This%20Upgrade%20Decision%20has%20been%20already%20processed."),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_cancelled_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTCANCELLED")
upgrade_decision.cancel()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTCANCELLED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20the%20upgrade%20is%20not%20possble%2C%20Upgrade%20Decision%20was%20Canceled%20or%20Rejected%21"),
"%s contains the wrong message" % redirect_url)
def testBase_acceptUpgradeDecision_rejected_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTREJECT")
upgrade_decision.cancel()
self.tic()
redirect_url = self.portal.Base_acceptUpgradeDecision('UD-TESTREJECT')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20the%20upgrade%20is%20not%20possble%2C%20Upgrade%20Decision%20was%20Canceled%20or%20Rejected%21"),
"%s contains the wrong message" % redirect_url)
def testBase_rejectUpgradeDecision_no_reference(self):
upgrade_decision = self._makeUpgradeDecision()
self.assertRaises(ValueError, self.portal.Base_rejectUpgradeDecision, None)
def testBase_rejectUpgradeDecision_duplicated_reference(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTBADREFERENCE")
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTBADREFERENCE")
self.tic()
self.assertRaises(ValueError, self.portal.Base_acceptUpgradeDecision, None)
def testBase_rejectUpgradeDecision_no_upgrade_decision(self):
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-UNEXISTING')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Unable%20to%20find%20the%20Upgrade%20Decision."),
"%s contains the wrong message" % redirect_url)
def testBase_rejectUpgradeDecision_draft_upgrade_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTDRAFT")
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTDRAFT')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Thanks%20Upgrade%20Decision%20has%20been"\
"%20rejected%20Successfully%20%28You%20cannot%20use%20it%20anymore%29."),
"%s contains the wrong message" % redirect_url)
self.assertEquals(upgrade_decision.getSimulationState(), 'rejected')
def testBase_rejectUpgradeDecision_planned_upgrade_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTPLANNED")
upgrade_decision.plan()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTPLANNED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Thanks%20Upgrade%20Decision%20has%20been"\
"%20rejected%20Successfully%20%28You%20cannot%20use%20it%20anymore%29."),
"%s contains the wrong message" % redirect_url)
self.assertEquals(upgrade_decision.getSimulationState(), 'rejected')
def testBase_rejectUpgradeDecision_confirmed_upgrade_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTCONFIRMED")
upgrade_decision.confirm()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTCONFIRMED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Thanks%20Upgrade%20Decision%20has%20been"\
"%20rejected%20Successfully%20%28You%20cannot%20use%20it%20anymore%29."),
"%s contains the wrong message" % redirect_url)
self.assertEquals(upgrade_decision.getSimulationState(), 'rejected')
def testBase_rejectUpgradeDecision_started_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTSTARTED")
upgrade_decision.start()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTSTARTED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20This%20Upgrade%20Decision%20is%20"\
"already%20Started%2C%20you%20cannot%20reject%20it%20anymore."),
"%s contains the wrong message" % redirect_url)
def testBase_rejectUpgradeDecision_stop_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTSTOP")
upgrade_decision.start()
upgrade_decision.stop()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTSTOP')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20this%20Upgrade%20Decision%20has%20been%20already%20processed."),
"%s contains the wrong message" % redirect_url)
def testBase_rejectUpgradeDecision_delivered_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTDELIVERED")
upgrade_decision.start()
upgrade_decision.stop()
upgrade_decision.deliver()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTDELIVERED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Sorry%2C%20this%20Upgrade%20Decision%20has%20been%20already%20processed."),
"%s contains the wrong message" % redirect_url)
def testBase_rejectUpgradeDecision_cancelled_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTCANCELLED")
upgrade_decision.cancel()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTCANCELLED')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Upgrade%20Decision%20is%20already%20Rejected%21"),
"%s contains the wrong message" % redirect_url)
def testBase_rejectUpgradeDecision_reject_decision(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.setReference("UD-TESTREJECT")
upgrade_decision.reject()
self.tic()
redirect_url = self.portal.Base_rejectUpgradeDecision('UD-TESTREJECT')
self.assertTrue(redirect_url.endswith(
"?portal_status_message=Upgrade%20Decision%20is%20already%20Rejected%21"),
"%s contains the wrong message" % redirect_url)
def testUpgradeDecision_isUpgradeFinished_computer(self):
computer = self._makeComputer(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
upgrade_decision.confirm()
upgrade_decision.stop()
self.assertFalse(upgrade_decision.UpgradeDecision_isUpgradeFinished())
self._makeSoftwareInstallation(self.new_id, computer,
software_release.getUrlString())
self.tic()
self.assertTrue(upgrade_decision.UpgradeDecision_isUpgradeFinished())
def testUpgradeDecision_isUpgradeFinished_hosting_subscription(self):
hosting_subscription = self._makeHostingSubscription(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release,
hosting_subscription])
upgrade_decision.confirm()
upgrade_decision.stop()
self.assertFalse(upgrade_decision.UpgradeDecision_isUpgradeFinished())
hosting_subscription.setUrlString(software_release.getUrlString())
self.assertTrue(upgrade_decision.UpgradeDecision_isUpgradeFinished())
@simulate('NotificationTool_getDocumentValue',
'reference=None',
'assert reference == "slapos-upgrade-computer.notification"\n' \
'return context.restrictedTraverse(' \
'context.REQUEST["testUpgradeDecision_notify_computer"])')
def testUpgradeDecision_notify_computer(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release.setAggregateValue(software_product)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.edit(destination_decision_value=person)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
notification_message = self.portal.notification_message_module.newContent(
portal_type="Notification Message",
title='Test NM title %s' % self.new_id,
text_content_substitution_mapping_method_id=
"NotificationMessage_getSubstitutionMappingDictFromArgument",
text_content="""${software_product_title}
${computer_title}
${computer_reference}
${software_release_name}
${software_release_reference}
${upgrade_accept_link}
${upgrade_reject_link}
${new_software_release_url}""",
content_type='text/html',
)
self.portal.REQUEST\
['testUpgradeDecision_notify_computer'] = \
notification_message.getRelativeUrl()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notify())
upgrade_decision.plan()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notify())
self.tic()
self.assertEquals(upgrade_decision.getSimulationState(), 'confirmed')
self.assertEquals(len(upgrade_decision.getFollowUpRelatedValueList()), 1)
event = upgrade_decision.getFollowUpRelatedValue()
self.assertEquals(event.getTitle(),
"New Software available for Installation at %s" % computer.getTitle())
self.assertEqual(event.getTextContent().splitlines(),
[software_product.getTitle(), computer.getTitle(), computer.getReference(),
software_release.getTitle(), software_release.getReference(),
'Base_acceptUpgradeDecision?reference=%s' % upgrade_decision.getReference(),
'Base_rejectUpgradeDecision?reference=%s' % upgrade_decision.getReference(),
software_release.getUrlString()])
self.assertEquals(event.getSimulationState(), "delivered")
@simulate('NotificationTool_getDocumentValue',
'reference=None',
'assert reference == "slapos-upgrade-hosting-subscription.notification"\n' \
'return context.restrictedTraverse(' \
'context.REQUEST["testUpgradeDecision_notify_hosting_subscription"])')
def testUpgradeDecision_notify_hosting_subscription(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release.setAggregateValue(software_product)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.edit(destination_decision_value=person)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release,
hosting_subscription])
old_url = hosting_subscription.getUrlString()
notification_message = self.portal.notification_message_module.newContent(
portal_type="Notification Message",
title='Test NM title %s' % self.new_id,
text_content_substitution_mapping_method_id=
"NotificationMessage_getSubstitutionMappingDictFromArgument",
text_content="""${software_product_title}
${hosting_subscription_title}
${old_software_release_url}
${software_release_name}
${software_release_reference}
${upgrade_accept_link}
${upgrade_reject_link}
${new_software_release_url}""",
content_type='text/html',
)
self.portal.REQUEST\
['testUpgradeDecision_notify_hosting_subscription'] = \
notification_message.getRelativeUrl()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notify())
upgrade_decision.plan()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notify())
self.tic()
self.assertEquals(upgrade_decision.getSimulationState(), 'confirmed')
self.assertEquals(len(upgrade_decision.getFollowUpRelatedValueList()), 1)
event = upgrade_decision.getFollowUpRelatedValue()
self.assertEquals(event.getTitle(),
"New Upgrade available for %s" % hosting_subscription.getTitle())
self.assertEqual(event.getTextContent().splitlines(),
[software_product.getTitle(), hosting_subscription.getTitle(),
old_url, software_release.getTitle(), software_release.getReference(),
'Base_acceptUpgradeDecision?reference=%s' % upgrade_decision.getReference(),
'Base_rejectUpgradeDecision?reference=%s' % upgrade_decision.getReference(),
software_release.getUrlString()])
self.assertEquals(event.getSimulationState(), "delivered")
@simulate('NotificationTool_getDocumentValue',
'reference=None',
'assert reference == "slapos-upgrade-delivered-computer.notification"\n' \
'return context.restrictedTraverse(' \
'context.REQUEST["testUpgradeDecision_notifyDelivered_computer"])')
@simulate('UpgradeDecision_isUpgradeFinished',
'', 'return 0')
def testUpgradeDecision_notifyDelivered_computer(self):
person = self._makePerson(self.new_id)
computer = self._makeComputer(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release.setAggregateValue(software_product)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.edit(destination_decision_value=person)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release, computer])
notification_message = self.portal.notification_message_module.newContent(
portal_type="Notification Message",
title='Test NM title %s' % self.new_id,
text_content_substitution_mapping_method_id=
"NotificationMessage_getSubstitutionMappingDictFromArgument",
text_content="""${software_product_title}
${computer_title}
${computer_reference}
${software_release_name}
${software_release_reference}
${new_software_release_url}""",
content_type='text/html',
)
self.portal.REQUEST\
['testUpgradeDecision_notifyDelivered_computer'] = \
notification_message.getRelativeUrl()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notifyDelivered())
upgrade_decision.start()
upgrade_decision.stop()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notifyDelivered())
self.tic()
self.assertEquals(upgrade_decision.getSimulationState(), 'delivered')
self.assertEquals(len(upgrade_decision.getFollowUpRelatedValueList()), 1)
event = upgrade_decision.getFollowUpRelatedValue()
self.assertEquals(event.getTitle(),
"Upgrade processed at %s for %s" % (computer.getTitle(),
software_release.getReference()))
self.assertEqual(event.getTextContent().splitlines(),
[software_product.getTitle(), computer.getTitle(), computer.getReference(),
software_release.getTitle(), software_release.getReference(),
software_release.getUrlString()])
self.assertEquals(event.getSimulationState(), "delivered")
@simulate('NotificationTool_getDocumentValue',
'reference=None',
'assert reference == "slapos-upgrade-delivered-hosting-subscription.notification"\n' \
'return context.restrictedTraverse(' \
'context.REQUEST["testUpgradeDecision_notifyDelivered_hosting_subscription"])')
@simulate('UpgradeDecision_isUpgradeFinished',
'', 'return 0')
def testUpgradeDecision_notifyDelivered_hosting_subscription(self):
person = self._makePerson(self.new_id)
hosting_subscription = self._makeHostingSubscription(self.new_id)
software_release = self._makeSoftwareRelease(self.new_id)
software_product = self._makeSoftwareProduct(self.new_id)
software_release.setAggregateValue(software_product)
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.edit(destination_decision_value=person)
upgrade_decision_line = self._makeUpgradeDecisionLine(upgrade_decision)
upgrade_decision_line.setAggregateValueList([software_release,
hosting_subscription])
old_url = hosting_subscription.getUrlString()
notification_message = self.portal.notification_message_module.newContent(
portal_type="Notification Message",
title='Test NM title %s' % self.new_id,
text_content_substitution_mapping_method_id=
"NotificationMessage_getSubstitutionMappingDictFromArgument",
text_content="""${software_product_title}
${hosting_subscription_title}
${old_software_release_url}
${software_release_name}
${software_release_reference}
${new_software_release_url}""",
content_type='text/html',
)
self.portal.REQUEST\
['testUpgradeDecision_notifyDelivered_hosting_subscription'] = \
notification_message.getRelativeUrl()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notifyDelivered())
upgrade_decision.start()
upgrade_decision.stop()
self.tic()
self.assertEquals(None, upgrade_decision.UpgradeDecision_notifyDelivered())
self.tic()
self.assertEquals(upgrade_decision.getSimulationState(), 'delivered')
self.assertEquals(len(upgrade_decision.getFollowUpRelatedValueList()), 1)
event = upgrade_decision.getFollowUpRelatedValue()
self.assertEquals(event.getTitle(),
"Upgrade Processed for %s (%s)" % (hosting_subscription.getTitle(),
software_release.getReference()))
self.assertEqual(event.getTextContent().splitlines(),
[software_product.getTitle(), hosting_subscription.getTitle(),
old_url, software_release.getTitle(), software_release.getReference(),
software_release.getUrlString()])
self.assertEquals(event.getSimulationState(), "delivered")
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPDMSkins</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPDMSkins</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 75, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:125, 0: Unnecessary semicolon (unnecessary-semicolon)</string>
<string>W:163, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:164, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:168, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:169, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:172, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:175, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:181, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:182, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:184, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W: 96, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:461, 4: Unused variable \'upgrade_decision_line\' (unused-variable)</string>
<string>W:507, 4: Unused variable \'upgrade_decision_line\' (unused-variable)</string>
<string>W:551, 4: Unused variable \'upgrade_decision_line\' (unused-variable)</string>
<string>W:699, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:726, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1189, 4: Unused variable \'upgrade_decision\' (unused-variable)</string>
<string>W:1291, 4: Unused variable \'upgrade_decision\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
testSlapOSPDMSkins test.erp5.testSlapOSPDMAlarm
testSlapOSPDMAlarm test.erp5.testSlapOSPDMSkins
\ No newline at end of file
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
<key> <string>version</string> </key> <key> <string>version</string> </key>
<value> <string>erp5</string> </value> <value> <string>erp5</string> </value>
</item> </item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
...@@ -58,4 +64,48 @@ ...@@ -58,4 +64,48 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData> </ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSRestAPIV1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSRestAPIV1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>E:1013, 2: No value for argument \'self\' in function call (no-value-for-parameter)</string>
</tuple>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 41, 10: Use of eval (eval-used)</string>
<string>W:175, 13: Use of eval (eval-used)</string>
<string>W:753, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:824, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1029, 13: Use of eval (eval-used)</string>
<string>W:1116, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1212, 13: Use of eval (eval-used)</string>
<string>W:1473, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1536, 13: Use of eval (eval-used)</string>
<string>W:1853, 28: Redefining name \'json\' from outer scope (line 9) (redefined-outer-name)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
testSlapOSRestAPIV1 test.erp5.testSlapOSRestAPIV1
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSSlapTool</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.SlapOSSlapTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSSlapTool</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSSlapTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 29, 10: Use of eval (eval-used)</string>
<string>W: 38, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:467, 13: Use of eval (eval-used)</string>
<string>W:518, 13: Use of eval (eval-used)</string>
<string>W:743, 13: Use of eval (eval-used)</string>
<string>W:1307, 13: Use of eval (eval-used)</string>
<string>W:1420, 13: Use of eval (eval-used)</string>
<string>W:1474, 13: Use of eval (eval-used)</string>
<string>W:1514, 13: Use of eval (eval-used)</string>
<string>W:1921, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:2017, 13: Use of eval (eval-used)</string>
<string>W:2372, 13: Use of eval (eval-used)</string>
<string>W:2426, 13: Use of eval (eval-used)</string>
<string>W:2453, 13: Use of eval (eval-used)</string>
<string>W:2598, 13: Use of eval (eval-used)</string>
<string>W:2626, 13: Use of eval (eval-used)</string>
<string>W:2675, 13: Use of eval (eval-used)</string>
<string>W:2722, 13: Use of eval (eval-used)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSSlapToolComputerUpdateFromDict</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSSlapToolComputerUpdateFromDict</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:274, 4: Unused variable \'default_address\' (unused-variable)</string>
<string>W:270, 4: Unused variable \'other_address\' (unused-variable)</string>
<string>W:315, 4: Unused variable \'default_address\' (unused-variable)</string>
<string>W:311, 4: Unused variable \'other_address\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
SlapOSSlapTool extension.erp5.SlapOSSlapTool
\ No newline at end of file \ No newline at end of file
testSlapOSSlapTool test.erp5.testSlapOSSlapToolComputerUpdateFromDict
testSlapOSSlapToolComputerUpdateFromDict test.erp5.testSlapOSSlapTool
\ No newline at end of file \ No newline at end of file
...@@ -112,3 +112,102 @@ def ERP5Site_deleteVifibAccounting(self): ...@@ -112,3 +112,102 @@ def ERP5Site_deleteVifibAccounting(self):
][0].Base_createCloneDocument(batch_mode=1) ][0].Base_createCloneDocument(batch_mode=1)
bt5.activate().install(force=1, update_catalog=0) bt5.activate().install(force=1, update_catalog=0)
return 'Done.' return 'Done.'
def upgradeObjectClass(self, test_before, from_class, to_class, test_after,
test_only=0):
"""
Upgrade the class of all objects inside this particular folder:
test_before and test_after have to be a method with one parameter.
from_class and to_class can be classes (o.__class___) or strings like:
'Products.ERP5Type.Document.Folder.Folder'
XXX Some comments by Seb:
- it is not designed to work for modules with thousands of objects,
so it totally unusable when you have millions of objects
- it is totally unsafe. There is even such code inside :
self.manage_delObjects(id of original object)
commit()
self._setObject(new object instance)
So it is possible to definitely loose data.
- There is no proof that upgrade is really working. With such a
dangerous operation, it would be much more safer to have a proof,
something like the "fix point" after doing a synchronization. Such
checking should even be done before doing commit (like it might
be possible to export objects in the xml format used for exports
before and after, and run a diff).
"""
from zLOG import LOG, WARNING
from Acquisition import aq_base, aq_parent, aq_inner
import transaction
LOG("upgradeObjectClass: folder ", 0, self.getId())
test_list = []
def getClassFromString(a_klass):
from_module = '.'.join(a_klass.split('.')[:-1])
real_klass = a_klass.split('.')[-1]
# XXX It is possible that API Change for Python 2.6.
mod = __import__(from_module, globals(), locals(), [real_klass])
return getattr(mod, real_klass)
if isinstance(from_class, type('')):
from_class = getClassFromString(from_class)
if isinstance(to_class, type('')):
to_class = getClassFromString(to_class)
for o in self.listFolderContents():
if not test_before(o):
continue
# Make sure this sub object is not the same as object
if o.getPhysicalPath() != self.getPhysicalPath():
id = o.getId()
obase = aq_base(o)
# Check if the subobject have to also be upgraded
if hasattr(obase,'upgradeObjectClass'):
test_list += o.upgradeObjectClass(test_before=test_before, \
from_class=from_class, to_class=to_class,
test_after=test_after, test_only=test_only)
# Test if we must apply the upgrade
if test_before(o) is not None:
LOG("upgradeObjectClass: id ", 0, id)
klass = obase.__class__
LOG("upgradeObjectClass: klass ", 0 ,str(klass))
LOG("upgradeObjectClass: from_class ", 0 ,str(from_class))
if klass == from_class and not test_only:
try:
newob = to_class(obase.id)
newob.id = obase.id # This line activates obase.
except AttributeError:
newob = to_class(id)
newob.id = id
keys = obase.__dict__.keys()
for k in keys:
if k not in ('id', 'meta_type', '__class__'):
setattr(newob,k,obase.__dict__[k])
LOG("upgradeObjectClass: ",0,"Delete old object: %s" % str(id))
self.manage_delObjects(id)
LOG("upgradeObjectClass: ",0,"add new object: %s" % str(newob.id))
self._setObject(id, newob)
transaction.commit()
LOG("upgradeObjectClass: ",0,"newob.__class__: %s" % str(newob.__class__))
object_to_test = self._getOb(id)
test_list += test_after(object_to_test)
if klass == from_class and test_only:
test_list += test_after(o)
return test_list
def checkUpgradeObjectClass(self, test_method):
portal_type = self.getPortalType()
mod = __import__("erp5.portal_type", globals(), locals(), [portal_type])
new_class = getattr(mod, portal_type)
if self.__class__ == new_class:
return "Object Class for '%s' is already fixed" % portal_type
return upgradeObjectClass(self.getPortalObject(), test_method,
self.__class__, new_class, test_method)
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSUpgrader</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.SlapOSUpgrader</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:165, 6: Redefining built-in \'id\' (redefined-builtin)</string>
<string>W:143, 2: Unused variable \'aq_parent\' (unused-variable)</string>
<string>W:142, 2: Unused variable \'WARNING\' (unused-variable)</string>
<string>W:143, 2: Unused variable \'aq_inner\' (unused-variable)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</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>if obj.getId() == \'portal_tests\':\n
return obj\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>obj</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_beforeTestMethod</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>checkUpgradeObjectClass</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>SlapOSUpgrader</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_checkUpgradeObjectClass</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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>"""\n
This script should returns always two list of Business Template.\n
- The first list is to resolve dependencies and upgrade.\n
- The second list is what you want to keep. This is useful if we want to keep \n
a old business template without updating it and without removing it\n
"""\n
portal = context.getPortalObject()\n
portal_templates = portal.portal_templates\n
\n
#installed_bt5_list = [bt5.getTitle() for bt5 in portal_templates.getInstalledBusinessTemplateList()]\n
available_bt5_list = [bt5 for bt5 in \n
portal_templates.getRepositoryBusinessTemplateList(newest_only=True)]\n
signature = portal.ERP5Site_getUpgraderSignature()\n
bt5_id_list = []\n
for bt5_id in signature.get(\'required_bt5_id_list\', []):\n
available_bt5 = [bt5 for bt5 in available_bt5_list if bt5.title == bt5_id][0]\n
if available_bt5:\n
bt5_id_list.append(available_bt5.getTitle())\n
\n
keep_bt5_id_list = [\'erp5_ui_test\',\n
\'erp5_ui_test_core\',\n
\'slapos_category\',\n
\'erp5_secure_payment\']\n
return bt5_id_list, keep_bt5_id_list\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getUpgradeBusinessTemplateList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -69,6 +69,8 @@ ALARM_DICT = {\n ...@@ -69,6 +69,8 @@ ALARM_DICT = {\n
\n \n
REQUIRED_BT5_ID_LIST = [\n REQUIRED_BT5_ID_LIST = [\n
# core of core\n # core of core\n
\'erp5_mysql_innodb_catalog\',\n
\'erp5_full_text_myisam_catalog\',\n
\'erp5_mysql_innodb_catalog\',\n \'erp5_mysql_innodb_catalog\',\n
\'erp5_core\',\n \'erp5_core\',\n
\'erp5_property_sheets\',\n \'erp5_property_sheets\',\n
...@@ -95,43 +97,11 @@ REQUIRED_BT5_ID_LIST = [\n ...@@ -95,43 +97,11 @@ REQUIRED_BT5_ID_LIST = [\n
\'erp5_km\',\n \'erp5_km\',\n
\'erp5_simulation\',\n \'erp5_simulation\',\n
\'erp5_trade\',\n \'erp5_trade\',\n
\'erp5_ui_test_core\',\n
\'erp5_system_event\',\n \'erp5_system_event\',\n
\'erp5_ui_test\',\n \'erp5_payzen_secure_payment\',\n
\'erp5_secure_payment\',\n
\'erp5_web\',\n \'erp5_web\',\n
\'erp5_project\',\n \'erp5_project\',\n
\'erp5_credential_oauth2\',\n \'erp5_credential_oauth2\',\n
# vifib deinstallation\n
\'vifib_web_ui_test\',\n
\'vifib_test\',\n
\'vifib_erp5\',\n
# \'vifib_configurator\', # not used\n
\'vifib_slapos_accounting\',\n
\'vifib_upgrader\',\n
\'vifib_data_web\',\n
\'vifib_data_simulation\',\n
\'vifib_data_payzen\',\n
\'vifib_data_category\',\n
\'vifib_data\',\n
\'vifib_slapos_rest_api\',\n
\'vifib_slapos_rest_api_v1\',\n
\'vifib_slapos_rest_api_tool_portal_type\',\n
\'vifib_web\',\n
\'vifib_agent\',\n
\'vifib_l10n_fr\',\n
\'vifib_slapos_capacity\',\n
\'vifib_slapos_core\',\n
\'vifib_software_pdm\',\n
\'vifib_forge_release\',\n
\'vifib_open_trade\',\n
\'vifib_payzen\',\n
\'vifib_crm\',\n
\'vifib_invoicing\',\n
\'vifib_core\',\n
\'vifib_slap\',\n
\'vifib_base\',\n
\'vifib_mysql_innodb_catalog\',\n
# new erp5 business templates\n # new erp5 business templates\n
\'erp5_promise\',\n \'erp5_promise\',\n
\'erp5_web_shacache\',\n \'erp5_web_shacache\',\n
...@@ -141,6 +111,9 @@ REQUIRED_BT5_ID_LIST = [\n ...@@ -141,6 +111,9 @@ REQUIRED_BT5_ID_LIST = [\n
\'slapos_configurator\',\n \'slapos_configurator\',\n
\'slapos_cache\',\n \'slapos_cache\',\n
\'slapos_cloud\',\n \'slapos_cloud\',\n
\'slapos_crm\',\n
\'slapos_hypermedia\',\n
\'slapos_jio\',\n
\'slapos_slap_tool\',\n \'slapos_slap_tool\',\n
\'slapos_category\',\n \'slapos_category\',\n
\'slapos_rest_api_tool_portal_type\',\n \'slapos_rest_api_tool_portal_type\',\n
...@@ -156,13 +129,13 @@ REINSTALLABLE_BT5_ID_LIST = ()\n ...@@ -156,13 +129,13 @@ REINSTALLABLE_BT5_ID_LIST = ()\n
\n \n
# items to keep even if marked by BT5 to \'Remove\'\n # items to keep even if marked by BT5 to \'Remove\'\n
KEEP_ORIGINAL_DICT = {\n KEEP_ORIGINAL_DICT = {\n
\'vifib_data_payzen\': ( \'portal_secure_payments\', ),\n \'erp5_secure_payment\': ( \'portal_secure_payments\', ),\n
\'vifib_slapos_core\': ( \'hosting_subscription_module\', \'software_installation_module\', \'software_instance_module\',\n \'slapos_cloud\': ( \'hosting_subscription_module\', \'software_installation_module\', \'software_instance_module\',\n
\'portal_types/Hosting Subscription\', \'portal_types/Hosting Subscription Module\', \'portal_types/Slave Instance\',\n \'portal_types/Hosting Subscription\', \'portal_types/Hosting Subscription Module\', \'portal_types/Slave Instance\',\n
\'portal_types/Software Installation\', \'portal_types/Software Installation Module\', \'portal_types/Software Instance\',\n \'portal_types/Software Installation\', \'portal_types/Software Installation Module\', \'portal_types/Software Instance\',\n
\'portal_types/Software Instance Module\'),\n \'portal_types/Software Instance Module\'),\n
\'vifib_open_trade\': ( \'portal_types/Subscription Item Root Simulation Rule\', ),\n \'slapos_accounting\': ( \'portal_types/Subscription Item Root Simulation Rule\', ),\n
\'vifib_payzen\': (\'portal_types/Payzen Event\', \'portal_types/Payzen Event Message\',),\n \'slapos_payzen\': (\'portal_types/Payzen Event\', \'portal_types/Payzen Event Message\',),\n
}\n }\n
\n \n
# Items which need validation at upgrade time\n # Items which need validation at upgrade time\n
......
<?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>portal = context.getPortalObject()\n
\n
portal_classes = getattr(portal, \'portal_classes\', None)\n
if portal_classes:\n
portal.manage_delObjects([\'portal_classes\'])\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_postUpgradeFixUpPortalClasses</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>portal = context.getPortalObject()\n
\n
return context.Base_checkUpgradeObjectClass(portal.portal_tests, context.Base_beforeTestMethod)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_upgradePortalTestsClass</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>portal = context.getPortalObject()\n
portal_type = \'Template Tool\'\n
tag = \'upgrade_upgrader_%s\' % random.randint(0, 2000)\n
method_kw = {\'bt5_list\':[\'erp5_upgrader\', \'slapos_upgrader\'],\n
\'deprecated_after_script_dict\': None,\n
\'deprecated_reinstall_set\': None,\n
\'dry_run\': False,\n
\'delete_orphaned\': False,\n
\'keep_bt5_id_set\': [],\n
\'update_catalog\': False}\n
\n
\n
portal.portal_catalog.searchAndActivate(\n
portal_type=portal_type,\n
method_id=\'upgradeSite\',\n
method_kw=method_kw,\n
activate_kw=dict(tag=tag, priority=2))\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_upgradeUpgraderBusinessTemplate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_zFixUpgradeDatabase</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string>DROP PROCEDURE IF EXISTS upgrade_fix_database;\n
\n
DELIMITER //\n
\n
CREATE PROCEDURE upgrade_fix_database()\n
BEGIN\n
\n
/* Create table accounting_transaction */\n
CREATE TABLE IF NOT EXISTS `accounting_transaction` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`order_id` TINYINT UNSIGNED NOT NULL,\n
\n
`section_uid` BIGINT UNSIGNED,\n
`mirror_section_uid` BIGINT UNSIGNED,\n
`resource_uid` BIGINT UNSIGNED,\n
\n
`project_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n
\n
`accounting_transaction_title` VARCHAR(255),\n
`reference` VARCHAR(255),\n
`specific_reference` VARCHAR(255),\n
\n
`operation_date` datetime default NULL,\n
\n
`total_debit` real,\n
`total_credit` real,\n
\n
PRIMARY KEY (`uid`, `order_id`),\n
KEY (`section_uid`, `mirror_section_uid`)\n
-- TODO: keys\n
) ENGINE=InnoDB;\n
\n
/* Alter table catalog */\n
-- add a column grouping_date safely\n
IF NOT EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE()\n
AND COLUMN_NAME=\'grouping_date\' AND TABLE_NAME=\'catalog\') ) THEN\n
ALTER TABLE `catalog` ADD `grouping_date` datetime AFTER `grouping_reference`;\n
END IF;\n
\n
\n
/* Alter table stock */\n
-- add a column is_accountable safely\n
IF NOT EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE()\n
AND COLUMN_NAME=\'is_accountable\' AND TABLE_NAME=\'stock\') ) THEN\n
ALTER TABLE `stock` ADD COLUMN `is_accountable` BOOLEAN AFTER `is_cancellation`;\n
END IF;\n
\n
-- add a column explanation_uid safely\n
IF NOT EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE()\n
AND COLUMN_NAME=\'explanation_uid\' AND TABLE_NAME=\'stock\') ) THEN\n
ALTER TABLE `stock` ADD COLUMN `explanation_uid` BIGINT UNSIGNED AFTER `order_id`;\n
END IF;\n
\n
-- add a column funding_uid safely\n
IF NOT EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE()\n
AND COLUMN_NAME=\'funding_uid\' AND TABLE_NAME=\'stock\') ) THEN\n
ALTER TABLE `stock` ADD COLUMN `funding_uid` BIGINT UNSIGNED AFTER `order_id`;\n
END IF;\n
\n
-- add a column payment_request_uid safely\n
IF NOT EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE()\n
AND COLUMN_NAME=\'payment_request_uid\' AND TABLE_NAME=\'stock\') ) THEN\n
ALTER TABLE `stock` ADD COLUMN `payment_request_uid` BIGINT UNSIGNED AFTER `order_id`;\n
END IF;\n
\n
END//\n
\n
DELIMITER ;\n
\n
CALL upgrade_fix_database();</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
SlapOSUpgrader extension.erp5.SlapOSUpgrader
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>ViFiBWeb</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.ViFiBWeb</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:143, 2: Redefining built-in \'hash\' (redefined-builtin)</string>
<string>W:164, 2: Redefining built-in \'hash\' (redefined-builtin)</string>
<string>W:212, 2: Redefining built-in \'hash\' (redefined-builtin)</string>
</tuple>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Folder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This module provides a single access to all documents stored in an ERP5 system.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document Module</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>file_icon.png</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 File</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>A file, in its widest sense</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFile</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>document</string>
<string>file_document</string>
<string>my_document</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>File</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>searchable_text_method_id</string> </key>
<value>
<tuple>
<string>asText</string>
</tuple>
</value>
</item>
<item>
<key> <string>searchable_text_property_id</string> </key>
<value>
<tuple>
<string>title</string>
<string>description</string>
<string>reference</string>
<string>version</string>
<string>short_title</string>
<string>subject_list</string>
<string>filename</string>
<string>source_project_title</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>File</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Folder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This module provides a single access to all images stored in an ERP5 system.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Image Module</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>image_icon.png</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Image</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Image type documents in ERP5. Many formats are supported</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addImage</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>document</string>
<string>file_document</string>
<string>my_document</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Folder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Holds organisation objects</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Organisation Module</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Folder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Holds person objects</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person Module</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>document_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Text Document</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>A Query allows for capturing questions of users about ERP5 documents. It can be used as a collaboration tool, for sharing knowledge or to provide online help.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addTextDocument</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Query</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>searchable_text_method_id</string> </key>
<value>
<tuple>
<string>asRawText</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>TextDocument</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
line_list here/query;\n line_list here/query;\n
listbox_max_lines python: int(here.getMaxLineNumber());\n listbox_max_lines python: int(here.getMaxLineNumber());\n
total_line python: int(here.total_size);\n total_line python: int(here.total_size);\n
is_sample python: getattr(here, \'is_sample\', False);\n
current_page python: int(here.current_page) + 1;\n current_page python: int(here.current_page) + 1;\n
current_page_max python: listbox_max_lines * current_page;\n current_page_max python: listbox_max_lines * current_page;\n
current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
......
66
\ No newline at end of file
ViFiBWeb extension.erp5.ViFiBWeb
\ No newline at end of file \ No newline at end of file
Document Module
File
Image
Image Module
Organisation Module
Person Module
Query
\ No newline at end of file
...@@ -34,6 +34,7 @@ import functools ...@@ -34,6 +34,7 @@ import functools
from Products.ERP5Type.tests.utils import DummyMailHost from Products.ERP5Type.tests.utils import DummyMailHost
from Products.ERP5Type.Utils import convertToUpperCase from Products.ERP5Type.Utils import convertToUpperCase
import os import os
import glob
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager setSecurityManager
...@@ -81,6 +82,23 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -81,6 +82,23 @@ class testSlapOSMixin(ERP5TypeTestCase):
open(os.path.join(os.environ['TEST_CA_PATH'], 'crlnumber'), 'w').write( open(os.path.join(os.environ['TEST_CA_PATH'], 'crlnumber'), 'w').write(
'01') '01')
open(os.path.join(os.environ['TEST_CA_PATH'], 'index.txt'), 'w').write('') open(os.path.join(os.environ['TEST_CA_PATH'], 'index.txt'), 'w').write('')
private_list = glob.glob('%s/*.key' % os.path.join(os.environ['TEST_CA_PATH'],
'private'))
for private in private_list:
os.remove(private)
crl_list = glob.glob('%s/*' % os.path.join(os.environ['TEST_CA_PATH'],
'crl'))
for crl in crl_list:
os.remove(crl)
certs_list = glob.glob('%s/*' % os.path.join(os.environ['TEST_CA_PATH'],
'certs'))
for cert in certs_list:
os.remove(cert)
newcerts_list = glob.glob('%s/*' % os.path.join(os.environ['TEST_CA_PATH'],
'newcerts'))
for newcert in newcerts_list:
os.remove(newcert)
def setupPortalAlarms(self): def setupPortalAlarms(self):
if not self.portal.portal_alarms.isSubscribed(): if not self.portal.portal_alarms.isSubscribed():
...@@ -88,7 +106,9 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -88,7 +106,9 @@ class testSlapOSMixin(ERP5TypeTestCase):
self.assertTrue(self.portal.portal_alarms.isSubscribed()) self.assertTrue(self.portal.portal_alarms.isSubscribed())
def isLiveTest(self): def isLiveTest(self):
return 'ERP5TypeLiveTestCase' in [q.__name__ for q in self.__class__.mro()] #return 'ERP5TypeLiveTestCase' in [q.__name__ for q in self.__class__.mro()]
# XXX - What is the better way to no if we are in live test mode ?
return not os.environ.has_key('TEST_CA_PATH')
def _setUpDummyMailHost(self): def _setUpDummyMailHost(self):
"""Do not play with NON persistent replacement of MailHost""" """Do not play with NON persistent replacement of MailHost"""
......
from test_suite import SavedTestSuite, ProjectTestSuite from test_suite import SavedTestSuite, ProjectTestSuite
from glob import glob
import os, re
import sys
slapos_bt_list = [ slapos_bt_list = [
'erp5_web_shacache', 'erp5_web_shacache',
...@@ -21,6 +24,38 @@ class SlapOSCloud(SavedTestSuite, ProjectTestSuite): ...@@ -21,6 +24,38 @@ class SlapOSCloud(SavedTestSuite, ProjectTestSuite):
_saved_test_id = 'Products.SlapOS.tests.testSlapOSMixin.testSlapOSMixin' _saved_test_id = 'Products.SlapOS.tests.testSlapOSMixin.testSlapOSMixin'
_bt_list = slapos_bt_list _bt_list = slapos_bt_list
def getTestList(self):
test_list = []
path = sys.path[0]
erp5_path = sys.path[1]
component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components"
"/test\.[^.]+\.([^.]+).py$")
for test_path in (
glob('%s/product/*/tests/test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/test*.py' % erp5_path) +
glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % erp5_path)):
component_re_match = component_re.match(test_path)
if component_re_match is not None:
test_case = "%s:%s" % (component_re_match.group(1),
component_re_match.group(2))
else:
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
# Filter bt tests to run from _bt_list list
if test_path.split(os.sep)[-2] != 'tests':
if test_path.split(os.sep)[-2] == 'portal_components':
product = test_path.split(os.sep)[-4]
else:
product = test_path.split(os.sep)[-3]
if not product in self._bt_list:
continue
elif test_path.split(os.sep)[-3] == 'Vifib':
# There is no valid tests in Vifib!
continue
test_list.append(test_case)
return test_list
def __init__(self, max_instance_count=1, *args, **kw): def __init__(self, max_instance_count=1, *args, **kw):
# hardcode number of node, to prevent concurrency issue on certificate # hardcode number of node, to prevent concurrency issue on certificate
# authority file system storage # authority file system storage
......
...@@ -194,3 +194,4 @@ class ComputerSnapshot(_Snapshot): ...@@ -194,3 +194,4 @@ class ComputerSnapshot(_Snapshot):
partition.mountpoint)) partition.mountpoint))
return [(k, v) for k, v in partition_dict.iteritems()] return [(k, v) for k, v in partition_dict.iteritems()]
...@@ -748,7 +748,7 @@ class ConnectionHelper: ...@@ -748,7 +748,7 @@ class ConnectionHelper:
class slap: class slap:
zope.interface.implements(interface.slap) zope.interface.implements(interface.slap)
def initializeConnection(self, slapgrid_uri, def initializeConnection(self, slapgrid_uri,
key_file=None, cert_file=None, key_file=None, cert_file=None,
master_ca_file=None, master_ca_file=None,
timeout=60, timeout=60,
......
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