Commit c743c2c8 authored by Romain Courteaud's avatar Romain Courteaud

Merge remote-tracking branch 'origin/master' into hostingwebsite

parents 6c15d3ad 7c12795f
Changes
=======
0.21 (unreleased)
0.22 (unreleased)
-----------------
* No changes yet.
0.21 (2011-12-23)
-----------------
* slap: Add renaming API. [Antoine Catton]
0.20 (2011-11-24)
-----------------
......
22
\ No newline at end of file
24
\ No newline at end of file
......@@ -320,26 +320,15 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.DateUtils import getClosestDate\n
from DateTime import DateTime\n
\n
# support build_before\n
build_before = kw.pop(\'build_before\', None)\n
if build_before is None:\n
build_before = getClosestDate(target_date=DateTime(), precision=\'month\', before=0)\n
\n
kw[\'movement.start_date\'] = \'< %s\' % build_before\n
\n
<value> <string>select_dict= {\'delivery_uid\': None}\n
kw[\'select_dict\']=select_dict\n
kw[\'left_join_list\']=select_dict.keys()\n
kw[\'delivery_uid\']=None\n
if src__==0:\n
movement_list = context.portal_catalog(**kw)\n
return movement_list\n
return context.portal_catalog(**kw)\n
else:\n
return context.portal_catalog(src__=1, **kw)\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -51,9 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal_type = context.getDeliveryPortalType()\n
# make sure that the result of the simulation state is update to date, so check getSimulationState manually\n
return [x.getObject() for x in context.portal_catalog(portal_type=portal_type,simulation_state=\'planned\') \n
if x.getObject().getSimulationState()==\'planned\']\n
simulation_state = \'planned\'\n
# use catalog to prefetch, but check later in ZODB\n
return [x.getObject() for x in context.getPortalObject().portal_catalog(\n
portal_type=portal_type,\n
simulation_state=simulation_state) if x.getSimulationState() == simulation_state]\n
</string> </value>
</item>
<item>
......
......@@ -50,21 +50,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""This script is called on the Invoice after the delivery builder has created\n
<value> <string>"""This script is called on the Invoice after the delivery builder has created\n
the new Invoice.\n
"""\n
from Products.ERP5Type.Message import translateString\n
try:\n
from Products.CMFCore.WorkflowCore import WorkflowException\n
except ImportError:\n
# WorkflowException has not always been allowed in restricted\n
# environment, in this case, make sure WorkflowException is \n
# defined \n
class WorkflowException(Exception):\n
pass\n
\n
from DateTime import DateTime\n
if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
\n
......@@ -75,60 +65,20 @@ if not invoice.Invoice_isAdvanced():\n
if not invoice.getResource():\n
invoice.setResource(invoice.getPriceCurrency())\n
\n
related_packing_list = invoice.getDefaultCausalityValue()\n
related_order = related_packing_list.getDefaultCausalityValue()\n
\n
# copy payment conditions from packing list\n
# if missing, try to copy from order (for compatibility)\n
if not invoice.contentValues(portal_type=\'Payment Condition\'):\n
payment_condition_copy_id_list = []\n
if related_packing_list is not None:\n
payment_condition_copy_id_list = related_packing_list.contentIds(filter={\'portal_type\':\'Payment Condition\'})\n
if len(payment_condition_copy_id_list) > 0:\n
clipboard = related_packing_list.manage_copyObjects(ids=payment_condition_copy_id_list)\n
invoice.manage_pasteObjects(clipboard)\n
elif related_order is not None:\n
payment_condition_copy_id_list = related_order.contentIds(\n
filter={\'portal_type\':\'Payment Condition\'})\n
if len(payment_condition_copy_id_list) > 0:\n
clipboard = related_order.manage_copyObjects(ids=payment_condition_copy_id_list)\n
invoice.manage_pasteObjects(clipboard)\n
\n
if related_order is not None and context.portal_skins.hasObject(\'erp5_simulation_legacy\'):\n
# copy trade condition:\n
if not context.getSpecialise():\n
context.edit(specialise=related_order.getSpecialise())\n
\n
# copy order\'s trade model lines\n
invoice_trade_model_line_reference_list = [document.getReference() \\\n
for document in context.contentValues(portal_type=\'Trade Model Line\')]\n
order_trade_model_line_copy_id_list = []\n
for order_trade_model_line in related_order.contentValues(\n
portal_type=\'Trade Model Line\'):\n
if order_trade_model_line.getReference() not in \\\n
invoice_trade_model_line_reference_list:\n
order_trade_model_line_copy_id_list.append(order_trade_model_line.getId())\n
\n
if order_trade_model_line_copy_id_list:\n
clipboard = related_order.manage_copyObjects(\n
ids=order_trade_model_line_copy_id_list)\n
context.manage_pasteObjects(clipboard)\n
\n
# copy title, if not updating a new delivery\n
if not invoice.hasTitle() and related_packing_list.hasTitle():\n
invoice.setTitle(related_packing_list.getTitle())\n
if invoice.getStartDate() is None:\n
invoice.setStartDate(DateTime())\n
\n
# initialize accounting_workflow to confirmed state\n
confirm_tag = \'%s_confirm\' % invoice.getPath()\n
# initialize accounting_workflow to planned state\n
plan_tag = \'%s_plan\' % invoice.getPath()\n
if invoice.getSimulationState() == \'draft\':\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=confirm_tag).Delivery_confirm()\n
tag=plan_tag).plan(comment=translateString(\'Initialised by Delivery Builder.\'))\n
else:\n
# call builder just same as after script of \'confirm\' transition\n
# call builder just same as after script of \'plan\' transition\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=confirm_tag).Delivery_expandAndBuild()\n
tag=plan_tag).Delivery_expandAndBuild()\n
\n
# First set the invoice in the building state on the causality workflow\n
invoice.startBuilding()\n
......@@ -136,10 +86,22 @@ invoice.startBuilding()\n
# Then an activity should put the causality state in diverged or solved\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
after_tag=confirm_tag).updateCausalityState()\n
]]></string> </value>
after_tag=plan_tag).updateCausalityState()\n
\n
# update casuality from movements\n
causality_list = invoice.getCausalityList()\n
causality_list.sort()\n
modified = 0\n
for movement in invoice.getMovementList(portal_type=\'Invoice Line\'):\n
movement_causality = movement.getCausality()\n
if movement_causality not in causality_list:\n
modified = 1\n
causality_list.append(movement_causality)\n
\n
if modified:\n
causality_list.sort()\n
invoice.setCausalityList(causality_list)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -51,6 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import translateString\n
from DateTime import DateTime\n
\n
payment_transaction = context\n
\n
......@@ -58,12 +59,29 @@ payment_transaction = context\n
if payment_transaction.getSimulationState() == "draft":\n
payment_transaction.plan(comment=translateString("Initialised by Delivery Builder."))\n
\n
if payment_transaction.getStartDate() is None:\n
payment_transaction.setStartDate(DateTime())\n
\n
# First set the payment transaction in the building state on the causality workflow\n
payment_transaction.startBuilding()\n
\n
# Then an activity should put the causality state in diverged or solved\n
payment_transaction.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))).updateCausalityState()\n
\n
# update casuality from movements\n
causality_list = payment_transaction.getCausalityList()\n
causality_list.sort()\n
modified = 0\n
for movement in payment_transaction.getMovementList():\n
movement_causality = movement.getCausality()\n
if movement_causality not in causality_list:\n
modified = 1\n
causality_list.append(movement_causality)\n
\n
if modified:\n
causality_list.sort()\n
payment_transaction.setCausalityList(causality_list)\n
</string> </value>
</item>
<item>
......
......@@ -50,20 +50,27 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>software_instance = state_change[\'object\']\n
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
\n
software_instance = state_change[\'object\']\n
# mark destroy is requested\n
portal = context.getPortalObject()\n
if software_instance.getPortalType() == "Software Instance":\n
software_instance.SoftwareInstance_destroySlaveInstanceRelated()\n
\n
software_instance.destroyRequested()\n
# deliver proper packing list\n
packing_list_line = context.SoftwareInstance_getInstanceDestroyPackingListLine(state_change)\n
\n
packing_list = packing_list_line.getParentValue()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
if portal.portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
packing_list.start()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
if portal.portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
packing_list.deliver()\n
\n
# revoke certificate\n
try:\n
context.getPortalObject().portal_certificate_authority\\\n
portal.portal_certificate_authority\\\n
.revokeCertificate(software_instance.getDestinationReference())\n
except ValueError:\n
# Ignore already revoked certificates, as OpenSSL backend is\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>from DateTime import DateTime\n
\n
portal = context.getPortalObject()\n
software_instance = state_change[\'object\']\n
software_release_url_string = state_change.kwargs[\'software_release\']\n
hosting_subscription_uid = state_change.kwargs[\'hosting_subscription_uid\']\n
\n
# Assertion: No packing list line should be related to this software instance\n
packing_list_line = software_instance.getAggregateRelatedValue(portal_type=\'Sale Packing List Line\')\n
if packing_list_line is not None:\n
raise ValueError("Software Instance %s is already associated to a packing list line" % software_instance.getRelativeurl())\n
\n
# Find a free computer partition. This means:\n
# Computer Partition which doesn\'t have non delivered sale packing list related\n
\n
software_release_document = context.portal_catalog.getResultValue(\n
portal_type=\'Software Release\',\n
url_string=software_release_url_string)\n
\n
# protect computer partition from being selected again\n
portal = context.getPortalObject()\n
\n
hosting_subscription = software_instance.portal_catalog.getResultValue(uid=hosting_subscription_uid)\n
\n
open_order = portal.portal_catalog.getResultValue(\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
computer_partition_relative_url = open_order.OpenSaleOrder_restrictMethodAsShadowUser(\n
open_order=open_order,\n
callable_object=open_order.OpenSaleOrder_findPartition,\n
argument_list=[software_release_url_string, software_instance.getSourceReference(),\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
\n
sale_packing_list_line = context.HostingSubscription_getInstancePackingListLine(state_change)\n
base_sale_packing_list = sale_packing_list_line.getParentValue()\n
# XXX: SoftwareInstance_createSalePackingList shall be used to create new Sale Packing List\n
sale_packing_list_module = portal.getDefaultModule(portal_type=\'Sale Packing List\')\n
\n
sale_packing_list = sale_packing_list_module.newContent(\n
portal_type=\'Sale Packing List\', \n
start_date=DateTime(),\n
specialise=base_sale_packing_list.getSpecialise() or base_sale_packing_list.getCausalityValue().getSpecialise(),\n
destination=base_sale_packing_list.getDestination(),\n
destination_section=base_sale_packing_list.getDestinationSection(),\n
destination_decision=base_sale_packing_list.getDestinationDecision(),\n
source=base_sale_packing_list.getSource(),\n
source_section=base_sale_packing_list.getSourceSection(),\n
price_currency=base_sale_packing_list.getPriceCurrency())\n
sale_packing_list_line = sale_packing_list.newContent(\n
portal_type=\'Sale Packing List Line\',\n
resource=context.portal_preferences.getPreferredInstanceSetupResource(),\n
aggregate_list=[software_instance.getRelativeUrl(), software_release_document.getRelativeUrl(), \n
computer_partition_relative_url, hosting_subscription.getRelativeUrl()]\n
)\n
\n
# confirm Sale Packing List\n
sale_packing_list.confirm()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_requestComputerPartition</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -63,6 +63,9 @@ service_relative_url = software_instance.portal_preferences.\\\n
getPreferredInstanceCleanupResource()\n
sale_packing_list = context.SoftwareInstance_createSalePackingList(state_change, service_relative_url, tag=tag)\n
sale_packing_list.confirm(activate_kw={\'tag\':tag})\n
\n
if software_instance.getPortalType() == "Software Instance":\n
software_instance.SoftwareInstance_requestDestroySlaveInstanceRelated()\n
]]></string> </value>
......
......@@ -121,13 +121,41 @@ if (request_software_instance is None):\n
**portal.Base_getNewSoftwareInstanceCoordinate()\n
)\n
request_software_instance.portal_workflow.doActionFor(request_software_instance, \'validate_action\')\n
sale_packing_list_line = context.SoftwareInstance_getInstanceSetupPackingListLine(state_change)\n
hosting_subscription_uid = sale_packing_list_line.getAggregateValue(portal_type=\'Hosting Subscription\').getUid()\n
request_software_instance.requestComputerPartition(\n
software_release=software_release_url_string,\n
hosting_subscription_uid=hosting_subscription_uid,\n
software_type=software_type,\n
tag=tag)\n
if state == "started":\n
request_software_instance.startRequested()\n
if state == "stopped":\n
request_software_instance.stopRequested()\n
setup_service_relative_url = portal.portal_preferences.getPreferredInstanceSetupResource()\n
packing_list_line = software_instance.getAggregateRelatedValue(portal_type="Sale Packing List Line")\n
subscription = packing_list_line.getAggregateValue(portal_type="Hosting Subscription")\n
software_release_document = context.portal_catalog.getResultValue(\n
portal_type=\'Software Release\',\n
url_string=software_release_url_string)\n
base_sale_packing_list = packing_list_line.getParentValue()\n
trade_condition = packing_list_line.getSpecialise(portal_type="Sale Trade Condition")\n
sale_order = portal.getDefaultModule(portal_type="Sale Order").newContent(\n
portal_type="Sale Order",\n
destination=base_sale_packing_list.getDestination(),\n
destination_section=base_sale_packing_list.getDestinationSection(),\n
destination_decision=base_sale_packing_list.getDestinationDecision(),\n
start_date=DateTime(),\n
received_date=DateTime(),\n
# XXX Hardcoded values\n
source="organisation_module/vifib_internet",\n
source_section="organisation_module/vifib_internet",\n
price_currency="currency_module/EUR",\n
activate_kw={\'tag\': tag},\n
)\n
\n
sale_order.setSpecialise(trade_condition, portal_type="Sale Trade Condition")\n
sale_order_line = sale_order.newContent(\n
portal_type="Sale Order Line",\n
resource=setup_service_relative_url,\n
quantity=1,\n
aggregate_value_list=[request_software_instance,subscription,software_release_document],\n
activate_kw={\'tag\': tag},\n
)\n
sale_order.order()\n
else:\n
# Update existing software instance\n
# Sale Packing List interaction has to be requested automatically with an interaction workflow\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>SoftwareInstance_requestComputerPartition</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>request_computer_partition</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string>SoftwareInstance_checkConsistency</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Request Computer Partition</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
325
\ No newline at end of file
350
\ No newline at end of file
vifib_base
\ No newline at end of file
vifib_base
vifib_simulation
\ No newline at end of file
......@@ -57,6 +57,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/usage</string>
</tuple>
</value>
</item>
......@@ -88,7 +89,192 @@
<key> <string>title</string> </key>
<value> <string>CPU Consumption</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175965.82</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176059.39</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176059.4</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -57,6 +57,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/usage</string>
</tuple>
</value>
</item>
......@@ -88,7 +89,192 @@
<key> <string>title</string> </key>
<value> <string>Memory Consumption</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175959.47</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176053.07</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176053.07</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -14,9 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -27,9 +25,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -40,9 +36,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -54,9 +48,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -92,9 +84,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -103,6 +95,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/configuration</string>
</tuple>
</value>
</item>
......@@ -131,6 +124,10 @@
</object>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>instance_cleanup</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......@@ -167,9 +164,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -177,7 +174,237 @@
<key> <string>title</string> </key>
<value> <string>Instance Cleanup</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="3.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175538.94</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</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>915.27378.64386.39116</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>1325175932.09</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176046.4</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176046.4</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -57,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -68,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/configuration</string>
</tuple>
</value>
</item>
......@@ -79,9 +80,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value>
<none/>
</value>
<value> <string>instance_hosting</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -102,9 +101,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -112,7 +111,237 @@
<key> <string>title</string> </key>
<value> <string>Instance Hosting</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="3.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175531.25</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</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>915.27378.55986.59357</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>1325175923.91</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176039.93</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176039.94</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -57,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -68,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/configuration</string>
</tuple>
</value>
</item>
......@@ -102,7 +103,7 @@
<string>Computer Partition</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
<string>Hosting Subscription</string>
</tuple>
</value>
</item>
......@@ -110,7 +111,192 @@
<key> <string>title</string> </key>
<value> <string>Instance Setup</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175915.59</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176033.17</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176033.18</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -14,9 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -27,9 +25,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -40,9 +36,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -54,9 +48,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -65,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -76,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/subscription</string>
</tuple>
</value>
</item>
......@@ -110,7 +103,7 @@
<string>Computer Partition</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
<string>Hosting Subscription</string>
</tuple>
</value>
</item>
......@@ -118,7 +111,192 @@
<key> <string>title</string> </key>
<value> <string>Instance Subscription</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175892.78</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176025.57</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176025.58</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -14,9 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -27,9 +25,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -40,9 +36,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -54,9 +48,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -65,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -76,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/configuration</string>
</tuple>
</value>
</item>
......@@ -108,9 +101,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -118,7 +111,237 @@
<key> <string>title</string> </key>
<value> <string>Instance Update</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="3.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175880.05</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</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>915.27384.43819.28723</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>1325175905.81</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176018.96</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176018.96</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -106,7 +106,192 @@
<key> <string>title</string> </key>
<value> <string>Software Setup</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175865.26</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176012.04</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176012.05</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -14,9 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -27,9 +25,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -40,9 +36,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -54,26 +48,22 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>aggregated_portal_type</string> </key>
<value>
<tuple>
<string>Usage Report</string>
</tuple>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>product_line/service/80000000</string>
<string>quantity_unit/volume/cubic_meter</string>
<string>product_line/cloud/usage</string>
</tuple>
</value>
</item>
......@@ -111,6 +101,12 @@
<key> <string>title</string> </key>
<value> <string>Usage Report</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
......@@ -132,4 +128,183 @@
</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</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>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>915.27360.39415.51234</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175734.94</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="5.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175998.94</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="5.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175998.94</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -127,9 +127,7 @@
</item>
<item>
<key> <string>preferred_payzen_integration_site</string> </key>
<value>
<none/>
</value>
<value> <string>portal_integrations/vifib_payzen_integration</string> </value>
</item>
<item>
<key> <string>preferred_software_setup_resource</string> </key>
......
87
\ No newline at end of file
91
\ No newline at end of file
service_module/cpu_consumption
service_module/memory_consumption
service_module/vifib_instance_cleanup
service_module/vifib_instance_hosting
service_module/vifib_instance_setup
service_module/vifib_instance_subscription
service_module/vifib_instance_update
service_module/vifib_software_setup
service_module/vifib_usage_report
\ No newline at end of file
......@@ -114,9 +114,7 @@
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
......
......@@ -50,7 +50,6 @@
<value>
<tuple>
<string>trade_phase/vifib/accounting</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
<string>source/account_module/sales</string>
<string>destination/account_module/purchase</string>
</tuple>
......
......@@ -50,7 +50,6 @@
<value>
<tuple>
<string>trade_phase/vifib/accounting</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
<string>source/account_module/receivable</string>
<string>destination/account_module/payable</string>
</tuple>
......
......@@ -114,9 +114,7 @@
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
......
......@@ -70,7 +70,6 @@
<value>
<tuple>
<string>trade_phase/vifib/delivery</string>
<string>trade_date/trade_phase/vifib/order</string>
<string>end_of/day</string>
</tuple>
</value>
......
......@@ -49,7 +49,6 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_date/trade_phase/vifib/delivery</string>
<string>trade_phase/vifib/invoicing</string>
</tuple>
</value>
......
......@@ -50,7 +50,6 @@
<value>
<tuple>
<string>trade_phase/vifib/order</string>
<string>trade_date/trade_phase/vifib/order</string>
</tuple>
</value>
</item>
......
......@@ -115,9 +115,7 @@
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -149,6 +147,14 @@
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>pay</string> </value>
......
......@@ -52,7 +52,6 @@
<string>trade_phase/vifib/payment</string>
<string>source/account_module/receivable</string>
<string>destination/account_module/payable</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
</tuple>
</value>
</item>
......
......@@ -52,7 +52,6 @@
<string>trade_phase/vifib/payment</string>
<string>source/account_module/bank</string>
<string>destination/account_module/bank</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
<string>source_payment/organisation_module/vifib_internet/bank_account</string>
</tuple>
</value>
......
......@@ -109,7 +109,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>PaymentTransaction_selectMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -37,13 +37,10 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>source_payment</string>
<string>destination_payment</string>
<string>source_section</string>
<string>destination_section</string>
<string>payment_mode</string>
<string>resource</string>
<string>specialise</string>
</tuple>
</value>
</item>
......
......@@ -27,7 +27,7 @@
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -41,6 +41,9 @@
<string>destination</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment*</string>
<string>specialise</string>
</tuple>
</value>
</item>
......@@ -48,6 +51,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -10,7 +10,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delivery_causality_assignement_movement_group_on_delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -34,7 +34,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivery Causality Assignement Movement Group On Delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Movement Group" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,7 +11,7 @@
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -23,7 +23,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
<value> <string>property_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -44,7 +44,11 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
<value> <string>property_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,7 +112,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>PurchaseOrder_selectMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -126,7 +126,7 @@
</item>
<item>
<key> <string>delivery_select_method_id</string> </key>
<value> <string>VifibInvoiceBuilder_selectPlannedSaleInvoiceList</string> </value>
<value> <string>VifibDeliveryBuilder_selectPlannedDeliveryList</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -148,7 +148,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>SaleInvoiceTransaction_selectPackingListMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -27,7 +27,7 @@
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -37,21 +37,10 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>delivery_mode</string>
<string>incoterm</string>
<string>source</string>
<string>destination</string>
<string>source_section</string>
<string>destination_section</string>
<string>source_decision</string>
<string>destination_decision</string>
<string>source_administration</string>
<string>destination_administration</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment</string>
<string>price_currency</string>
</tuple>
</value>
......@@ -60,6 +49,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -37,6 +37,7 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>resource</string>
<string>aggregate</string>
<string>quantity_unit</string>
......@@ -46,6 +47,16 @@
<string>destination_function</string>
<string>source_account</string>
<string>destination_account</string>
<string>source_decision</string>
<string>destination_decision</string>
<string>source_administration</string>
<string>destination_administration</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment</string>
<string>delivery_mode</string>
<string>incoterm</string>
</tuple>
</value>
</item>
......@@ -53,6 +64,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -10,7 +10,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delivery_causality_assignement_movement_group_on_delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -34,7 +34,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivery Causality Assignement Movement Group On Delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Movement Group" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -38,6 +38,8 @@
<value>
<tuple>
<string>description</string>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
......@@ -47,6 +49,10 @@
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -143,7 +143,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>SaleInvoiceTransaction_selectInvoiceMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -37,6 +37,7 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>resource</string>
<string>source</string>
<string>destination</string>
......@@ -52,6 +53,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
60
\ No newline at end of file
82
\ No newline at end of file
account_module/bank
account_module/capital
account_module/coll_vat
account_module/equipments
account_module/inventories
account_module/payable
account_module/profit_loss
account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
portal_rules/new_invoice_simulation_rule
portal_rules/new_invoice_simulation_rule/**
portal_rules/new_delivery_simulation_rule
portal_rules/new_delivery_simulation_rule/**
portal_rules/new_delivery_root_simulation_rule
portal_rules/new_delivery_root_simulation_rule/**
portal_rules/new_invoice_transaction_simulation_rule
portal_rules/new_invoice_transaction_simulation_rule/**
portal_rules/new_invoice_root_simulation_rule
portal_rules/new_invoice_root_simulation_rule/**
portal_rules/new_order_root_simulation_rule
portal_rules/new_order_root_simulation_rule/**
portal_rules/default_subscription_item_rule
portal_rules/default_subscription_item_rule/**
portal_rules/new_payment_simulation_rule
portal_rules/new_payment_simulation_rule/**
\ No newline at end of file
##############################################################################
###############################################################################
#
# Copyright (c) 2002-2011 Nexedi SA and Contributors. All Rights Reserved.
#
......@@ -75,6 +75,74 @@ def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
# Restore the original user.
setSecurityManager(sm)
def SoftwareInstance_requestDestroySlaveInstanceRelated(self):
""" request destroy all Slave Instance allocated in the Computer Partition
related to the Software Instance """
sm = getSecurityManager()
portal = self.getPortalObject()
service_relative_url = portal.portal_preferences.getPreferredInstanceCleanupResource()
newSecurityManager(None, portal.acl_users.getUserById(
self.getReference()))
computer_partition_relative_url = self.getAggregateRelatedValue(
"Sale Packing List Line").getAggregate(portal_type="Computer Partition")
portal_preferences = portal.portal_preferences
service_uid_list = [
portal.restrictedTraverse(portal_preferences.getPreferredInstanceHostingResource()).getUid(),
portal.restrictedTraverse(portal_preferences.getPreferredInstanceSetupResource()).getUid(),
]
try:
result_list = self.portal_catalog(portal_type="Sale Packing List Line",
aggregate_portal_type="Slave Instance",
computer_partition_relative_url=computer_partition_relative_url,
default_resource_uid=service_uid_list)
slave_instance_list = [line.getAggregateValue(portal_type="Slave Instance") for line in result_list]
uid_list = []
for slave_instance in slave_instance_list:
slave_instance_uid = slave_instance.getUid()
if slave_instance_uid in uid_list:
continue
cleanup_packing_list = self.portal_catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=slave_instance.getRelativeUrl(),
resource_relative_url=service_relative_url,
limit=1,
)
if len(cleanup_packing_list) == 0:
uid_list.append(slave_instance_uid)
slave_instance.requestDestroyComputerPartition()
finally:
# Restore the original user.
setSecurityManager(sm)
def SoftwareInstance_destroySlaveInstanceRelated(self):
""" destroy all Slave Instance allocated in the Computer Partition
related to the Software Instance """
sm = getSecurityManager()
newSecurityManager(None, self.getPortalObject().acl_users.getUserById(
self.getReference()))
portal = self.getPortalObject()
portal_preferences = portal.portal_preferences
computer_partition_relative_url = self.getAggregateRelatedValue(
"Sale Packing List Line").getAggregate(portal_type="Computer Partition")
simulation_state = ["confirmed"]
service_uid_list = [
portal.restrictedTraverse(portal_preferences.getPreferredInstanceCleanupResource()).getUid(),
]
try:
result_list = self.portal_catalog(portal_type="Sale Packing List Line",
aggregate_portal_type="Slave Instance",
computer_partition_relative_url=computer_partition_relative_url,
simulation_state=simulation_state,
default_resource_uid=service_uid_list)
slave_instance_list = [line.getAggregateValue(portal_type="Slave Instance") for line in result_list]
# restore the original user to destroy each Slave Instance
setSecurityManager(sm)
for slave_instance in slave_instance_list:
slave_instance.destroyComputerPartition()
finally:
# Restore the original user.
setSecurityManager(sm)
def getComputerSecurityCategory(self, base_category_list, user_name,
object, portal_type):
"""
......
<local_roles_item>
<local_roles>
<role id='R-MEMBER'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='superluke'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -9,6 +9,7 @@
</role>
<role id='R-INSTANCE'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
......
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-INSTANCE'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
<item>Author</item>
......
......@@ -9,7 +9,7 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<role id='Auditor; Author'>
<property id='title'>Instance</property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>role</multi_property>
......
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Instance</property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor; Author'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
......
......@@ -15,9 +15,14 @@
<property id='base_category_script'>ERP5Type_acquireSecurityFromOwner</property>
<multi_property id='base_category'>source</multi_property>
</role>
<role id='Assignee'>
<property id='title'>Slave Instance related by Software Instance</property>
<role id='Assignor'>
<property id='title'>Slave Instance related by Hosting Subscription</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAggregateMovementItemByHostingSubscription</property>
<multi_property id='base_category'>aggregate</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Software Instance which provides this Slave Instance</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromSoftwareInstance</property>
<multi_property id='base_category'>source</multi_property>
<multi_property id='base_category'>aggregate</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -72,8 +72,11 @@ state_list = portal.getPortalCurrentInventoryStateList() + \\\n
portal.getPortalReservedInventoryStateList() + \\\n
portal.getPortalTransitInventoryStateList()\n
\n
resource_list = [portal.portal_preferences.getPreferredInstanceSetupResource(),\n
portal.portal_preferences.getPreferredInstanceHostingResource()]\n
\n
sale_packing_list_line = portal.portal_catalog.getResultValue(\n
resource_relative_url=portal.portal_preferences.getPreferredInstanceHostingResource(),\n
resource_relative_url=resource_list,\n
aggregate_uid=obj.getUid(),\n
portal_type="Sale Packing List Line",\n
simulation_state=state_list)\n
......@@ -91,15 +94,28 @@ query = ComplexQuery(\n
Query(aggregate_relative_url=software_release.getRelativeUrl()),\n
operator="AND",\n
)\n
\n
catalog_result = portal.portal_catalog(portal_type="Sale Packing List Line",\n
aggregate_portal_type="Slave Instance",\n
aggregate_relative_url=obj.getRelativeUrl(),\n
simulation_state=state_list,\n
aggregate_relative_url=query,\n
limit=1,\n
query=query,\n
)\n
for sale_packing_list_line in catalog_result:\n
software_instance = sale_packing_list_line.getAggregateValue(\n
portal_type="Software Instance")\n
if software_instance is not None:\n
return {"Auditor": [software_instance.getReference(),]}\n
\n
if len(catalog_result) == 0:\n
return catalog_result\n
\n
packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type="Sale Packing List Line",\n
aggregate_portal_type="Software Instance",\n
simulation_state=state_list,\n
query=query,)\n
\n
if packing_list_line is not None:\n
software_instance = packing_list_line.getAggregateValue(\n
portal_type="Software Instance")\n
return {"Auditor": [software_instance.getReference(),]}\n
\n
return category_list\n
</string> </value>
......
......@@ -89,7 +89,7 @@ catalog_result = portal.portal_catalog(portal_type=movement_portal_type,\n
for item in catalog_result:\n
software_instance = item.getAggregateValue(portal_type="Software Instance")\n
if software_instance is not None:\n
return {"Assignee": [software_instance.getReference(),]}\n
return [{"aggregate": [software_instance.getRelativeUrl()]}]\n
</string> </value>
</item>
<item>
......
......@@ -2,39 +2,25 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Causality Movement Group" module="erp5.portal_type"/>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
</tuple>
</value>
<key> <string>_function</string> </key>
<value> <string>SoftwareInstance_destroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<key> <string>_module</string> </key>
<value> <string>VifibSecurity</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Causality Movement Group</string> </value>
<value> <string>SoftwareInstance_destroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality_movement_group_on_delivery</string> </value>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
......
<?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>SoftwareInstance_requestDestroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>VifibSecurity</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_requestDestroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
vifib_data_simulation
\ No newline at end of file
vifib_data_simulation
vifib_data_payzen
\ No newline at end of file
310
\ No newline at end of file
327
\ No newline at end of file
......@@ -47,6 +47,7 @@ person_module/test_vifib_user_developer
portal_contributions
portal_gadgets
portal_integrations
portal_integrations/vifib_payzen_integration
product_module
purchase_order_module
purchase_packing_list_module
......
......@@ -12,8 +12,8 @@ account_module/refundable_vat
account_module/sales
accounting_module
business_process_module
business_process_module/vifib_sale_business_process
business_process_module/vifib_purchase_business_process
business_process_module/vifib_sale_business_process
campaign_module
component_module
computer_module
......@@ -47,6 +47,7 @@ person_module/test_vifib_user_developer
portal_contributions
portal_gadgets
portal_integrations
portal_integrations/vifib_payzen_integration
product_module
purchase_order_module
purchase_packing_list_module
......
......@@ -2,93 +2,94 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_registerPlannedPaymentTransactionPayzen</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
<key> <string>id</string> </key>
<value> <string>register_planned_payment_transaction_payzen</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<key> <string>periodicity_hour</string> </key>
<value>
<list>
<string>SoftwareInstance_requestStopSlaveInstanceListFromComputerPartition</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>guard</string> </key>
<key> <string>periodicity_month</string> </key>
<value>
<none/>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_destroy</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<key> <string>periodicity_month_day</string> </key>
<value>
<list>
<string>destroyComputerPartition</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<key> <string>periodicity_start_date</string> </key>
<value>
<list>
<string>Software Instance</string>
</list>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1288051200.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
<key> <string>sense_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
<key> <string>title</string> </key>
<value> <string>Register planned Payment Transaction in payzen</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
for payment_transaction in portal.portal_catalog(\n
portal_type="Payment Transaction", \n
simulation_state="planned",\n
limit=10\n
):\n
# do not trust catalog\n
if payment_transaction.getSimulationState() == \'planned\':\n
payment_transaction.PaymentTransaction_registerPayzen()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_registerPlannedPaymentTransactionPayzen</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
48
\ No newline at end of file
49
\ No newline at end of file
portal_alarms/payzen_update_confirmed_payment_transaction
\ No newline at end of file
portal_alarms/payzen_update_confirmed_payment_transaction
portal_alarms/register_planned_payment_transaction_payzen
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jump</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jump</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_related_usage_report_list</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Usage Reports</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string encoding="cdata"><![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=causality&portal_type=Usage+Report
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,86 +2,88 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_stopPlannedSaleInvoiceTransaction</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<key> <string>description</string> </key>
<value>
<tuple>
<string>action_type/object_jump</string>
</tuple>
<none/>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jump</string> </value>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
<key> <string>id</string> </key>
<value> <string>stop_planned_sale_invoice_transaction</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<key> <string>periodicity_hour</string> </key>
<value>
<none/>
<tuple/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_related_usage_report_list</string> </value>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<key> <string>periodicity_month</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>3660.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Usage Reports</string> </value>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string encoding="cdata"><![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=causality&portal_type=Usage+Report
]]></string> </value>
<key> <string>title</string> </key>
<value> <string>Stop planned Sale Invoices before current month</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -51,19 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
\n
build_before = None\n
if params is not None:\n
build_before = params.get(\'build_before\', None)\n
kw = {\'build_before\':build_before}\n
else:\n
kw = {}\n
\n
for business_process in [\n
portal.business_process_module.vifib_sale_business_process,\n
portal.business_process_module.vifib_purchase_business_process]:\n
for link in business_process.contentValues(portal_type="Business Link"):\n
link.build(**kw)\n
link.build()\n
</string> </value>
</item>
<item>
......
<?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 encoding="cdata"><![CDATA[
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate\n
\n
portal = context.getPortalObject()\n
this_month = getClosestDate(target_date=DateTime())\n
for sale_invoice_transaction in portal.portal_catalog(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\',\n
limit=10,\n
**{"delivery.start_date": \'< %s\' % this_month}\n
):\n
if sale_invoice_transaction.getSimulationState() == \'planned\' and sale_invoice_transaction.getStartDate() < this_month:\n
# do not trust catalog\n
sale_invoice_transaction.confirm()\n
sale_invoice_transaction.start()\n
sale_invoice_transaction.stop()\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_stopPlannedSaleInvoiceTransaction</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -52,8 +52,11 @@
<key> <string>_body</string> </key>
<value> <string>computer = state_change[\'object\']\n
for computer_partition in [x for x in computer.contentValues(portal_type=\'Computer Partition\') if x.getSlapState() == \'busy\']:\n
# raises ValueError in case of no packing list found, left as is\n
packing_list_line = computer_partition.Item_getInstancePackingListLine()\n
try:\n
packing_list_line = computer_partition.Item_getInstancePackingListLine()\n
except ValueError:\n
# no need to bang trees without any delivery line\n
continue\n
software_instance = packing_list_line.getAggregateValue(portal_type=\'Software Instance\')\n
software_instance.activate().SoftwareInstance_bangAsSelf(reference=software_instance.getReference(),\n
comment=state_change.kwargs.get(\'comment\', \'\'))\n
......
......@@ -28,7 +28,7 @@
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>SoftwareInstance_requestStopSlaveInstanceListFromComputerPartition</string>
<string>SlaveInstance_requestUpdate</string>
</list>
</value>
</item>
......@@ -45,30 +45,32 @@
<item>
<key> <string>guard</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_requestDestroy</string> </value>
<value> <string>SlaveInstance_requestUpdateOnChange</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>requestDestroyComputerPartition</string>
<string>_setTitle</string>
<string>_setSourceReference</string>
<string>_setTextContent</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Software Instance</string>
<string>Slave Instance</string>
</list>
</value>
</item>
......@@ -80,7 +82,7 @@
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -93,4 +95,32 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: len(here.checkConsistency()) == 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -75,7 +75,6 @@ query = ComplexQuery(computer_partition_query, \n
\n
return portal.portal_catalog(portal_type=\'Sale Packing List Line\',\n
default_resource_uid=service_uid_list,\n
sort_on=((\'movement.start_date\', \'DESC\'),),\n
query=query, **kw)\n
</string> </value>
</item>
......
......@@ -75,7 +75,7 @@ else:\n
\n
# Deliver all SPL related to this software instance\n
isTransitionPossible = context.portal_workflow.isTransitionPossible\n
software_instance = current_delivery_line.getAggregateValue(portal_type="Software Instance")\n
software_instance = current_delivery_line.getAggregateValue(portal_type=["Software Instance", "Slave Instance"])\n
for sale_packing_list_line in portal.portal_catalog(\n
portal_type="Sale Packing List Line", \n
default_aggregate_uid=software_instance.getUid(),\n
......
......@@ -51,22 +51,21 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
accounting_module = portal.getDefaultModule(\'Sale Invoice Transaction\')\n
count_result_kw = dict(portal_type="Sale Packing List Line",\n
aggregate_uid=state_change["object"].getUid(),\n
limit=1)\n
\n
invoice = accounting_module.searchFolder(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\')\n
\n
return invoice\n
if len(portal.portal_catalog(**count_result_kw)) == 1:\n
state_change[\'object\'].requestUpdateComputerPartition()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibInvoiceBuilder_selectPlannedSaleInvoiceList</string> </value>
<value> <string>SlaveInstance_requestUpdate</string> </value>
</item>
</dictionary>
</pickle>
......
484
\ No newline at end of file
489
\ No newline at end of file
Computer Partition | jump_to_related_usage_report_list
System Preference | vifib_preference
Virtio Partition | jump_to_related_usage_report_list
Virtio Partition | view
\ No newline at end of file
portal_alarms/confirm_ordered_sale_order
portal_alarms/confirm_ordered_sale_order/**
portal_alarms/stop_planned_sale_invoice_transaction
portal_alarms/stop_planned_sale_invoice_transaction/**
portal_alarms/vifib_trigger_build
portal_alarms/vifib_trigger_build/**
\ No newline at end of file
......@@ -536,28 +536,34 @@ class SlapTool(BaseTool):
setup_service = portal.restrictedTraverse(
portal_preferences.getPreferredInstanceSetupResource())
hosting_query = ComplexQuery(Query(aggregate_portal_type="Slave Instance"),
Query(aggregate_relative_url=computer_partition_document.getRelativeUrl()),
# Search only for Confirmed and Stopped, the only one states that require
# buildout be re-updated.
Query(simulation_state=["confirmed", "stopped"]),
update_service = portal.restrictedTraverse(
portal_preferences.getPreferredInstanceUpdateResource())
global_query_kw = dict(aggregate_portal_type="Slave Instance",
aggregate_relative_url=computer_partition_document.getRelativeUrl(),)
hosting_query = ComplexQuery(Query(simulation_state=["confirmed", "stopped"]),
Query(default_resource_uid=hosting_service.getUid()),
operator="AND")
setup_query = ComplexQuery(Query(aggregate_portal_type="Slave Instance"),
Query(aggregate_relative_url=computer_partition_document.getRelativeUrl()),
Query(simulation_state=["confirmed", "started"]),
setup_query = ComplexQuery(Query(simulation_state=["confirmed", "started"]),
Query(default_resource_uid=setup_service.getUid()),
operator="AND")
query = ComplexQuery(hosting_query, setup_query, operator="OR")
update_query = ComplexQuery(Query(simulation_state=["confirmed"]),
Query(default_resource_uid=update_service.getUid()),
operator="AND")
query = ComplexQuery(hosting_query,
setup_query,
update_query,
operator="OR")
# Use getTrackingList
catalog_result = portal.portal_catalog(
portal_type='Sale Packing List Line',
sort_on=(('movement.start_date', 'DESC'),),
limit=1,
query=query)
query=query, **global_query_kw)
return len(catalog_result)
......
......@@ -220,17 +220,6 @@ class testVifibMixin(ERP5TypeTestCase):
start_date=start_date, stop_date=stop_date)
accounting_period.start()
def prepareTestServices(self):
isTransitionPossible = self.portal.portal_workflow.isTransitionPossible
for service in self.portal.portal_catalog(
portal_type="Service",
id="vifib_%",
):
service = service.getObject()
if isTransitionPossible(service, 'validate'):
service.validate()
def setupVifibMachineAuthenticationPlugin(self):
"""Sets up Vifib Authentication plugin"""
pas = self.getPortal().acl_users
......@@ -293,7 +282,6 @@ class testVifibMixin(ERP5TypeTestCase):
self.setPreference()
self.prepareTestUsers()
self.prepareVifibAccountingPeriod()
self.prepareTestServices()
transaction.commit()
self.tic()
self.logout()
......
import unittest
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.DateUtils import getClosestDate, addToDate
from testVifibSlapWebService import TestVifibSlapWebServiceMixin
from DateTime.DateTime import DateTime
from Products.ERP5Type.DateUtils import getClosestDate
from DateTime import DateTime
from testVifibOpenOrderSimulation import generateTimeFrameList
class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
def stepBuildOneMoreSalePackingList(self, sequence, **kw):
build_before = sequence.get('build_before')
self.portal.portal_alarms.vifib_trigger_build.activeSense()
if build_before is None:
build_before = getClosestDate(
target_date=DateTime(), precision='month', before=0)
self.portal.portal_alarms.build_deliver_path.activeSense()
else:
build_before = addToDate(build_before, month=1)
self.portal.portal_alarms.build_deliver_path.activeSense(
params={'build_before':build_before})
sequence.edit(build_before=build_before)
def stepTriggerNextBuild(self, sequence, **kw):
sequence.edit(
number_of_sale_packing_list=sequence.get(
'number_of_sale_packing_list', 0) + 1,
number_of_invoice=sequence.get('number_of_invoice', 0) + 1,
number_of_payment=sequence.get('number_of_payment', 0) + 1
)
def stepTriggerBuild(self, sequence, **kw):
self.portal.portal_alarms.vifib_trigger_build.activeSense()
def stepCheckOneMoreDocumentList(self, sequence, **kw):
hosting_subscription = self.portal.portal_catalog\
.getResultValue(uid=sequence['hosting_subscription_uid'])
sale_packing_list_list = self.portal.portal_catalog(
def stepCheckSubscriptionSalePackingListCoverage(self, sequence, **kw):
hosting_subscription = self.portal.portal_catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
delivery_list = self.portal.portal_catalog(
portal_type='Sale Packing List',
causality_relative_url=hosting_subscription.getRelativeUrl(),
sort_on=(('delivery.start_date', "DESC")))
sort_on=(('delivery.start_date', 'desc'),)
)
# is whole year covered?
self.assertEqual(12, len(delivery_list))
self.assertEqual(sequence['number_of_sale_packing_list'],
len(sale_packing_list_list))
# generate the expected time frames
now = DateTime()
start_date = \
getClosestDate(target_date=now, precision='day', before=1)
sale_packing_list = sale_packing_list_list[0].getObject()
sale_invoice_transaction_list = sale_packing_list\
.getCausalityRelatedValueList(portal_type='Sale Invoice Transaction')
self.assertEqual(1, len(sale_invoice_transaction_list))
sale_invoice_transaction = sale_invoice_transaction_list[0]
# Calculate the list of time frames
expected_time_frame_list = generateTimeFrameList(start_date)
payment_transaction_list = sale_invoice_transaction\
.getCausalityRelatedValueList(portal_type='Payment Transaction')
self.assertEqual(1, len(payment_transaction_list))
payment_transaction = payment_transaction_list[0]
idx = 0
for delivery in delivery_list:
expected_start_date = expected_time_frame_list[idx]
expected_stop_date = expected_time_frame_list[idx+1]
self.assertEqual(expected_start_date, delivery.getStartDate())
self.assertEqual(expected_stop_date, delivery.getStopDate())
self.assertEqual(hosting_subscription.getRelativeUrl(),
delivery.getCausality())
delivery_line_list = \
delivery.contentValues(portal_type="Sale Packing List Line")
self.assertEquals(1, len(delivery_line_list))
delivery_line = delivery_line_list[0]
self.assertEquals("organisation_module/vifib_internet",
delivery.getSource())
self.assertEquals("organisation_module/vifib_internet",
delivery.getSourceSection())
self.assertEquals("person_module/test_vifib_customer",
delivery.getDestination())
self.assertEquals("person_module/test_vifib_customer",
delivery.getDestinationSection())
self.assertEquals("currency_module/EUR",
delivery.getPriceCurrency())
# check sale packing list line related property
self.assertEquals("service_module/vifib_instance_subscription",
delivery_line.getResource())
self.assertEquals(1,
delivery_line.getQuantity())
self.assertEquals("unit/piece",
delivery_line.getQuantityUnit())
self.assertEquals(1,
delivery_line.getPrice())
# fetch open order, open order line and subscription
person = self.portal.person_module['test_vifib_customer']
open_order = \
person.getDestinationDecisionRelatedValue(portal_type="Open Sale Order")
open_order_line = \
open_order.contentValues(portal_type="Open Sale Order Line")[0]
# check related property
self.assertEquals(open_order_line.getSpecialise(),
delivery.getSpecialise())
idx += 1
def stepCheckHostingSubscriptionInitialDocumentCoverage(self, sequence, **kw):
catalog = self.portal.portal_catalog
hosting_resource = self.portal.portal_preferences\
.getPreferredInstanceHostingResource()
setup_resource = self.portal.portal_preferences\
.getPreferredInstanceSetupResource()
subscription_resource = self.portal.portal_preferences\
.getPreferredInstanceSubscriptionResource()
sequence.edit(
current_sale_packing_list=sale_packing_list,
current_sale_invoice_transaction=sale_invoice_transaction,
current_payment_transaction=payment_transaction
hosting_resource=hosting_resource,
setup_resource=setup_resource,
subscription_resource=subscription_resource
)
hosting_subscription = catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
hosting_subscription_url = hosting_subscription.getRelativeUrl()
# hosting is confirmed, so no invoice
hosting_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=hosting_resource)
self.assertEqual(1, len(hosting_delivery_line_list))
self.assertEqual('confirmed', hosting_delivery_line_list[0]\
.getSimulationState())
hosting_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=hosting_resource)
self.assertEqual(0, len(hosting_invoice_line_list))
# setup is stopped, and has there is invoice
setup_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=setup_resource)
self.assertEqual(1, len(setup_delivery_line_list))
self.assertEqual('stopped', setup_delivery_line_list[0]\
.getSimulationState())
setup_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=setup_resource)
self.assertEqual(1, len(setup_invoice_line_list))
self.assertEqual('planned', setup_invoice_line_list[0]\
.getSimulationState())
# there are 12 confirmed subscription, so no invoice
subscription_delivery_line_list = catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=subscription_resource,
sort_on=(('movement.start_date', 'desc'),)
)
self.assertEqual(12, len(subscription_delivery_line_list))
self.assertEqual(['confirmed'] * 12, [q.getSimulationState() for \
q in subscription_delivery_line_list])
subscription_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=subscription_resource)
self.assertEqual(0, len(subscription_invoice_line_list))
# invoice shall be solved
invoice = setup_invoice_line_list[0].getParentValue()
self.assertEqual('solved', invoice.getCausalityState())
# invoice shall have causality of one packing list
self.assertEqual(
[setup_delivery_line_list[0].getParentValue().getUid()],
invoice.getCausalityUidList())
# there shall be no payment transaction related
self.assertEqual([], invoice.getCausalityRelatedList(
portal_type='Payment Transaction'))
sequence.edit(
subscription_delivery_uid_list=[q.getParentValue().getUid() for q in \
subscription_delivery_line_list]
)
def stepSelectNextSubscriptionDelivery(self, sequence, **kw):
subscription_delivery_uid_list = sequence['subscription_delivery_uid_list']
subscription_delivery_uid_list.reverse()
subscription_delivery_uid = subscription_delivery_uid_list.pop()
subscription_delivery_uid_list.reverse()
sequence.edit(
subscription_delivery_uid_list=subscription_delivery_uid_list,
subscription_delivery_uid=subscription_delivery_uid
)
def stepStartSubscriptionDelivery(self, sequence, **kw):
self.portal.portal_catalog.getResultValue(
uid=sequence['subscription_delivery_uid']).start()
def stepStopSubscriptionDelivery(self, sequence, **kw):
self.portal.portal_catalog.getResultValue(
uid=sequence['subscription_delivery_uid']).stop()
def stepCheckHostingSubscriptionStoppedDocumentCoverage(self, sequence, **kw):
catalog = self.portal.portal_catalog
hosting_subscription = catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
hosting_subscription_url = hosting_subscription.getRelativeUrl()
# hosting is confirmed, so no invoice
hosting_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(1, len(hosting_delivery_line_list))
self.assertEqual('confirmed', hosting_delivery_line_list[0]\
.getSimulationState())
hosting_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(0, len(hosting_invoice_line_list))
# setup is stopped, and has there is invoice
setup_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_delivery_line_list))
self.assertEqual('stopped', setup_delivery_line_list[0]\
.getSimulationState())
setup_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_invoice_line_list))
self.assertEqual('planned', setup_invoice_line_list[0]\
.getSimulationState())
# there are 11 confirmed and 1 stopped subscription, so 1 invoice line
subscription_delivery_line_list = catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(12, len(subscription_delivery_line_list))
self.assertEqual((['confirmed'] * 11) + ['stopped'],
sorted([q.getSimulationState() for \
q in subscription_delivery_line_list]))
subscription_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(1, len(subscription_invoice_line_list))
self.assertEqual('planned', subscription_invoice_line_list[0]\
.getSimulationState())
# there are two invoice lines sharing same invoice
self.assertEqual(
setup_invoice_line_list[0].getParentValue().getRelativeUrl(),
subscription_invoice_line_list[0].getParentValue().getRelativeUrl()
)
# invoice shall be solved
self.assertEqual('solved', setup_invoice_line_list[0].getCausalityState())
# invoice shall have causality of two packing lists
self.assertEqual(
sorted([setup_delivery_line_list[0].getParentValue().getUid()] +
[q.getParentValue().getUid() for q in subscription_delivery_line_list if q.getSimulationState() == 'stopped']),
sorted(setup_invoice_line_list[0].getParentValue().getCausalityUidList()))
def stepSelectPlannedInvoice(self, sequence, **kw):
hosting_subscription = self.portal.portal_catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
invoice_line = self.portal.portal_catalog.getResultValue(
portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription.getRelativeUrl(),
simulation_state='planned'
)
# there shall be no payment transaction related
self.assertEqual([], invoice_line.getParentValue().getCausalityRelatedList(
portal_type='Payment Transaction'))
sequence.edit(invoice_uid=invoice_line.getParentValue().getUid())
def stepConfirmInvoice(self, sequence, **kw):
self.portal.portal_catalog.getResultValue(
uid=sequence['invoice_uid']).confirm()
def stepCheckHostingSubscriptionConfirmedInvoiceDocumentCoverage(self,
sequence, **kw):
catalog = self.portal.portal_catalog
hosting_subscription = catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
hosting_subscription_url = hosting_subscription.getRelativeUrl()
# hosting is confirmed, so no invoice
hosting_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(1, len(hosting_delivery_line_list))
self.assertEqual('confirmed', hosting_delivery_line_list[0]\
.getSimulationState())
hosting_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(0, len(hosting_invoice_line_list))
# setup is stopped, and has there is invoice
setup_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_delivery_line_list))
self.assertEqual('stopped', setup_delivery_line_list[0]\
.getSimulationState())
setup_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_invoice_line_list))
self.assertEqual('confirmed', setup_invoice_line_list[0]\
.getSimulationState())
# there are 10 confirmed and 2 stopped subscription, so 2 invoice line
subscription_delivery_line_list = catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(12, len(subscription_delivery_line_list))
self.assertEqual((['confirmed'] * 10) + (['stopped'] * 2),
sorted([q.getSimulationState() for \
q in subscription_delivery_line_list]))
subscription_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(2, len(subscription_invoice_line_list))
self.assertEqual(['confirmed', 'planned'],
sorted([q.getSimulationState() for q in subscription_invoice_line_list]))
# there are three invoice lines, where two share same invoice
# and other is on new one
self.assertEqual(
setup_invoice_line_list[0].getParentValue().getRelativeUrl(),
[q.getParentValue().getRelativeUrl() for q in \
subscription_invoice_line_list \
if q.getSimulationState() == 'confirmed'][0]
)
self.assertNotEqual(
setup_invoice_line_list[0].getParentValue().getRelativeUrl(),
[q.getParentValue().getRelativeUrl() for q in \
subscription_invoice_line_list \
if q.getSimulationState() == 'planned'][0]
)
confirmed_invoice = setup_invoice_line_list[0].getParentValue()
planned_invoice = [q.getParentValue() for q in \
subscription_invoice_line_list \
if q.getSimulationState() == 'planned'][0]
# invoices shall be solved
self.assertEqual('solved', planned_invoice.getCausalityState())
self.assertEqual('solved', confirmed_invoice.getCausalityState())
# there shall be no payment transaction related
self.assertEqual([], planned_invoice.getCausalityRelatedList(
portal_type='Payment Transaction'))
self.assertEqual([], confirmed_invoice.getCausalityRelatedList(
portal_type='Payment Transaction'))
# confirmed invoice shall have causality of two packing lists
self.assertEqual(
sorted([setup_delivery_line_list[0].getParentValue().getUid()] +
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() != sequence['subscription_delivery_uid']]),
sorted(confirmed_invoice.getCausalityUidList()))
# planned invoice shall have causality of one packing list
self.assertEqual(
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() == sequence['subscription_delivery_uid']],
planned_invoice.getCausalityUidList())
def stepStartInvoice(self, sequence, **kw):
self.portal.portal_catalog.getResultValue(
uid=sequence['invoice_uid']).start()
def stepStopInvoice(self, sequence, **kw):
self.portal.portal_catalog.getResultValue(
uid=sequence['invoice_uid']).stop()
def stepCheckHostingSubscriptionStoppedInvoiceDocumentCoverage(self,
sequence, **kw):
catalog = self.portal.portal_catalog
hosting_subscription = catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
hosting_subscription_url = hosting_subscription.getRelativeUrl()
# hosting is confirmed, so no invoice
hosting_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(1, len(hosting_delivery_line_list))
self.assertEqual('confirmed', hosting_delivery_line_list[0]\
.getSimulationState())
hosting_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(0, len(hosting_invoice_line_list))
# setup is stopped, and has there is invoice
setup_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_delivery_line_list))
self.assertEqual('stopped', setup_delivery_line_list[0]\
.getSimulationState())
setup_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_invoice_line_list))
self.assertEqual('stopped', setup_invoice_line_list[0]\
.getSimulationState())
# there are 10 confirmed and 2 stopped subscription, so 2 invoice line
subscription_delivery_line_list = catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(12, len(subscription_delivery_line_list))
self.assertEqual((['confirmed'] * 10) + (['stopped'] * 2),
sorted([q.getSimulationState() for \
q in subscription_delivery_line_list]))
subscription_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(2, len(subscription_invoice_line_list))
self.assertEqual(['planned', 'stopped'],
sorted([q.getSimulationState() for q in subscription_invoice_line_list]))
# there are three invoice lines, where two share same invoice
# and other is on new one
self.assertEqual(
setup_invoice_line_list[0].getParentValue().getRelativeUrl(),
[q.getParentValue().getRelativeUrl() for q in \
subscription_invoice_line_list \
if q.getSimulationState() == 'stopped'][0]
)
self.assertNotEqual(
setup_invoice_line_list[0].getParentValue().getRelativeUrl(),
[q.getParentValue().getRelativeUrl() for q in \
subscription_invoice_line_list \
if q.getSimulationState() == 'planned'][0]
)
def stepCheckSalePackingList(self, sequence, **kw):
# check one more sale packing list is generated
# and only one sale packing list line is inside
sale_packing_list = sequence['current_sale_packing_list']
sale_packing_list_line_list = \
sale_packing_list.contentValues(portal_type="Sale Packing List Line")
self.assertEquals(1, len(sale_packing_list_line_list))
sale_packing_list_line = sale_packing_list_line_list[0]
# check sale packing list related property
self.assertEquals("organisation_module/vifib_internet",
sale_packing_list.getSource())
self.assertEquals("organisation_module/vifib_internet",
sale_packing_list.getSourceSection())
self.assertEquals("person_module/test_vifib_customer",
sale_packing_list.getDestination())
self.assertEquals("person_module/test_vifib_customer",
sale_packing_list.getDestinationSection())
self.assertEquals("currency_module/EUR",
sale_packing_list.getPriceCurrency())
# check sale packing list line related property
self.assertEquals("service_module/vifib_instance_subscription",
sale_packing_list_line.getResource())
self.assertEquals(1,
sale_packing_list_line.getQuantity())
self.assertEquals("unit/piece",
sale_packing_list_line.getQuantityUnit())
self.assertEquals(1,
sale_packing_list_line.getPrice())
# fetch open order, open order line and subscription
person = self.portal.person_module['test_vifib_customer']
open_order = \
person.getDestinationDecisionRelatedValue(portal_type="Open Sale Order")
open_order_line = \
open_order.contentValues(portal_type="Open Sale Order Line")[0]
# check related property
self.assertEquals(open_order_line.getSpecialise(),
sale_packing_list.getSpecialise())
def stepCheckInvoiceAndInvoiceTransaction(self, sequence, **kw):
sale_invoice_transaction = sequence['current_sale_invoice_transaction']
self.assertEqual(sale_invoice_transaction.getSimulationState(),
'confirmed')
self.assertEqual(sale_invoice_transaction.getCausalityList(),
[sequence['current_sale_packing_list'].getRelativeUrl()])
self.portal.portal_workflow.doActionFor(sale_invoice_transaction,
'start_action')
self.assertEqual(sale_invoice_transaction.getSimulationState(),
'started')
stopped_invoice = setup_invoice_line_list[0].getParentValue()
planned_invoice = [q.getParentValue() for q in \
subscription_invoice_line_list \
if q.getSimulationState() == 'planned'][0]
# invoices shall be solved
self.assertEqual('solved', planned_invoice.getCausalityState())
self.assertEqual('solved', stopped_invoice.getCausalityState())
# there shall be no payment transaction related to planned invoice
self.assertEqual([], planned_invoice.getCausalityRelatedList(
portal_type='Payment Transaction'))
# there shall be one payment transaction related to stopped invoice
payment_transaction_list = stopped_invoice.getCausalityRelatedValueList(
portal_type='Payment Transaction')
self.assertEqual(1, len(payment_transaction_list))
payment_transaction = payment_transaction_list[0]
# this payment transaction shall be planned and solved
self.assertEqual('planned', payment_transaction.getSimulationState())
self.assertEqual('solved', payment_transaction.getCausalityState())
# only this invoice shall be covered by this payment transaction
self.assertEqual(stopped_invoice.getRelativeUrl(),
payment_transaction.getCausality())
# this payment shall fully pay the invoice
self.assertEqual(stopped_invoice.getTotalPrice(),
payment_transaction.PaymentTransaction_getTotalPayablePrice())
# Stopped invoice shall have causality of two packing lists
self.assertEqual(
sorted([setup_delivery_line_list[0].getParentValue().getUid()] +
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() != sequence['subscription_delivery_uid']]),
sorted(stopped_invoice.getCausalityUidList()))
# planned invoice shall have causality of one packing list
self.assertEqual(
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() == sequence['subscription_delivery_uid']],
planned_invoice.getCausalityUidList())
def stepCheckHostingSubscriptionTwoStoppedInvoiceDocumentCoverage(self,
sequence, **kw):
catalog = self.portal.portal_catalog
hosting_subscription = catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
hosting_subscription_url = hosting_subscription.getRelativeUrl()
# hosting is confirmed, so no invoice
hosting_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(1, len(hosting_delivery_line_list))
self.assertEqual('confirmed', hosting_delivery_line_list[0]\
.getSimulationState())
hosting_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['hosting_resource'])
self.assertEqual(0, len(hosting_invoice_line_list))
# setup is stopped, and has there is invoice
setup_delivery_line_list = catalog(portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_delivery_line_list))
self.assertEqual('stopped', setup_delivery_line_list[0]\
.getSimulationState())
setup_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['setup_resource'])
self.assertEqual(1, len(setup_invoice_line_list))
self.assertEqual('stopped', setup_invoice_line_list[0]\
.getSimulationState())
# there are 10 confirmed and 2 stopped subscription, so 2 invoice line
subscription_delivery_line_list = catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(12, len(subscription_delivery_line_list))
self.assertEqual((['confirmed'] * 10) + (['stopped'] * 2),
sorted([q.getSimulationState() for \
q in subscription_delivery_line_list]))
subscription_invoice_line_list = catalog(portal_type='Invoice Line',
aggregate_relative_url=hosting_subscription_url,
resource_relative_url=sequence['subscription_resource'])
self.assertEqual(2, len(subscription_invoice_line_list))
self.assertEqual(['stopped', 'stopped'],
sorted([q.getSimulationState() for q in subscription_invoice_line_list]))
# there are three invoice lines, where two share same invoice
# and other is on other one
first_invoice = setup_invoice_line_list[0].getParentValue()
second_invoice = [q.getParentValue() for q in subscription_invoice_line_list \
if q.getParentValue().getUid() != first_invoice.getUid()][0]
# invoices shall be solved
self.assertEqual('solved', first_invoice.getCausalityState())
self.assertEqual('solved', second_invoice.getCausalityState())
# both invoice shall have shared payment transaction
payment_transaction_list = first_invoice.getCausalityRelatedValueList(
portal_type='Payment Transaction')
self.assertEqual(1, len(payment_transaction_list))
payment_transaction = payment_transaction_list[0]
self.assertEqual([payment_transaction.getRelativeUrl()],
second_invoice.getCausalityRelatedList(
portal_type='Payment Transaction'))
# this payment transaction shall be planned and solved
self.assertEqual('planned', payment_transaction.getSimulationState())
self.assertEqual('solved', payment_transaction.getCausalityState())
# this payment shall fully pay both invoices
self.assertEqual(
first_invoice.getTotalPrice() + second_invoice.getTotalPrice(),
payment_transaction.PaymentTransaction_getTotalPayablePrice())
sequence.edit(payment_transaction_uid=payment_transaction.getUid())
def stepConfirmPayment(self, sequence, **kw):
self.portal.portal_catalog.getResultValue(
uid=sequence['payment_transaction_uid']).confirm()
def stepCheckPayment(self, sequence, **kw):
payment_transaction = sequence['current_payment_transaction']
self.assertEqual(payment_transaction.getSimulationState(), 'planned')
self.assertEqual(payment_transaction.getCausalityList(),
[sequence['current_sale_invoice_transaction'].getRelativeUrl()])
self.portal.portal_workflow.doActionFor(payment_transaction,
'confirm_action')
self.assertEqual(payment_transaction.getSimulationState(),
'confirmed')
payment_transaction = self.portal.portal_catalog.getResultValue(
uid=sequence['payment_transaction_uid'])
self.assertEqual('confirmed', payment_transaction.getSimulationState())
self.assertEqual('solved', payment_transaction.getCausalityState())
def stepInvoiceSetStartDatePreviousMonth(self, sequence, **kw):
invoice = self.portal.portal_catalog.getResultValue(
uid=sequence['invoice_uid'])
invoice.setStartDate(getClosestDate(target_date=DateTime())-1)
def stepTriggerStopInvoiceAlarm(self, sequence, **kw):
self.portal.portal_alarms.stop_planned_sale_invoice_transaction.activeSense()
def test_OpenOrder_sale_packing_list(self):
"""
Check that sale_packing_list is generated properly from simulation
"""
check_one_month = """
LoginDefaultUser
TriggerNextBuild
Tic
Logout
LoginDefaultUser
CheckOneMoreDocumentList
CheckSalePackingList
CheckInvoiceAndInvoiceTransaction
CheckPayment
Logout
"""
self.computer_partition_amount = 1
sequence_list = SequenceList()
sequence_string = \
self.prepare_installed_computer_partition_sequence_string \
+ (check_one_month * 12)
self.prepare_installed_computer_partition_sequence_string + \
"""
LoginDefaultUser
TriggerBuild
Tic
CheckSubscriptionSalePackingListCoverage
TriggerBuild
Tic
# Nothing shall change
CheckHostingSubscriptionInitialDocumentCoverage
# Stop first Subscription delivery and after triggering build check
# that invoice got updated
SelectNextSubscriptionDelivery
StartSubscriptionDelivery
StopSubscriptionDelivery
Tic
TriggerBuild
Tic
CheckHostingSubscriptionStoppedDocumentCoverage
# proff that alarm will ignore this month invoices
TriggerStopInvoiceAlarm
Tic
CheckHostingSubscriptionStoppedDocumentCoverage
# Confirm current invoice and stop next delivery. After triggering build
# new planned invoice shall be available.
SelectPlannedInvoice
ConfirmInvoice
Tic
SelectNextSubscriptionDelivery
StartSubscriptionDelivery
StopSubscriptionDelivery
Tic
TriggerBuild
Tic
CheckHostingSubscriptionConfirmedInvoiceDocumentCoverage
# Lets check the payment
StartInvoice
StopInvoice
Tic
TriggerBuild
Tic
CheckHostingSubscriptionStoppedInvoiceDocumentCoverage
# Proof that alarm is capable to stop previous month invoice
SelectPlannedInvoice
InvoiceSetStartDatePreviousMonth
Tic
TriggerStopInvoiceAlarm
Tic
# Payment should cover both invoices
TriggerBuild
Tic
CheckHostingSubscriptionTwoStoppedInvoiceDocumentCoverage
ConfirmPayment
Tic
CheckPayment
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......
......@@ -5,6 +5,14 @@ from testVifibSlapWebService import TestVifibSlapWebServiceMixin
from DateTime.DateTime import DateTime
def generateTimeFrameList(start_date):
expected_time_frame_list = [start_date]
current = \
getClosestDate(target_date=start_date, precision='month', before=0)
for m in range(0, 12):
expected_time_frame_list.append(addToDate(current, month=m))
return expected_time_frame_list
class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
def stepCheckSimulationMovement(self, sequence, **kw):
......@@ -76,37 +84,25 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
0.0, open_order_line.getStopDate().second())
# Calculate the list of time frames
expected_time_frame_list = [start_date]
current = \
getClosestDate(target_date=start_date, precision='month', before=0)
if start_date == current:
current = addToDate(start_date, month=1)
while current <= stop_date:
expected_time_frame_list.append(current)
current = addToDate(
getClosestDate(target_date=current, precision='month', before=0),
month=1)
expected_time_frame_list = generateTimeFrameList(start_date)
# test the test: have we generated 12th next months coverage?
self.assertEqual(13, len(expected_time_frame_list))
# Check that simulation is created by the periodicity
self.assertEquals(len(expected_time_frame_list),
len(applied_rule.contentValues()) + 1)
simulation_movement_list = self.portal.portal_catalog(
portal_type='Simulation Movement',
parent_uid=applied_rule.getUid(),
sort_on=(('movement.start_date', 'desc'),)
)
# Check that simulation is created by the periodicity for one year
self.assertEquals(12,
len(simulation_movement_list))
# Check the list of expected simulation
idx = 0
while idx + 1 < len(expected_time_frame_list):
# select simulation given start_date and stop_date
simulation_movement_list = \
self.portal.portal_catalog.unrestrictedSearchResults(
parent_uid=applied_rule.getUid(),
portal_type="Simulation Movement",
**{
'movement.start_date':expected_time_frame_list[idx],
'movement.stop_date':expected_time_frame_list[idx + 1],
})
self.assertEquals(1, len(simulation_movement_list))
simulation_movement = simulation_movement_list[0].getObject()
self.assertNotEquals(None, simulation_movement)
for simulation_movement in simulation_movement_list:
expected_start_date = expected_time_frame_list[idx]
expected_stop_date = expected_time_frame_list[idx+1]
# Check simulation movement property
self.assertEquals(1.0,
simulation_movement.getQuantity())
......@@ -144,6 +140,13 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEquals(None,
simulation_movement.getAggregate(
portal_type="Software Release"))
self.assertEqual(expected_start_date, simulation_movement.getStartDate())
self.assertEqual(expected_stop_date, simulation_movement.getStopDate())
# not delivered yet
self.assertEqual(None, simulation_movement.getDelivery())
# packing list shall be buildable
self.assertTrue(simulation_movement.isBuildable())
# fetch invoice level simulation
applied_rule_invoice_list = \
......@@ -159,6 +162,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_list[0].getObject()
self.assertNotEquals(None, simulation_movement_invoice)
# not delivered yet
self.assertEqual(None, simulation_movement_invoice.getDelivery())
# invoice shall be not yet buildable
self.assertFalse(False, simulation_movement_invoice.isBuildable())
# check property of invoice simulation
self.assertEquals(1.0,
simulation_movement_invoice.getQuantity())
......@@ -180,11 +188,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice.getSpecialise())
self.assertEquals("service_module/vifib_instance_subscription",
simulation_movement_invoice.getResource())
self.assertEquals("default/invoicing",
self.assertEquals("vifib/invoicing",
simulation_movement_invoice.getTradePhase())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_start_date,
simulation_movement_invoice.getStartDate())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_stop_date,
simulation_movement_invoice.getStopDate())
self.assertEquals(None,
simulation_movement_invoice.getAggregate(
......@@ -215,16 +223,30 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_transaction_debit = None
for simulation_movement_invoice_transaction in \
simulation_movement_invoice_transaction_list:
if "business_process_module/erp5_default_business_process/account_credit_path" \
# not delivered nor buildable
self.assertEqual(None, simulation_movement_invoice_transaction\
.getDelivery())
self.assertFalse(simulation_movement_invoice_transaction.isBuildable())
if "business_process_module/vifib_sale_business_process/account_credit_path" \
in simulation_movement_invoice_transaction.getCausalityList():
simulation_movement_invoice_transaction_credit = \
simulation_movement_invoice_transaction.getObject()
if "business_process_module/erp5_default_business_process/account_debit_path" \
if "business_process_module/vifib_sale_business_process/account_debit_path" \
in simulation_movement_invoice_transaction.getCausalityList():
simulation_movement_invoice_transaction_debit = \
simulation_movement_invoice_transaction.getObject()
self.assertNotEquals(None, simulation_movement_invoice_transaction_credit)
# not delivered nor buildable
self.assertEqual(None, simulation_movement_invoice_transaction_credit\
.getDelivery())
self.assertFalse(simulation_movement_invoice_transaction_credit\
.isBuildable())
self.assertNotEquals(None, simulation_movement_invoice_transaction_debit)
# not delivered nor buildable
self.assertEqual(None, simulation_movement_invoice_transaction_debit\
.getDelivery())
self.assertFalse(simulation_movement_invoice_transaction_debit\
.isBuildable())
# check property of invoice transaction simulation
self.assertEquals(-1.0,
......@@ -247,11 +269,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_transaction_credit.getResource())
self.assertEquals(open_order_line.getSpecialise(),
simulation_movement_invoice_transaction_credit.getSpecialise())
self.assertEquals("default/accounting",
self.assertEquals("vifib/accounting",
simulation_movement_invoice_transaction_credit.getTradePhase())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_start_date,
simulation_movement_invoice_transaction_credit.getStartDate())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_stop_date,
simulation_movement_invoice_transaction_credit.getStopDate())
self.assertEquals(1.0,
......@@ -274,11 +296,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_transaction_debit.getResource())
self.assertEquals(open_order_line.getSpecialise(),
simulation_movement_invoice_transaction_debit.getSpecialise())
self.assertEquals("default/accounting",
self.assertEquals("vifib/accounting",
simulation_movement_invoice_transaction_debit.getTradePhase())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_start_date,
simulation_movement_invoice_transaction_debit.getStartDate())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_stop_date,
simulation_movement_invoice_transaction_debit.getStopDate())
# credit simulation movement has no content
......@@ -302,16 +324,26 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_credit_payment_debit = None
for simulation_movement_credit_payment in \
simulation_movement_credit_payment_list:
if "business_process_module/erp5_default_business_process/payment_credit_path" \
if "business_process_module/vifib_sale_business_process/payment_credit_path" \
in simulation_movement_credit_payment.getCausalityList():
simulation_movement_credit_payment_credit = \
simulation_movement_credit_payment.getObject()
if "business_process_module/erp5_default_business_process/payment_debit_path" \
if "business_process_module/vifib_sale_business_process/payment_debit_path" \
in simulation_movement_credit_payment.getCausalityList():
simulation_movement_credit_payment_debit = \
simulation_movement_credit_payment.getObject()
self.assertNotEquals(None, simulation_movement_credit_payment_credit)
# not delivered nor buildable
self.assertEqual(None, simulation_movement_credit_payment_credit\
.getDelivery())
self.assertFalse(simulation_movement_credit_payment_credit\
.isBuildable())
self.assertNotEquals(None, simulation_movement_credit_payment_debit)
# not delivered nor buildable
self.assertEqual(None, simulation_movement_credit_payment_debit\
.getDelivery())
self.assertFalse(simulation_movement_credit_payment_debit\
.isBuildable())
# check payment level of simulation
self.assertEquals(-1.0,
......@@ -332,11 +364,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_credit_payment_credit.getDestinationSection())
self.assertEquals(open_order_line.getSpecialise(),
simulation_movement_credit_payment_credit.getSpecialise())
self.assertEquals("default/payment",
self.assertEquals("vifib/payment",
simulation_movement_credit_payment_credit.getTradePhase())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_start_date,
simulation_movement_credit_payment_credit.getStartDate())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_stop_date,
simulation_movement_credit_payment_credit.getStopDate())
self.assertEquals(1.0,
......@@ -357,11 +389,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_credit_payment_debit.getDestinationSection())
self.assertEquals(open_order_line.getSpecialise(),
simulation_movement_credit_payment_debit.getSpecialise())
self.assertEquals("default/payment",
self.assertEquals("vifib/payment",
simulation_movement_credit_payment_debit.getTradePhase())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_start_date,
simulation_movement_credit_payment_debit.getStartDate())
self.assertEquals(expected_time_frame_list[idx+1],
self.assertEquals(expected_stop_date,
simulation_movement_credit_payment_debit.getStopDate())
# check next simulation movement
......@@ -376,7 +408,7 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
sequence_list = SequenceList()
sequence_string = \
self.prepare_installed_computer_partition_sequence_string + """
LoginDefaultUser
LoginERP5TypeTestCase
CheckSimulationMovement
Tic
SlapLogout
......
......@@ -481,6 +481,8 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
CheckSoftwareInstanceAndRelatedComputerPartition
CheckRequestedSoftwareInstanceAndRelatedComputerPartition
Logout
......@@ -528,7 +530,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
......@@ -610,7 +612,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
# now vifib_admin computer partition request new one and suceeds
......@@ -624,6 +626,8 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
CheckSoftwareInstanceAndRelatedComputerPartition
CheckRequestedSoftwareInstanceAndRelatedComputerPartition
Logout
......@@ -671,7 +675,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
......@@ -711,7 +715,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
......
......@@ -25,18 +25,22 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
root_software_instance.requestSoftwareInstance(partition_reference=S1,
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
S1_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S1)
S1_instance.requestSoftwareInstance(partition_reference=S2, **common_kw)
self.stepTic()
S1_instance.requestSoftwareInstance(partition_reference=S3, **common_kw)
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
root_software_instance.requestSoftwareInstance(partition_reference=S4,
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
S2_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S2)
......@@ -141,7 +145,6 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
LoginDefaultUser
FinishSoftwareInstanceTree
Logout
SlapLoginCurrentComputer
CheckEmptyComputerGetComputerPartitionCall
SlapLogout
......@@ -363,7 +366,6 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
software_type='any', instance_xml=self.minimal_correct_xml,
state='stopped')
self.logout()
self.login(sequence['software_instance_reference'])
root_software_instance.requestSoftwareInstance(
partition_reference=S1,
......@@ -373,6 +375,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
</instance>""" % sequence['computer_reference_c1'],
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
self.logout()
self.stepLoginDefaultUser()
......@@ -380,7 +384,6 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
portal_type='Software Instance', title=S1)
S1_reference = S1_instance.getReference()
self.logout()
self.login(S1_reference)
S1_instance.requestSoftwareInstance(
partition_reference=S2,
......@@ -390,6 +393,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
</instance>""" % sequence['computer_reference_c0'],
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
self.logout()
self.stepLoginDefaultUser()
......@@ -410,6 +415,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
self.logout()
self.stepLoginDefaultUser()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
S3_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S3)
S3_reference = S3_instance.getReference()
......@@ -550,6 +557,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
FinishSoftwareInstanceSpannedTree
Tic
SlapLoginCurrentComputer
CheckEmptyComputerGetComputerPartitionCall
ComputerBang
......@@ -631,6 +639,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
partition_reference=S1,
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
self.logout()
self.stepLoginDefaultUser()
......
......@@ -349,7 +349,10 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -738,7 +741,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -764,6 +771,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
Tic
RequestComputerPartition
Tic
......@@ -888,7 +900,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -914,7 +930,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -1048,7 +1068,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -1344,7 +1368,10 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestSlaveInstanceFromComputerPartition
Tic
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
SoftwareInstanceAvailable
Tic
......
......@@ -340,7 +340,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
SlapLogout \
\
LoginTestVifibCustomer \
RequestSlaveInstanceStop \
RequestSoftwareInstanceStop \
Tic \
Logout \
\
......
......@@ -20,7 +20,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + '\
SlapLoginCurrentSoftwareInstance \
RequestComputerPartitionNotFoundResponse \
RequestComputerPartition \
SlapLogout \
'
sequence_list.addSequenceString(sequence_string)
......@@ -43,6 +43,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
......@@ -81,6 +83,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
......@@ -146,8 +150,9 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
CheckRaisesNotFoundComputerPartitionParameterDict \
Tic \
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
......@@ -209,8 +214,9 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
CheckRaisesNotFoundComputerPartitionParameterDict \
Tic \
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
......@@ -220,7 +226,9 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \
CheckRequestedComputerPartitionCleanParameterList \
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
LoginDefaultUser \
SetCurrentSoftwareInstanceRequested \
SetSelectedComputerPartition \
......@@ -429,6 +437,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
......@@ -458,8 +468,9 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
CheckRaisesNotFoundComputerPartitionParameterDict \
Tic \
SlapLogout \
\
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
Logout \
......@@ -528,7 +539,10 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestComputerPartition
Tic
SlapLogout
......@@ -558,7 +572,10 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestComputerPartition
Tic
SlapLogout
......@@ -573,6 +590,96 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_ComputerPartition_request_SlaveInstance_twiceDifferentParent(self):
"""
Checks that requesting a Slave Instance twice with same arguments from
different Computer Partition will return same object.
This test is reproducing scenario:
Master
/ \
ChildrenA ChildrenB
\
SlaveInstanceRequestTwice
Then ChildrenB requests SlaveInstanceRequestedTwice, so graph changes to:
Master
/ \
ChildrenA ChildrenB
/
SlaveInstanceRequestedTwice
"""
self.computer_partition_amount = 3
sequence_list = SequenceList()
sequence_string = self.prepare_children_a_children_b_sequence_string + """
# Generate first part of graph
# Master
# / \
# ChildrenA ChildrenB
# \
# SlaveInstanceRequestedTwice
LoginDefaultUser
SetSoftwareInstanceChildrenA
SelectRequestedReference
SelectEmptyRequestedParameterDict
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestSlaveInstanceFromComputerPartition
Tic
SlapLogout
LoginDefaultUser
SetRequestedComputerPartition
CheckComputerPartitionChildrenA
CheckComputerPartitionChildrenBNoChild
Logout
# Generate second part of graph
# Master
# / \
# ChildrenA ChildrenB
# /
# SlaveInstanceRequestedTwice
LoginDefaultUser
SetRequestedComputerPartition
SetSoftwareInstanceChildrenB
SelectRequestedReference
SelectEmptyRequestedParameterDict
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestSlaveInstanceFromComputerPartition
Tic
SlapLogout
LoginDefaultUser
SetRequestedComputerPartition
CheckComputerPartitionChildrenANoChild
CheckComputerPartitionChildrenB
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
# Marked as expectedFailure as implementation is not ready yet
@expectedFailure
def test_ComputerPartition_request_twiceDifferentParentWithoutTic(self):
......@@ -645,7 +752,11 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestComputerPartition
Tic
SlapLogout
......@@ -663,7 +774,10 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestComputerPartition
Tic
SlapLogout
......@@ -748,12 +862,16 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
self.computer_partition_amount = 2
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + '\
LoginDefaultUser \
SlapLoginCurrentSoftwareInstance \
SelectRequestedReferenceChildrenA \
SelectEmptyRequestedParameterDict \
RequestComputerComputerPartitionCheckSerializeCalledOnSelected \
RequestComputerPartition \
SlapLogout \
LoginDefaultUser \
ConfirmSaleOrderOrderedToCheckSerializeCalledOnSelected \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -786,7 +904,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
\
SelectYetAnotherRequestedReference \
SlapLoginCurrentSoftwareInstance \
RequestComputerPartitionNotFoundResponse \
RequestComputerPartition \
Tic \
SlapLogout \
'
......@@ -933,9 +1051,18 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
SelectEmptyRequestedParameterDict
SelectRequestedReference
RequestSlaveInstanceFromComputerPartitionNotFoundError
RequestSlaveInstanceFromComputerPartition
Tic
RequestSlaveInstanceFromComputerPartitionNotFoundError
LoginDefaultUser
SelectSlaveInstanceFromSaleOrderOrdered
SoftwareInstanceSaleOrderConfirmRaisesValueError
ConfirmOrderedSaleOrderActiveSense
Tic
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
CheckComputerPartitionInstanceSetupSalePackingListStopped
CheckComputerPartitionInstanceHostingSalePackingListConfirmed
SetDeliveryLineAmountEqualZero
CheckComputerPartitionInstanceSetupSalePackingListConfirmed
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -1034,22 +1161,38 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SelectAnotherRequestedReference \
SelectEmptyRequestedParameterDict \
SlapLoginCurrentSoftwareInstance \
RequestSlaveInstanceFromComputerPartitionNotFoundError \
RequestSlaveInstanceFromComputerPartition \
Tic \
SlapLogout \
\
LoginDefaultUser \
SelectSlaveInstanceFromSaleOrderOrdered \
SoftwareInstanceSaleOrderConfirmRaisesValueError \
Tic \
CheckComputerPartitionInstanceSetupSalePackingListConfirmed \
Logout \
SlapLoginCurrentSoftwareInstance \
SetRequestedFilterParameterDict \
RequestSlaveInstanceFromComputerPartition \
Tic \
SlapLogout \
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
SetDeliveryLineAmountEqualTwo \
CheckComputerPartitionInstanceSetupSalePackingListConfirmed \
Logout \
\
SetRequestedWrongFilterParameterDict \
SelectYetAnotherRequestedReference \
SlapLoginCurrentSoftwareInstance \
RequestSlaveInstanceFromComputerPartitionNotFoundError \
RequestSlaveInstanceFromComputerPartition \
Tic \
SlapLogout \
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
CheckComputerPartitionInstanceSetupSalePackingListConfirmed \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -1062,6 +1205,13 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
**kw):
sequence.edit(requested_software_type="FirstSoftwareType")
def stepSelectSlaveInstanceFromSaleOrderOrdered(self, sequence):
order_line = self.portal.portal_catalog.getResultValue(
portal_type="Sale Order Line", simulation_state="ordered")
slave_instance_uid = order_line.getAggregateValue(
portal_type="Slave Instance").getUid()
sequence.edit(software_instance_uid=slave_instance_uid)
def stepRequestComputerPartitionWithAnotherSoftwareType(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
......@@ -1076,7 +1226,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
filter_kw=sequence.get('requested_filter_dict', {}),
state=sequence.get('instance_state'))
requested_slap_computer_partition = slap_computer_partition.request(**kw)
slap_computer_partition.request(**kw)
def stepCheckRequestComputerPartitionWithAnotherSoftwareType(
self, sequence, **kw):
......@@ -1117,12 +1267,20 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SetFirstSoftwareType \
RequestComputerPartition \
Tic \
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
Logout \
RequestComputerPartition \
Tic \
RequestComputerPartitionWithAnotherSoftwareType \
Tic \
RequestComputerPartitionWithAnotherSoftwareType \
Tic \
LoginDefaultUser \
ConfirmOrderedSaleOrderActiveSense \
Tic \
Logout \
CheckRequestComputerPartitionWithAnotherSoftwareType \
Tic \
SlapLogout \
......
......@@ -10,12 +10,6 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']).requestUpdateComputerPartition()
def stepCheckComputerPartitionInstanceUpdateSalePackingListConfirmed(self,
sequence, **kw):
self._checkComputerPartitionSalePackingListState('confirmed',
self.portal.portal_preferences.getPreferredInstanceUpdateResource(),
sequence)
def stepCheckComputerPartitionInstanceUpdateSalePackingListDelivered(self,
sequence, **kw):
self._checkComputerPartitionSalePackingListState('delivered',
......
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.backportUnittest import expectedFailure
import unittest
from testVifibSlapWebService import TestVifibSlapWebServiceMixin
from slapos import slap
......@@ -131,7 +130,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
open_order = self.slap.registerOpenOrder()
requested_slap_computer_partition = open_order.request(
open_order.request(
software_release=software_release,
software_type="SecondSoftwareType",
partition_reference=sequence['requested_reference'],
......
......@@ -31,7 +31,6 @@ from DateTime import DateTime
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.Errors import UnsupportedWorkflowMethod
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.backportUnittest import expectedFailure
from Products.ERP5Type.tests.backportUnittest import skip
from Products.ERP5Type.tests.SecurityTestCase import AssertNoPermissionMethod, \
AssertPermissionMethod
......@@ -332,6 +331,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.portal.portal_preferences.getPreferredInstanceCleanupResource(),
sequence)
def stepCheckComputerPartitionInstanceUpdateSalePackingListConfirmed(self,
sequence, **kw):
self._checkComputerPartitionSalePackingListState('confirmed',
self.portal.portal_preferences.getPreferredInstanceUpdateResource(),
sequence)
def stepCheckComputerPartitionInstanceCleanupSalePackingListCancelled(self,
sequence, **kw):
self._checkComputerPartitionSalePackingListState('cancelled',
......@@ -1080,7 +1085,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict \
Tic \
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestComputerPartition \
Tic \
SlapLogout
......@@ -1095,7 +1103,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestComputerPartition
Tic
SlapLogout
......@@ -1728,8 +1739,13 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_type, software_type + str(1))
second = slap_computer_partition.request(software_release,
software_type, software_type + str(2))
self.stepLoginDefaultUser()
transaction.commit()
self.tic()
self.stepConfirmOrderedSaleOrderActiveSense()
transaction.commit()
self.tic()
self.stepLogout()
first = slap_computer_partition.request(software_release,
software_type, software_type + str(1))
second = slap_computer_partition.request(software_release,
......@@ -1761,21 +1777,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
requested_computer_partition_reference=\
requested_slap_computer_partition.getId())
def stepRequestComputerPartitionNotFoundResponse(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
slap_computer_partition = self.slap.registerComputerPartition(
sequence['computer_reference'],
sequence['computer_partition_reference'])
self.assertRaises(slap.NotFoundError, slap_computer_partition.request,
software_release=sequence['software_release_uri'],
software_type=sequence.get('requested_reference', 'requested_reference'),
partition_reference=sequence.get('requested_reference',
'requested_reference'),
partition_parameter_kw=sequence.get('requested_parameter_dict', {}),
filter_kw=sequence.get('requested_filter_dict', {}),
state=sequence.get('instance_state'))
def _stepSetSoftwareInstanceChildren(self, sequence, source_reference):
software_instance_uid = sequence['root_software_instance_uid']
software_instance = self.portal.portal_catalog.getResultValue(
......@@ -1931,15 +1932,8 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
finally:
Base.serialize = Base.serialize_call
def stepRequestComputerComputerPartitionCheckSerializeCalledOnSelected(
def stepConfirmSaleOrderOrderedToCheckSerializeCalledOnSelected(
self, sequence, **kw):
software_release_uri = sequence['software_release_uri']
requested_reference = sequence['requested_reference']
software_instance_uid = sequence['software_instance_uid']
# slap cannot be used to this test, as ERP5 itself shall raise
requester = self.portal.portal_catalog.getResultValue(
uid=software_instance_uid)
# check that on being_requested serialise is being called
# code stolen from testERP5Security:test_MultiplePersonReferenceConcurrentTransaction
......@@ -1959,15 +1953,9 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Base.serialize = verify_serialize_call
try:
self.assertRaises(DummyTestException, requester.requestSoftwareInstance,
software_release=software_release_uri,
partition_reference=requested_reference,
software_type=requested_reference,
shared=False,
filter_kw={},
instance_xml=self.minimal_correct_xml,
sla_xml=self.minimal_correct_xml,
state=None)
sale_order_ordered = self.portal.portal_catalog.getResultValue(
portal_type="Sale Order", simulation_state="ordered")
self.assertRaises(DummyTestException, sale_order_ordered.confirm)
finally:
Base.serialize = Base.serialize_call
......@@ -3819,16 +3807,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
uid=sequence["software_instance_uid"])
slave_instance.startComputerPartition()
def stepRequestSlaveInstanceStart(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence["software_instance_uid"])
slave_instance.requestStartComputerPartition()
def stepRequestSlaveInstanceStop(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence["software_instance_uid"])
slave_instance.requestStopComputerPartition()
def stepSlaveInstanceStopped(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence["software_instance_uid"])
......@@ -4144,7 +4122,7 @@ class TestVifibSlapWebService(TestVifibSlapWebServiceMixin):
def stepPersonRequestCredentialUpdate(self, sequence, **kw):
sequence['updated_last_name'] = 'Another'
result = self.portal.ERP5Site_newPersonCredentialUpdate(
self.portal.ERP5Site_newPersonCredentialUpdate(
first_name='Homer',
last_name=sequence['updated_last_name'],
reference=sequence['web_user'],
......
......@@ -440,14 +440,113 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
LoginTestVifibCustomer
RequestDestroySoftwareInstanceFromCurrentComputerPartition
Tic
SetDeliveryLineAmountEqualOne
CheckComputerPartitionInstanceHostingSalePackingListStopped
SetDeliveryLineAmountEqualTwo
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
SlapLoginCurrentComputer
SoftwareInstanceDestroyed
Tic
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_destroy_SoftwareInstance_after_request_SlaveInstance(self):
"""
Check that destroying the Software Instance after request Slave
Instance with the same user, the Slave Instance must be destroyed
correctly
"""
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
Tic
LoginTestVifibCustomer
PersonRequestSlaveInstance
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
LoginTestVifibCustomer
RequestDestroySoftwareInstanceFromCurrentComputerPartition
Tic
SetDeliveryLineAmountEqualTwo
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
SlapLoginCurrentComputer
SoftwareInstanceDestroyed
Tic
CheckComputerPartitionInstanceHostingSalePackingListStopped
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_destroy_SoftwareInstance_after_request_SlaveInstance_with_another_user(self):
"""
Check that destroying the Software Instance after request Slave
Instance with the different user, the Slave Instance must be destroyed
correctly
"""
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
Tic
LoginTestVifibCustomerA
PersonRequestSlaveInstance
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
LoginTestVifibCustomer
RequestDestroySoftwareInstanceFromCurrentComputerPartition
Tic
SetDeliveryLineAmountEqualTwo
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
SlapLoginCurrentComputer
SoftwareInstanceDestroyed
Tic
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_destroy_SoftwareInstance_after_destroy_SlaveInstance(self):
"""
Check that destroying the Software Instance after request destroy Slave
Instance, the request to destroy the Software Instance will not raise
exception
"""
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
Tic
LoginTestVifibCustomer
PersonRequestSlaveInstance
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceDestroy
Tic
RequestDestroySoftwareInstanceFromCurrentComputerPartition
Tic
SetDeliveryLineAmountEqualTwo
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
SlapLoginCurrentComputer
SoftwareInstanceDestroyed
Tic
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
Logout
"""
......@@ -480,7 +579,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic
SlapLogout
LoginTestVifibCustomer
RequestSlaveInstanceStop
RequestSoftwareInstanceStop
Tic
Logout
LoginDefaultUser
......@@ -506,6 +605,12 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepCheckComputerPartitionIsBusy(self, sequence, **kw):
computer_partition_uid = sequence["computer_partition_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
self.assertEqual('busy', computer_partition.getSlapState())
def test_SlaveInstance_request_destroy(self):
"""
Check that the Slave Instance will be destroyed correctly
......@@ -524,6 +629,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
CheckComputerPartitionIsBusy
Logout
"""
sequence_list.addSequenceString(sequence_string)
......@@ -635,6 +741,221 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SlaveInstance_change_parameter_dict_after_request(self):
"""
Check that request to change the parameter dict from a Slave Instance
will create update packing list correctly
"""
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
Tic
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
CheckEmptySlaveInstanceListFromOneComputerPartition
SlapLoginCurrentSoftwareInstance
SelectEmptyRequestedParameterDict
SetRandomRequestedReference
RequestSlaveInstanceFromComputerPartition
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
SlapLogout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
LoginDefaultUser
StartSoftwareInstanceFromCurrentComputerPartition
Logout
Tic
SoftwareInstanceStarted
Tic
CheckEmptyComputerGetComputerPartitionCall
SlapLogout
SlapLoginCurrentSoftwareInstance
SelectRequestedParameterDictRequestedParameter
RequestSlaveInstanceFromComputerPartition
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceUpdateSalePackingListConfirmed
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SlaveInstance_destroy_slave_with_SlaveInstance_stopped(self):
"""
Check that request destroy from Software Instance when exists one Slave
Instance stopped, both instances will be destroyed correctly
Scenario:
1. request master instance
2. request Slave Instance
3. stop Slave Instance
4. request destroy the master instance
Both instances must be destroyed
"""
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
Tic
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
CheckEmptySlaveInstanceListFromOneComputerPartition
SlapLoginCurrentSoftwareInstance
SelectEmptyRequestedParameterDict
SetRandomRequestedReference
RequestSlaveInstanceFromComputerPartition
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
SlapLogout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
LoginDefaultUser
StartSoftwareInstanceFromCurrentComputerPartition
Logout
Tic
SoftwareInstanceStarted
Tic
SlapLogout
LoginDefaultUser
SelectSlaveInstanceFromOneComputerPartition
SlapLoginCurrentSoftwareInstance
RequestSoftwareInstanceStop
Tic
SlaveInstanceStopped
Tic
CheckComputerPartitionInstanceHostingSalePackingListStarted
CheckComputerPartitionInstanceHostingSalePackingListDelivered
SetDeliveryLineAmountEqualTwo
CheckComputerPartitionInstanceSetupSalePackingListStopped
RequestDestroySoftwareInstanceFromCurrentComputerPartition
Tic
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
Logout
SlapLoginCurrentComputer
SoftwareInstanceDestroyed
Tic
LoginDefaultUser
CheckComputerPartitionIsFree
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
CheckComputerPartitionInstanceSetupSalePackingListDelivered
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Security_after_destroy_SoftwareInstance_with_different_user(self):
"""
Check that destroying one Software Instance it will not destroy Slave
Instances that is not related to your Software Instance.
Scenario:
VifibCustomer CustomerA
| |
SoftwareInstance SoftwareInstanceA (requestDestroy)
| |
SlaveInstance SlaveInstanceA
The Slave Instance related to Customer should not be destroyed
"""
self.computer_partition_amount = 4
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
Tic
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
CheckEmptySlaveInstanceListFromOneComputerPartition
SlapLoginCurrentSoftwareInstance
SelectEmptyRequestedParameterDict
SetRandomRequestedReference
RequestSlaveInstanceFromComputerPartition
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
SlapLogout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
LoginDefaultUser
SetDeliveryLineAmountEqualTwo
CheckComputerPartitionInstanceSetupSalePackingListStopped
CheckComputerPartitionInstanceHostingSalePackingListConfirmed """ + \
self.prepare_published_software_release + """
Tic
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
LoginAsCustomerA
PersonRequestSoftwareInstance
Logout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
Logout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
SlapLoginCurrentSoftwareInstance
SelectEmptyRequestedParameterDict
SetRandomRequestedReference
RequestSlaveInstanceFromComputerPartition
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
Tic
SlapLogout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
SlapLogout
LoginDefaultUser
SetDeliveryLineAmountEqualTwo
CheckComputerPartitionInstanceSetupSalePackingListStopped
CheckComputerPartitionInstanceHostingSalePackingListConfirmed
Logout
LoginAsCustomerA
RequestDestroySoftwareInstanceFromCurrentComputerPartition
Tic
Logout
LoginDefaultUser
SetDeliveryLineAmountEqualTwo
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite():
suite = unittest.TestSuite()
......
......@@ -28,7 +28,6 @@
#############################################################################
import unittest
from DateTime import DateTime
from lxml import etree
from slapos import slap
from testVifibSlapWebService import TestVifibSlapWebServiceMixin
......@@ -101,12 +100,7 @@ class TestVifibUsageReportMixin(TestVifibSlapWebServiceMixin):
"""
prepare_configured_instance = """ \
InitializeTime \
\
LoginERP5TypeTestCase \
ConfigureInstance \
Tic \
Logout""" + \
InitializeTime""" + \
TestVifibSlapWebServiceMixin.prepare_confirmed_cleanup_resource_packing_list
prepare_reported_usage_call = """ \
......@@ -121,29 +115,6 @@ class TestVifibUsageReportMixin(TestVifibSlapWebServiceMixin):
sequence['first_call'] = False
sequence['second_call'] = False
def stepConfigureInstance(self, sequence, **kw):
"""
Configures the Instance
"""
portal = self.getPortalObject()
# We validate some documents
for rule in portal.portal_rules.contentValues():
if rule.getObject().getValidationState() == 'draft':
rule.getObject().validate()
for person in portal.person_module.contentValues():
if person.getObject().getValidationState() == 'draft':
person.getObject().validate()
for business_process in portal.business_process_module.contentValues():
if business_process.getObject().getValidationState() == 'draft':
business_process.getObject().validate()
for sale_trade in portal.sale_trade_condition_module.contentValues():
if sale_trade.getObject().getValidationState() == 'draft':
sale_trade.getObject().validate()
def stepSlapReportUsageCall(self, sequence, **kw):
"""
Checks that slap.reportUsage is successfully called.
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.21-dev'
version = '0.22-dev'
name = 'slapos.core'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......
......@@ -378,6 +378,16 @@ class ComputerPartition(SlapDocument):
'computer_partition_id': self._partition_id,
'message': message})
def rename(self, new_name, slave_reference=None):
post_dict = dict(
computer_id=self._computer_id,
computer_partition_id=self._partition_id,
new_name=new_name,
)
if slave_reference is not None:
post_dict.update(slave_reference=slave_reference)
self._connection_helper.POST('/softwareInstanceRename', post_dict)
def getId(self):
return self._partition_id
......
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