Commit a4a1f573 authored by Antoine Catton's avatar Antoine Catton

Merge branch 'master' into rename_instance

Conflicts:
	master/bt5/vifib_base/bt/revision
	master/bt5/vifib_slap/bt/revision
parents 489c93a5 f5852e98
......@@ -320,25 +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
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
return context.portal_catalog(**kw)\n
\n
else:\n
return context.portal_catalog(src__=1, **kw)\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -50,14 +50,12 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
accounting_module = portal.getDefaultModule(\'Sale Invoice Transaction\')\n
\n
invoice = accounting_module.searchFolder(\n
<value> <string>portal_catalog = context.getPortalObject().portal_catalog\n
simulation_state = \'planned\'\n
# use catalog to prefetch, but check later in ZODB\n
return [q.getObject() for q in portal_catalog(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\')\n
\n
return invoice\n
simulation_state=simulation_state) if q.getSimulationState() == simulation_state]\n
</string> </value>
</item>
<item>
......
......@@ -50,20 +50,10 @@
</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
if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
......@@ -75,60 +65,17 @@ 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
\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 +83,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>
......
340
\ No newline at end of file
346
\ No newline at end of file
......@@ -63,9 +63,7 @@
<item>
<key> <string>aggregated_portal_type</string> </key>
<value>
<tuple>
<string>Usage Report</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......
88
\ No newline at end of file
89
\ No newline at end of file
......@@ -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>
......
......@@ -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>
......
......@@ -37,21 +37,12 @@
<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>
......
......@@ -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,14 @@
<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>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Causality Movement Group" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<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>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>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -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>
......
<?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>
64
\ No newline at end of file
72
\ 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.
#
......@@ -86,7 +86,6 @@ def SoftwareInstance_requestDestroySlaveInstanceRelated(self):
computer_partition_relative_url = self.getAggregateRelatedValue(
"Sale Packing List Line").getAggregate(portal_type="Computer Partition")
portal_preferences = portal.portal_preferences
simulation_state = ["started", "confirmed"]
service_uid_list = [
portal.restrictedTraverse(portal_preferences.getPreferredInstanceHostingResource()).getUid(),
portal.restrictedTraverse(portal_preferences.getPreferredInstanceSetupResource()).getUid(),
......@@ -95,10 +94,13 @@ def SoftwareInstance_requestDestroySlaveInstanceRelated(self):
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]
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(),
......@@ -106,6 +108,7 @@ def SoftwareInstance_requestDestroySlaveInstanceRelated(self):
limit=1,
)
if len(cleanup_packing_list) == 0:
uid_list.append(slave_instance_uid)
slave_instance.requestDestroyComputerPartition()
finally:
# Restore the original user.
......
<?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>
<?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>
......@@ -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>
......
489
\ No newline at end of file
490
\ 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
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 stepTriggerNextBuild(self, sequence, **kw):
build_before = sequence.get('build_before')
if build_before is None:
build_before = getClosestDate(
target_date=DateTime(), precision='month', before=0)
def stepTriggerBuild(self, sequence, **kw):
self.portal.portal_alarms.vifib_trigger_build.activeSense()
else:
build_before = addToDate(build_before, month=1)
self.portal.portal_alarms.vifib_trigger_build.activeSense(
params={'build_before':build_before})
sequence.edit(
number_of_sale_packing_list=sequence.get(
'number_of_sale_packing_list', 0) + 1,
invoice_amount=sequence.get('invoice_amount', 0) + 1,
payment_amount=sequence.get('payment_amount', 0) + 1,
build_before=build_before
)
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 stepCheckPayment(self, sequence, **kw):
raise NotImplementedError
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")))
self.assertEqual(sequence['number_of_sale_packing_list'],
len(sale_packing_list_list))
sale_packing_list = sale_packing_list_list[0].getObject()
sale_invoice_transaction_list = sale_packing_list\
.getCausalityRelatedValueList(portal_type='Sale Invoice Transaction')
self.assertEqual(sequence['invoice_amount'], len(sale_invoice_transaction_list))
sale_invoice_transaction = sale_invoice_transaction_list[0]
sort_on=(('delivery.start_date', 'desc'),)
)
# is whole year covered?
self.assertEqual(12, len(delivery_list))
payment_transaction_list = sale_invoice_transaction\
.getCausalityRelatedValueList(portal_type='Payment Transaction')
self.assertEqual(1, len(payment_transaction_list))
payment_transaction = payment_transaction_list[0]
# generate the expected time frames
now = DateTime()
start_date = \
getClosestDate(target_date=now, precision='day', before=1)
sequence.edit(
current_sale_packing_list=sale_packing_list,
current_sale_invoice_transaction=sale_invoice_transaction,
current_payment_transaction=payment_transaction
)
# Calculate the list of time frames
expected_time_frame_list = generateTimeFrameList(start_date)
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]
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())
# check sale packing list related property
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",
sale_packing_list.getSource())
delivery.getSource())
self.assertEquals("organisation_module/vifib_internet",
sale_packing_list.getSourceSection())
delivery.getSourceSection())
self.assertEquals("person_module/test_vifib_customer",
sale_packing_list.getDestination())
delivery.getDestination())
self.assertEquals("person_module/test_vifib_customer",
sale_packing_list.getDestinationSection())
delivery.getDestinationSection())
self.assertEquals("currency_module/EUR",
sale_packing_list.getPriceCurrency())
delivery.getPriceCurrency())
# check sale packing list line related property
self.assertEquals("service_module/vifib_instance_subscription",
sale_packing_list_line.getResource())
delivery_line.getResource())
self.assertEquals(1,
sale_packing_list_line.getQuantity())
delivery_line.getQuantity())
self.assertEquals("unit/piece",
sale_packing_list_line.getQuantityUnit())
delivery_line.getQuantityUnit())
self.assertEquals(1,
sale_packing_list_line.getPrice())
delivery_line.getPrice())
# fetch open order, open order line and subscription
person = self.portal.person_module['test_vifib_customer']
......@@ -93,51 +75,209 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# 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')
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(
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
self.assertEqual('solved', setup_invoice_line_list[0].getCausalityState())
# invoice shall have causality of one packing list
self.assertEqual(
[setup_delivery_line_list[0].getParentValue().getUid()],
setup_invoice_line_list[0].getParentValue().getCausalityUidList())
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 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')
def test_OpenOrder_sale_packing_list(self):
"""
Check that sale_packing_list is generated properly from simulation
"""
check_one_month = """
sequence_list = SequenceList()
sequence_string = \
self.prepare_installed_computer_partition_sequence_string + \
"""
LoginDefaultUser
TriggerNextBuild
TriggerBuild
Tic
Logout
CheckSubscriptionSalePackingListCoverage
TriggerBuild
Tic
# Nothing shall change
CheckHostingSubscriptionInitialDocumentCoverage
# Stop first Subscriptoin delivery and after triggering build check
# that invoice got updated
SelectNextSubscriptionDelivery
StartSubscriptionDelivery
StopSubscriptionDelivery
Tic
TriggerBuild
Tic
CheckHostingSubscriptionStoppedDocumentCoverage
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)
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)
# Check that simulation is created by the periodicity
self.assertEquals(len(expected_time_frame_list),
len(applied_rule.contentValues()) + 1)
# test the test: have we generated 12th next months coverage?
self.assertEqual(13, len(expected_time_frame_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(
simulation_movement_list = self.portal.portal_catalog(
portal_type='Simulation Movement',
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)
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
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())
......@@ -182,9 +190,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice.getResource())
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,6 +223,10 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_transaction_debit = None
for simulation_movement_invoice_transaction in \
simulation_movement_invoice_transaction_list:
# 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 = \
......@@ -224,7 +236,17 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
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,
......@@ -249,9 +271,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_transaction_credit.getSpecialise())
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,
......@@ -276,9 +298,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_invoice_transaction_debit.getSpecialise())
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
......@@ -311,7 +333,17 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
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,
......@@ -334,9 +366,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_credit_payment_credit.getSpecialise())
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,
......@@ -359,9 +391,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
simulation_movement_credit_payment_debit.getSpecialise())
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
......
......@@ -1226,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):
......
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
......@@ -4179,7 +4178,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'],
......
......@@ -790,6 +790,73 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
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
......
......@@ -28,7 +28,6 @@
#############################################################################
import unittest
from DateTime import DateTime
from lxml import etree
from slapos import slap
from testVifibSlapWebService import TestVifibSlapWebServiceMixin
......
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