Commit 83e731d9 authored by Łukasz Nowak's avatar Łukasz Nowak

Switch to delivery-less allocation.

parent bd4bbde2
###############################################################################
#
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager, newSecurityManager
from AccessControl import Unauthorized
def restrictMethodAsShadowUser(self, shadow_document=None, callable_object=None,
argument_list=None, argument_dict=None):
"""
Restrict the security access of a method to the unaccessible shadow user
associated to the current user.
"""
if argument_list is None:
argument_list = []
if argument_dict is None:
argument_dict = {}
if shadow_document is None or callable_object is None:
raise TypeError('shadow_document and callable_object cannot be None')
relative_url = shadow_document.getRelativeUrl()
if shadow_document.getPortalType() not in ('Person', 'Software Instance',
'Computer'):
raise Unauthorized("%s portal type %r is not supported" % (relative_url,
shadow_document.getPortalType()))
else:
# Switch to the shadow user temporarily, so that the behavior would not
# change even if this method is invoked by random users.
acl_users = shadow_document.getPortalObject().acl_users
reference = shadow_document.getReference()
if reference is None:
raise Unauthorized('%r is not configured' % relative_url)
real_user = acl_users.getUserById(reference)
if real_user is None:
raise Unauthorized('%s is not loggable user' % relative_url)
sm = getSecurityManager()
shadow_user = acl_users.getUserById('SHADOW-' + reference)
if shadow_user is None:
raise Unauthorized('Shadow of %s is not loggable user' % relative_url)
newSecurityManager(None, shadow_user)
try:
return callable_object(*argument_list, **argument_dict)
finally:
# Restore the original user.
setSecurityManager(sm)
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>active_sense_method_id</string> </key> <key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_orderPlannedSaleOrder</string> </value> <value> <string>Alarm_allocateInstance</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>Orders planned Sale Orders.</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -20,7 +22,7 @@ ...@@ -20,7 +22,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>order_planned_sale_order</string> </value> <value> <string>slapos_allocate_instance</string> </value>
</item> </item>
<item> <item>
<key> <string>periodicity_hour</string> </key> <key> <string>periodicity_hour</string> </key>
...@@ -87,7 +89,7 @@ ...@@ -87,7 +89,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Order planned Sale Orders</string> </value> <value> <string>Allocates instances</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -51,13 +51,15 @@ ...@@ -51,13 +51,15 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
setup_service = portal.portal_preferences.getPreferredInstanceSetupResource()\n select_dict= {\'default_aggregate_uid\': None}\n
\n
portal.portal_catalog.searchAndActivate(\n portal.portal_catalog.searchAndActivate(\n
portal_type=\'Sale Order Line\',\n portal_type=(\'Slave Instance\', \'Software Instance\'),\n
default_resource_uid=portal.restrictedTraverse(setup_service).getUid(),\n validation_state=\'validated\',\n
simulation_state="ordered",\n default_aggregate_uid=None,\n
method_id=\'SaleOrderLine_tryToAllocatePartition\',\n select_dict=select_dict,\n
left_join_list=select_dict.keys(),\n
\n
method_id=\'SoftwareInstance_tryToAllocatePartition\',\n
packet_size=1, # Separate calls to many transactions\n packet_size=1, # Separate calls to many transactions\n
activate_kw={\'tag\': tag}\n activate_kw={\'tag\': tag}\n
)\n )\n
...@@ -71,7 +73,7 @@ context.activate(after_tag=tag).getId()\n ...@@ -71,7 +73,7 @@ context.activate(after_tag=tag).getId()\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Alarm_confirmOrderedSaleOrder</string> </value> <value> <string>Alarm_allocateInstance</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
import random\n import random\n
open_sale_order = context\n person = context\n
\n \n
computer_partition = None\n computer_partition = None\n
query_kw = {\n query_kw = {\n
...@@ -66,8 +66,8 @@ if software_instance_portal_type == "Slave Instance":\n ...@@ -66,8 +66,8 @@ if software_instance_portal_type == "Slave Instance":\n
elif software_instance_portal_type == "Software Instance":\n elif software_instance_portal_type == "Software Instance":\n
query_kw[\'free_for_request\'] = 1\n query_kw[\'free_for_request\'] = 1\n
else:\n else:\n
raise NotImplementedError, "Unknown portal type %s" % \\\n raise NotImplementedError("Unknown portal type %s"%\n
software_instance_portal_type \n software_instance_portal_type)\n
\n \n
# support SLA\n # support SLA\n
\n \n
...@@ -144,8 +144,8 @@ if test_mode:\n ...@@ -144,8 +144,8 @@ if test_mode:\n
SQL_WINDOW_SIZE = 50\n SQL_WINDOW_SIZE = 50\n
\n \n
# fetch at mot 50 random Computer Partitions, and check if they are ok\n # fetch at mot 50 random Computer Partitions, and check if they are ok\n
isTransitionPossible = open_sale_order.getPortalObject().portal_workflow.isTransitionPossible\n isTransitionPossible = person.getPortalObject().portal_workflow.isTransitionPossible\n
result_count = open_sale_order.portal_catalog.countResults(**query_kw)[0][0]\n result_count = person.portal_catalog.countResults(**query_kw)[0][0]\n
offset = max(0, result_count-1)\n offset = max(0, result_count-1)\n
if offset >= SQL_WINDOW_SIZE:\n if offset >= SQL_WINDOW_SIZE:\n
limit = (random.randint(0, offset), SQL_WINDOW_SIZE)\n limit = (random.randint(0, offset), SQL_WINDOW_SIZE)\n
...@@ -154,7 +154,7 @@ else:\n ...@@ -154,7 +154,7 @@ else:\n
\n \n
for computer_partition_candidate in context.portal_catalog(\n for computer_partition_candidate in context.portal_catalog(\n
limit=limit, **query_kw):\n limit=limit, **query_kw):\n
computer_partition_candidate = computer_partition_candidate.getObject() \n computer_partition_candidate = computer_partition_candidate.getObject()\n
if software_instance_portal_type == "Software Instance":\n if software_instance_portal_type == "Software Instance":\n
# Check if the computer partition can be marked as busy\n # Check if the computer partition can be marked as busy\n
if isTransitionPossible(computer_partition_candidate, \'mark_busy\'):\n if isTransitionPossible(computer_partition_candidate, \'mark_busy\'):\n
...@@ -183,7 +183,7 @@ return computer_partition.getRelativeUrl()\n ...@@ -183,7 +183,7 @@ return computer_partition.getRelativeUrl()\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>OpenSaleOrder_findPartition</string> </value> <value> <string>Person_findPartition</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -72,17 +72,9 @@ return True\n ...@@ -72,17 +72,9 @@ return True\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Delivery_isDestinationSectionAllowedToRequest</string> </value> <value> <string>Person_isAllowedToAllocate</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
</item> </item>
<item> <item>
<key> <string>_module</string> </key> <key> <string>_module</string> </key>
<value> <string>VifibSecurity</string> </value> <value> <string>SlapOSCloudSecurity</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>OpenSaleOrder_restrictMethodAsShadowUser</string> </value> <value> <string>Person_restrictMethodAsShadowUser</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -50,49 +50,60 @@ ...@@ -50,49 +50,60 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from zExceptions import Unauthorized\n from zExceptions import Unauthorized\n
\n \n
if context.getPortalType() not in (\'Software Instance\', \'Slave Instance\'):\n
raise TypeError(\'%s is not supported\' % context.getPortalType())\n
\n
def markHistory(document, comment):\n def markHistory(document, comment):\n
portal_workflow = document.portal_workflow\n portal_workflow = document.portal_workflow\n
last_workflow_item = portal_workflow.getInfoFor(ob=document, \n last_workflow_item = portal_workflow.getInfoFor(ob=document,\n
name=\'history\', wf_id=\'edit_workflow\')[-1]\n name=\'comment\', wf_id=\'edit_workflow\')\n
if last_workflow_item[\'comment\'] != comment:\n if last_workflow_item != comment:\n
portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n
\n \n
state = context.getSimulationState()\n def assignComputerPartition(software_instance):\n
portal = context.getPortalObject()\n computer_partition = software_instance.getAggregateValue(\n
order = context.getParentValue()\n portal_type="Computer Partition")\n
if state in [\'planned\', \'ordered\']:\n if computer_partition is None:\n
instance = context.getAggregateValue(portal_type=[\'Software Instance\', \'Slave Instance\'])\n hosting_subscription = software_instance.getSpecialiseValue(\n
instance_software_release_url = instance.getUrlString()\n portal_type=\'Hosting Subscription\')\n
line_software_release_document = context.getAggregateValue(portal_type=\'Software Release\')\n person = hosting_subscription.getDestinationSectionValue(portal_type=\'Person\')\n
line_software_release_url = \'\'\n if not person.Person_isAllowedToAllocate():\n
if line_software_release_document is not None:\n raise Unauthorized(\'Allocation disallowed\')\n
line_software_release_url = line_software_release_document.getUrlString()\n
\n \n
software_release_document = context.Base_getSoftwareReleaseDocument(instance_software_release_url)\n computer_partition_relative_url = person.Person_restrictMethodAsShadowUser(\n
shadow_document=person,\n
callable_object=person.Person_findPartition,\n
argument_list=[software_instance.getUrlString(), software_instance.getSourceReference(),\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
return computer_partition_relative_url\n
return (None, None)\n
\n \n
if line_software_release_url == \'\' or \\\n software_instance = context\n
line_software_release_url != instance_software_release_url:\n if software_instance.getValidataionState() != \'validated\' \\\n
if software_release_document is not None:\n or software_instance.getSlapState() not in (\'start_requested\', \'stop_requested\') \\\n
# update\n or software_instance.getAggregateValue(portal_type=\'Computer Partition\') is not None:\n
aggregate_value_list = [q for q in context.getAggregateValueList() if q.getPortalType() != \'Software Release\']\n return\n
aggregate_value_list.append(software_release_document)\n
context.setAggregateValueList(aggregate_value_list)\n
if context.getSimulationState() == \'planned\':\n
context.getParentValue().order(comment=\'Associated Software Release with %r\' % software_release_document.getUrlString())\n
else:\n
markHistory(context.getParentValue(), comment=\'Updated Software Release with %r\' % software_release_document.getUrlString())\n
return True\n
else:\n
return False\n
else:\n
# nothing to do, all asserted\n
return True\n
\n \n
return False\n try:\n
computer_partition_url = assignComputerPartition(software_instance)\n
except ValueError:\n
# It was not possible to find free Computer Partition\n
markHistory(software_instance, \'Allocation failed: no free Computer Partition\')\n
except Unauthorized, e:\n
# user has bad balance\n
markHistory(software_instance, \'Allocation failed: %s\' % e)\n
else:\n
if computer_partition_url is not None:\n
try:\n
software_instance.Base_checkConsistency()\n
except ValidationFailed:\n
# order not ready yet\n
markHistory(software_instance, \'Allocation failed: consistency failed\')\n
else:\n
software_instance.allocatePartition(computer_partition_url=computer_partition_url)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -101,7 +112,7 @@ return False\n ...@@ -101,7 +112,7 @@ return False\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrderLine_tryToAssociateSoftwareRelease</string> </value> <value> <string>SoftwareInstance_tryToAllocatePartition</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -59,7 +59,7 @@ kwargs = state_change.kwargs\n ...@@ -59,7 +59,7 @@ kwargs = state_change.kwargs\n
# Required args\n # Required args\n
# Raise TypeError if all parameters are not provided\n # Raise TypeError if all parameters are not provided\n
try:\n try:\n
computer_partition_url = kwargs[\'computer_partition\']\n computer_partition_url = kwargs[\'computer_partition_url\']\n
except KeyError:\n except KeyError:\n
raise TypeError, "RequestedInstance_allocatePartition takes exactly 1 argument"\n raise TypeError, "RequestedInstance_allocatePartition takes exactly 1 argument"\n
\n \n
......
102 103
\ No newline at end of file \ No newline at end of file
SlapOSCloudSecurity
\ No newline at end of file
...@@ -4,5 +4,6 @@ computer_module/template_computer/** ...@@ -4,5 +4,6 @@ computer_module/template_computer/**
hosting_subscription_module/template_hosting_subscription hosting_subscription_module/template_hosting_subscription
person_module/template_member person_module/template_member
person_module/template_member/** person_module/template_member/**
portal_alarms/slapos_allocate_instance
software_installation_module/template_software_installation software_installation_module/template_software_installation
software_instance_module/template_software_instance software_instance_module/template_software_instance
\ No newline at end of file
507 508
\ No newline at end of file \ No newline at end of file
...@@ -29,37 +29,6 @@ from AccessControl.SecurityManagement import getSecurityManager, \ ...@@ -29,37 +29,6 @@ from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager, newSecurityManager setSecurityManager, newSecurityManager
from AccessControl import Unauthorized from AccessControl import Unauthorized
def restrictMethodAsShadowUser(self, open_order=None, callable_object=None,
argument_list=None, argument_dict=None):
"""
Restrict the security access of a method to the unaccessible shadow user
associated to the current user.
"""
if argument_list is None:
argument_list = []
if argument_dict is None:
argument_dict = {}
if open_order is None or callable_object is None:
raise TypeError('open_order and callable_object cannot be None')
relative_url = open_order.getRelativeUrl()
if open_order.getPortalType() != 'Open Sale Order':
raise Unauthorized("%s is not an Open Sale Order" % relative_url)
else:
# Check that open order is the validated one for the current user
if open_order.getValidationState() != 'validated':
raise Unauthorized('Open Sale Order %s is not validated.' % relative_url)
acl_users = open_order.getPortalObject().acl_users
# Switch to the shadow user temporarily, so that the behavior would not
# change even if this method is invoked by random users.
sm = getSecurityManager()
newSecurityManager(None, acl_users.getUserById(open_order.getReference()))
try:
return callable_object(*argument_list, **argument_dict)
finally:
# Restore the original user.
setSecurityManager(sm)
def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None, def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
comment=None): comment=None):
"""Call bang on self.""" """Call bang on self."""
......
525 526
\ No newline at end of file \ No newline at end of file
185 186
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_confirmOrderedSaleOrder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Automatically confirm order Sale Order generated from Hosting web site (for demo)</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>confirm_ordered_sale_order</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="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>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>sense_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Confirm ordered Sale Order</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
<type>Sale Invoice Transaction</type> <type>Sale Invoice Transaction</type>
<workflow>slap_interaction_workflow</workflow> <workflow>slap_interaction_workflow</workflow>
</chain> </chain>
<chain>
<type>Sale Order</type>
<workflow>slap_interaction_workflow</workflow>
</chain>
<chain> <chain>
<type>Sale Packing List</type> <type>Sale Packing List</type>
<workflow>slap_interaction_workflow</workflow> <workflow>slap_interaction_workflow</workflow>
......
<?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
setup_service = portal.portal_preferences.getPreferredInstanceSetupResource()\n
\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Sale Order Line\',\n
default_resource_uid=portal.restrictedTraverse(setup_service).getUid(),\n
simulation_state="planned",\n
method_id=\'SaleOrderLine_tryToAssociateSoftwareRelease\',\n
packet_size=1, # Separate calls to many transactions\n
activate_kw={\'tag\': tag}\n
)\n
\n
context.activate(after_tag=tag).getId()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tag, fixit, params</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_orderPlannedSaleOrder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from zExceptions import Unauthorized\n
\n
def markHistory(document, comment):\n
portal_workflow = document.portal_workflow\n
last_workflow_item = portal_workflow.getInfoFor(ob=document, \n
name=\'comment\', wf_id=\'edit_workflow\')\n
if last_workflow_item != comment:\n
portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n
\n
def assignComputerPartition(order):\n
portal = context.getPortalObject()\n
\n
setup_service_relative_url = order.portal_preferences.getPreferredInstanceSetupResource()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n
instance_portal_type_list = ["Software Instance","Slave Instance"]\n
for order_line in order.getMovementList():\n
if order_line.getResource() == setup_service_relative_url:\n
computer_partition = order_line.getAggregateValue(portal_type="Computer Partition")\n
if computer_partition is None:\n
if not order.Delivery_isDestinationSectionAllowedToRequest():\n
raise Unauthorized(\'Request disallowed\')\n
software_release = order_line.getAggregateValue(portal_type="Software Release")\n
software_instance = order_line.getAggregateValue(portal_type=instance_portal_type_list)\n
\n
hosting_subscription = order_line.getAggregateValue(portal_type="Hosting Subscription")\n
open_order_line = portal.portal_catalog.getResultValue(\n
portal_type="Open Sale Order Line",\n
validation_state="validated",\n
aggregate_relative_url=hosting_subscription.getRelativeUrl(),\n
destination_section_relative_url=order.getDestinationSection())\n
if open_order_line is not None:\n
open_order = open_order_line.getParentValue()\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.getUrlString(), software_instance.getSourceReference(),\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
order_line.edit(\n
aggregate_list=order_line.getAggregateList()+[computer_partition_relative_url])\n
return (software_instance, computer_partition_relative_url)\n
else:\n
markHistory(order, \'Not confirmed: no open order line found.\')\n
return (None, None)\n
\n
sale_order = context.getParentValue()\n
if sale_order.getSimulationState() == \'ordered\':\n
if not context.SaleOrderLine_tryToAssociateSoftwareRelease():\n
# support changing software release for not instantiated orders\n
markHistory(sale_order, \'Software Release not associated.\')\n
try:\n
software_instance, computer_partition = assignComputerPartition(sale_order)\n
except ValueError:\n
# It was not possible to find free Computer Partition\n
markHistory(sale_order, \'Not confirmed: no free Computer Partition\')\n
except Unauthorized, e:\n
# user has bad balance\n
markHistory(sale_order, \'Not confirmed: %s\' % e)\n
else:\n
if computer_partition is not None:\n
try:\n
sale_order.Base_checkConsistency()\n
except ValidationFailed:\n
# order not ready yet\n
markHistory(sale_order, \'Not confirmed: consistency failed\')\n
else:\n
sale_order.setStopDate(DateTime())\n
sale_order.confirm()\n
software_instance.allocatePartition(computer_partition=computer_partition)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrderLine_tryToAllocatePartition</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
<item> <item>
<key> <string>activate_script_name</string> </key> <key> <string>activate_script_name</string> </key>
<value> <value>
<list> <tuple/>
<string>SaleOrder_triggerAlarm</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -50,14 +48,13 @@ ...@@ -50,14 +48,13 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_reindexObject</string> </value> <value> <string>SoftwareInstance_validate</string> </value>
</item> </item>
<item> <item>
<key> <string>method_id</string> </key> <key> <string>method_id</string> </key>
<value> <value>
<list> <list>
<string>reindexObject</string> <string>validate</string>
<string>recursiveReindexObject</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -69,7 +66,8 @@ ...@@ -69,7 +66,8 @@
<key> <string>portal_type_filter</string> </key> <key> <string>portal_type_filter</string> </key>
<value> <value>
<list> <list>
<string>Sale Order</string> <string>Slave Instance</string>
<string>Software Instance</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -50,19 +50,12 @@ ...@@ -50,19 +50,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>sale_order = state_change[\'object\']\n <value> <string>software_instance = state_change[\'object\']\n
\n \n
portal = sale_order.getPortalObject()\n portal = software_instance.getPortalObject()\n
\n \n
simulation_state = sale_order.getSimulationState()\n if software_instance.getValidationState() == \'validated\':\n
alarm = None\n context.Alarm_safeTrigger(portal.portal_alarms.slapos_allocate_instance)\n
if simulation_state == \'planned\':\n
alarm = portal.portal_alarms.order_planned_sale_order\n
elif simulation_state == \'ordered\':\n
alarm = portal.portal_alarms.confirm_ordered_sale_order\n
\n
if alarm is not None:\n
context.Alarm_safeTrigger(alarm)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -71,7 +64,7 @@ if alarm is not None:\n ...@@ -71,7 +64,7 @@ if alarm is not None:\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SaleOrder_triggerAlarm</string> </value> <value> <string>SoftwareInstance_triggerAlarm</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
855 856
\ No newline at end of file \ No newline at end of file
portal_alarms/cleanup_active_process portal_alarms/cleanup_active_process
portal_alarms/confirm_ordered_sale_order
portal_alarms/confirm_planned_sale_invoice_transaction portal_alarms/confirm_planned_sale_invoice_transaction
portal_alarms/deliver_subscription_sale_packing_list portal_alarms/deliver_subscription_sale_packing_list
portal_alarms/free_computer_partition portal_alarms/free_computer_partition
portal_alarms/garbage_collect_destroyed_root_tree portal_alarms/garbage_collect_destroyed_root_tree
portal_alarms/order_planned_sale_order
portal_alarms/stop_confirmed_sale_invoice_transaction portal_alarms/stop_confirmed_sale_invoice_transaction
portal_alarms/vifib_assert_hosting_subscription_predecessor portal_alarms/vifib_assert_hosting_subscription_predecessor
portal_alarms/vifib_bang_selenium_tester_instance portal_alarms/vifib_bang_selenium_tester_instance
......
...@@ -6,7 +6,6 @@ Open Sale Order | slap_interaction_workflow ...@@ -6,7 +6,6 @@ Open Sale Order | slap_interaction_workflow
Person | slap_interaction_workflow Person | slap_interaction_workflow
Purchase Packing List | slap_interaction_workflow Purchase Packing List | slap_interaction_workflow
Sale Invoice Transaction | slap_interaction_workflow Sale Invoice Transaction | slap_interaction_workflow
Sale Order | slap_interaction_workflow
Sale Packing List Line | slap_interaction_workflow Sale Packing List Line | slap_interaction_workflow
Sale Packing List | slap_interaction_workflow Sale Packing List | slap_interaction_workflow
Slave Instance | slap_interaction_workflow Slave Instance | slap_interaction_workflow
......
...@@ -408,11 +408,7 @@ class InstancePublisher(GenericPublisher): ...@@ -408,11 +408,7 @@ class InstancePublisher(GenericPublisher):
portal_type="Person") portal_type="Person")
else: else:
raise NotImplementedError, "Can not get Person document" raise NotImplementedError, "Can not get Person document"
open_order = self.portal_catalog.getResultValue( user.Person_findPartition(
portal_type='Open Sale Order',
default_destination_decision_uid=user.getUid(),
validation_state='validated')
result = open_order.OpenSaleOrder_findPartition(
self.jbody['software_release'], self.jbody['software_release'],
self.jbody['software_type'], self.jbody['software_type'],
('Software Instance', 'Slave Instance')[int(self.jbody['slave'])], ('Software Instance', 'Slave Instance')[int(self.jbody['slave'])],
......
22 23
\ No newline at end of file \ No newline at end of file
...@@ -105,7 +105,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -105,7 +105,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for owner # instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -122,7 +122,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -122,7 +122,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# fail to instantiate for someone else # fail to instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckNoRelatedSalePackingListLineForSoftwareInstance CheckNoRelatedSalePackingListLineForSoftwareInstance
Logout Logout
...@@ -135,7 +135,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -135,7 +135,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for owner # instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -204,7 +204,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -204,7 +204,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for owner # instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -221,7 +221,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -221,7 +221,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for friend # instantiate for friend
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -238,7 +238,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -238,7 +238,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# fail to instantiate for someone else # fail to instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckNoRelatedSalePackingListLineForSoftwareInstance CheckNoRelatedSalePackingListLineForSoftwareInstance
Logout Logout
...@@ -251,7 +251,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -251,7 +251,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for friend # instantiate for friend
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -307,7 +307,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -307,7 +307,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for owner # instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -324,7 +324,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -324,7 +324,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -379,7 +379,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -379,7 +379,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# fail to instantiate for owner # fail to instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckNoRelatedSalePackingListLineForSoftwareInstance CheckNoRelatedSalePackingListLineForSoftwareInstance
Logout Logout
...@@ -429,7 +429,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -429,7 +429,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# fail to instantiate for owner # fail to instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckNoRelatedSalePackingListLineForSoftwareInstance CheckNoRelatedSalePackingListLineForSoftwareInstance
Logout Logout
...@@ -481,7 +481,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -481,7 +481,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -499,7 +499,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -499,7 +499,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckSoftwareInstanceAndRelatedComputerPartition CheckSoftwareInstanceAndRelatedComputerPartition
CheckRequestedSoftwareInstanceAndRelatedComputerPartition CheckRequestedSoftwareInstanceAndRelatedComputerPartition
...@@ -530,7 +530,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -530,7 +530,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -597,7 +597,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -597,7 +597,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for friend # instantiate for friend
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -617,7 +617,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -617,7 +617,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -653,7 +653,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -653,7 +653,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckSoftwareInstanceAndRelatedComputerPartition CheckSoftwareInstanceAndRelatedComputerPartition
CheckRequestedSoftwareInstanceAndRelatedComputerPartition CheckRequestedSoftwareInstanceAndRelatedComputerPartition
...@@ -684,7 +684,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -684,7 +684,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -728,7 +728,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -728,7 +728,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -803,7 +803,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -803,7 +803,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for owner # instantiate for owner
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
...@@ -822,7 +822,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin): ...@@ -822,7 +822,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for someone else # instantiate for someone else
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
......
...@@ -26,7 +26,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -26,7 +26,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
root_software_instance.requestInstance(software_title=S1, root_software_instance.requestInstance(software_title=S1,
**common_kw) **common_kw)
self.stepTic() self.stepTic()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
S1_instance = self.portal.portal_catalog.getResultValue( S1_instance = self.portal.portal_catalog.getResultValue(
...@@ -34,13 +34,13 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -34,13 +34,13 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
S1_instance.requestInstance(software_title=S2, **common_kw) S1_instance.requestInstance(software_title=S2, **common_kw)
self.stepTic() self.stepTic()
S1_instance.requestInstance(software_title=S3, **common_kw) S1_instance.requestInstance(software_title=S3, **common_kw)
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
root_software_instance.requestInstance(software_title=S4, root_software_instance.requestInstance(software_title=S4,
**common_kw) **common_kw)
self.stepTic() self.stepTic()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
S2_instance = self.portal.portal_catalog.getResultValue( S2_instance = self.portal.portal_catalog.getResultValue(
...@@ -379,7 +379,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -379,7 +379,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
</instance>""" % sequence['computer_reference_c1'], </instance>""" % sequence['computer_reference_c1'],
**common_kw) **common_kw)
self.stepTic() self.stepTic()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
self.logout() self.logout()
...@@ -397,7 +397,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -397,7 +397,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
</instance>""" % sequence['computer_reference_c0'], </instance>""" % sequence['computer_reference_c0'],
**common_kw) **common_kw)
self.stepTic() self.stepTic()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
self.logout() self.logout()
...@@ -419,7 +419,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -419,7 +419,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
self.logout() self.logout()
self.stepLoginDefaultUser() self.stepLoginDefaultUser()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
S3_instance = self.portal.portal_catalog.getResultValue( S3_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S3) portal_type='Software Instance', title=S3)
...@@ -521,7 +521,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -521,7 +521,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -639,7 +639,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -639,7 +639,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
software_title=S1, software_title=S1,
**common_kw) **common_kw)
self.stepTic() self.stepTic()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
self.logout() self.logout()
...@@ -764,7 +764,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -764,7 +764,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
Bang Bang
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
SlapLogout SlapLogout
Tic Tic
LoginTestVifibCustomer LoginTestVifibCustomer
...@@ -856,7 +856,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -856,7 +856,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
RenameCurrentSoftwareInstanceDead RenameCurrentSoftwareInstanceDead
Tic Tic
Bang Bang
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLogout SlapLogout
...@@ -880,7 +880,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -880,7 +880,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartition RequestComputerPartition
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
...@@ -892,7 +892,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -892,7 +892,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartition RequestComputerPartition
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
...@@ -978,7 +978,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -978,7 +978,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
Tic Tic
RequestComputerPartition RequestComputerPartition
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
...@@ -988,7 +988,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -988,7 +988,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
RenameCurrentSoftwareInstanceDead RenameCurrentSoftwareInstanceDead
Tic Tic
Bang Bang
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLogout SlapLogout
...@@ -1002,7 +1002,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -1002,7 +1002,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartition RequestComputerPartition
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
...@@ -1013,7 +1013,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -1013,7 +1013,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartition RequestComputerPartition
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
...@@ -1025,7 +1025,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin): ...@@ -1025,7 +1025,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartition RequestComputerPartition
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
......
...@@ -14,7 +14,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -14,7 +14,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
PersonRequestSoftwareInstance \ PersonRequestSoftwareInstance \
Tic \ Tic \
Logout \ Logout \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
CleanTic \ CleanTic \
CallVifibTriggerBuildAlarm \ CallVifibTriggerBuildAlarm \
CleanTic \ CleanTic \
...@@ -246,7 +246,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -246,7 +246,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -350,7 +350,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -350,7 +350,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
RequestComputerPartition RequestComputerPartition
...@@ -571,7 +571,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -571,7 +571,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -692,7 +692,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -692,7 +692,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -710,7 +710,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -710,7 +710,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -740,7 +740,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -740,7 +740,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -859,7 +859,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -859,7 +859,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -876,7 +876,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -876,7 +876,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -906,7 +906,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -906,7 +906,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -1033,7 +1033,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1033,7 +1033,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -1050,7 +1050,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1050,7 +1050,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -1121,7 +1121,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1121,7 +1121,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
LoginDefaultUser LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstanceSaleOrderLineNoPartitionFound SoftwareInstanceFailedAllocation
Logout Logout
SlapLoginTestVifibCustomer SlapLoginTestVifibCustomer
...@@ -1130,7 +1130,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1130,7 +1130,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
SoftwareInstanceSaleOrderLineNoPartitionFound SoftwareInstanceFailedAllocation
Logout Logout
LoginERP5TypeTestCase LoginERP5TypeTestCase
...@@ -1167,7 +1167,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1167,7 +1167,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -1237,7 +1237,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1237,7 +1237,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -1280,7 +1280,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1280,7 +1280,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -1324,7 +1324,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1324,7 +1324,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -1395,7 +1395,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1395,7 +1395,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -1442,7 +1442,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1442,7 +1442,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -1585,7 +1585,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1585,7 +1585,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
......
...@@ -225,7 +225,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -225,7 +225,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
SlapLogout \ SlapLogout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckComputerPartitionInstanceSetupSalePackingListDelivered \ CheckComputerPartitionInstanceSetupSalePackingListDelivered \
Logout \ Logout \
...@@ -255,7 +255,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -255,7 +255,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
SlapLogout \ SlapLogout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
SetDeliveryLineAmountEqualOne \ SetDeliveryLineAmountEqualOne \
CheckComputerPartitionInstanceSetupSalePackingListDelivered \ CheckComputerPartitionInstanceSetupSalePackingListDelivered \
......
...@@ -42,7 +42,7 @@ class TestVifibSlapComputerPartitionConnection(TestVifibSlapWebServiceMixin): ...@@ -42,7 +42,7 @@ class TestVifibSlapComputerPartitionConnection(TestVifibSlapWebServiceMixin):
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckGetSetConnectionDict CheckGetSetConnectionDict
......
...@@ -65,7 +65,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin): ...@@ -65,7 +65,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
\ \
LoginDefaultUser \ LoginDefaultUser \
SoftwareInstanceSaleOrderConfirmRaisesUnauthorized \ SoftwareInstanceSaleOrderConfirmRaisesUnauthorized \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
AssertNoComputerPartition \ AssertNoComputerPartition \
Logout \ Logout \
...@@ -94,7 +94,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin): ...@@ -94,7 +94,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
\ \
LoginDefaultUser \ LoginDefaultUser \
SoftwareInstanceSaleOrderConfirmRaisesUnauthorized \ SoftwareInstanceSaleOrderConfirmRaisesUnauthorized \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
AssertNoComputerPartition \ AssertNoComputerPartition \
Logout \ Logout \
......
...@@ -46,7 +46,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -46,7 +46,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \ SlapLogout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \ CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \ CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
...@@ -89,7 +89,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -89,7 +89,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \ SlapLogout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \ CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \ CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
...@@ -160,7 +160,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -160,7 +160,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \ CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \ CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
...@@ -240,7 +240,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -240,7 +240,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \ CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \ CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
...@@ -252,7 +252,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -252,7 +252,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
CheckRequestedComputerPartitionCleanParameterList \ CheckRequestedComputerPartitionCleanParameterList \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
SetCurrentSoftwareInstanceRequested \ SetCurrentSoftwareInstanceRequested \
...@@ -471,7 +471,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -471,7 +471,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \ SlapLogout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \ CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \ CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
...@@ -506,7 +506,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -506,7 +506,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckSoftwareInstanceAndRelatedComputerPartition \ CheckSoftwareInstanceAndRelatedComputerPartition \
CheckRequestedSoftwareInstanceAndRelatedComputerPartition \ CheckRequestedSoftwareInstanceAndRelatedComputerPartition \
...@@ -580,7 +580,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -580,7 +580,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
RequestComputerPartition RequestComputerPartition
...@@ -612,7 +612,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -612,7 +612,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition RequestComputerPartition
Tic Tic
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
RequestComputerPartition RequestComputerPartition
...@@ -675,7 +675,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -675,7 +675,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
RequestSlaveInstanceFromComputerPartition RequestSlaveInstanceFromComputerPartition
...@@ -796,7 +796,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -796,7 +796,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -818,7 +818,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -818,7 +818,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
RequestComputerPartition RequestComputerPartition
...@@ -991,7 +991,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -991,7 +991,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentComputer SlapLoginCurrentComputer
CheckSlaveInstanceListFromOneComputerPartition CheckSlaveInstanceListFromOneComputerPartition
...@@ -1025,7 +1025,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1025,7 +1025,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -1079,7 +1079,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1079,7 +1079,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentComputer SlapLoginCurrentComputer
CheckSlaveInstanceListFromOneComputerPartition CheckSlaveInstanceListFromOneComputerPartition
...@@ -1090,7 +1090,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1090,7 +1090,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentComputer SlapLoginCurrentComputer
CheckSlaveInstanceListFromOneComputerPartition CheckSlaveInstanceListFromOneComputerPartition
...@@ -1125,8 +1125,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1125,8 +1125,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
LoginDefaultUser LoginDefaultUser
SelectSlaveInstanceFromSaleOrderOrdered SelectSlaveInstanceFromSaleOrderOrdered
SoftwareInstanceSaleOrderLineNoPartitionFound SoftwareInstanceFailedAllocation
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetDeliveryLineAmountEqualZero SetDeliveryLineAmountEqualZero
CheckComputerPartitionInstanceSetupSalePackingListDelivered CheckComputerPartitionInstanceSetupSalePackingListDelivered
...@@ -1151,7 +1151,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1151,7 +1151,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
""" """
...@@ -1249,7 +1249,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1249,7 +1249,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
SelectSlaveInstanceFromSaleOrderOrdered \ SelectSlaveInstanceFromSaleOrderOrdered \
SoftwareInstanceSaleOrderLineNoPartitionFound \ SoftwareInstanceFailedAllocation \
Tic \ Tic \
Logout \ Logout \
SlapLoginCurrentSoftwareInstance \ SlapLoginCurrentSoftwareInstance \
...@@ -1258,7 +1258,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1258,7 +1258,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
SetDeliveryLineAmountEqualOne \ SetDeliveryLineAmountEqualOne \
CheckComputerPartitionInstanceSetupSalePackingListDelivered \ CheckComputerPartitionInstanceSetupSalePackingListDelivered \
...@@ -1271,7 +1271,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1271,7 +1271,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
CheckComputerPartitionInstanceSetupSalePackingListDelivered \ CheckComputerPartitionInstanceSetupSalePackingListDelivered \
Logout \ Logout \
...@@ -1342,7 +1342,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1342,7 +1342,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
SlapLoginTestVifibCustomer \ SlapLoginTestVifibCustomer \
...@@ -1369,7 +1369,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1369,7 +1369,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestSlaveInstanceFromComputerPartition \ RequestSlaveInstanceFromComputerPartition \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
RequestSlaveInstanceFromComputerPartition \ RequestSlaveInstanceFromComputerPartition \
...@@ -1429,7 +1429,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1429,7 +1429,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
SlapLoginCurrentComputer \ SlapLoginCurrentComputer \
CheckSlaveInstanceListFromOneComputerPartition \ CheckSlaveInstanceListFromOneComputerPartition \
...@@ -1447,7 +1447,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1447,7 +1447,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
SlapLoginTestVifibCustomer \ SlapLoginTestVifibCustomer \
...@@ -1474,7 +1474,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1474,7 +1474,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestSlaveInstanceFromComputerPartition \ RequestSlaveInstanceFromComputerPartition \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
RequestSlaveInstanceFromComputerPartition \ RequestSlaveInstanceFromComputerPartition \
...@@ -1594,7 +1594,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1594,7 +1594,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition \ RequestComputerPartition \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
RequestComputerPartition \ RequestComputerPartition \
...@@ -1604,7 +1604,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1604,7 +1604,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartitionWithAnotherSoftwareType \ RequestComputerPartitionWithAnotherSoftwareType \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
CheckRequestComputerPartitionWithAnotherSoftwareType \ CheckRequestComputerPartitionWithAnotherSoftwareType \
...@@ -1632,7 +1632,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1632,7 +1632,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition \ RequestComputerPartition \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
SlapLoginCurrentSoftwareInstance \ SlapLoginCurrentSoftwareInstance \
...@@ -1654,7 +1654,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1654,7 +1654,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
RequestComputerPartition \ RequestComputerPartition \
Tic \ Tic \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
Logout \ Logout \
CheckRequestComputerPartitionWithAnotherSoftwareRelease \ CheckRequestComputerPartitionWithAnotherSoftwareRelease \
......
...@@ -67,7 +67,7 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin): ...@@ -67,7 +67,7 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
......
...@@ -41,7 +41,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -41,7 +41,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
LoginDefaultUser LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstanceSaleOrderLineNoPartitionFound SoftwareInstanceFailedAllocation
Logout Logout
LoginERP5TypeTestCase LoginERP5TypeTestCase
...@@ -97,7 +97,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -97,7 +97,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -155,7 +155,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -155,7 +155,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -285,7 +285,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -285,7 +285,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
...@@ -348,7 +348,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -348,7 +348,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
......
...@@ -355,7 +355,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -355,7 +355,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
portal_type='Sale Order Line').getAggregateValue( portal_type='Sale Order Line').getAggregateValue(
portal_type='Hosting Subscription').getUid()) portal_type='Hosting Subscription').getUid())
def stepSoftwareInstanceSaleOrderLineNoPartitionFound(self, sequence, def stepSoftwareInstanceFailedAllocation(self, sequence,
**kw): **kw):
"""Checks that current software instance is realted only with sale order """Checks that current software instance is realted only with sale order
and that no partition is found and that no partition is found
...@@ -363,18 +363,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -363,18 +363,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']) uid=sequence['software_instance_uid'])
aggregate_value_list = software_instance.getAggregateRelatedValueList( self.assertEqual(None, software_instance.getAggregateValue(
portal_type=[self.sale_packing_list_line_portal_type, portal_type='Computer Partition'))
self.sale_order_line_portal_type]) software_instance.SoftwareInstance_tryToAllocatePartition()
self.assertEqual(None, software_instance.getAggregateValue(
self.assertEqual(1, len(aggregate_value_list)) portal_type='Computer Partition'))
self.assertTrue(self.sale_order_line_portal_type in [q.getPortalType() for\
q in aggregate_value_list])
sale_order_line = aggregate_value_list[0]
self.assertNotEqual('confirmed', sale_order_line.getSimulationState())
sale_order_line.SaleOrderLine_tryToAllocatePartition()
self.assertNotEqual('confirmed', sale_order_line.getSimulationState())
def stepCheckViewCurrentSoftwareInstance(self, sequence, **kw): def stepCheckViewCurrentSoftwareInstance(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
...@@ -1007,7 +1000,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -1007,7 +1000,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
prepare_install_requested_computer_partition_sequence_string = \ prepare_install_requested_computer_partition_sequence_string = \
prepare_person_requested_software_instance + """ prepare_person_requested_software_instance + """
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CallVifibTriggerBuildAlarm CallVifibTriggerBuildAlarm
CleanTic CleanTic
...@@ -1128,7 +1121,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -1128,7 +1121,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict \ CheckRaisesNotFoundComputerPartitionParameterDict \
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
RequestComputerPartition \ RequestComputerPartition \
...@@ -1146,7 +1139,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -1146,7 +1139,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Tic Tic
CheckRaisesNotFoundComputerPartitionParameterDict CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
RequestComputerPartition RequestComputerPartition
...@@ -1241,7 +1234,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -1241,7 +1234,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Logout \ Logout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
CleanTic \ CleanTic \
CallVifibExpandConfirmedSaleOrderAlarm \ CallVifibExpandConfirmedSaleOrderAlarm \
CleanTic \ CleanTic \
...@@ -1658,7 +1651,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -1658,7 +1651,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_type, software_type + str(2)) software_type, software_type + str(2))
self.stepLoginDefaultUser() self.stepLoginDefaultUser()
self.stepTic() self.stepTic()
self.stepCallConfirmOrderedSaleOrderAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.stepTic() self.stepTic()
self.stepLogout() self.stepLogout()
first = slap_computer_partition.request(software_release, first = slap_computer_partition.request(software_release,
...@@ -2651,17 +2644,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -2651,17 +2644,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
def stepCheckSlaveInstanceNotReady(self, sequence): def stepCheckSlaveInstanceNotReady(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue( slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']) uid=sequence['software_instance_uid'])
self.assertEquals(self.slave_instance_portal_type, self.assertEqual(slave_instance.getAggregateValue(
slave_instance.getPortalType()) portal_type='Computer Partition'))
sale_order_line = slave_instance.getAggregateRelatedValue( slave_instance.SoftwareInstance_tryToAllocatePartition()
portal_type=self.sale_order_line_portal_type) self.assertEqual(slave_instance.getAggregateValue(
self.assertEquals("ordered", sale_order_line.getSimulationState()) portal_type='Computer Partition'))
sale_order_line.SaleOrderLine_tryToAllocatePartition()
transaction.commit()
self.assertEquals("ordered", sale_order_line.getSimulationState())
sale_packing_list_line = slave_instance.getAggregateRelatedValue(
portal_type=self.sale_packing_list_line_portal_type)
self.assertEquals(sale_packing_list_line, None)
def stepSelectSlaveInstanceFromOneComputerPartition(self, sequence): def stepSelectSlaveInstanceFromOneComputerPartition(self, sequence):
slave_instance = self._getSlaveInstanceFromCurrentComputerPartition(sequence) slave_instance = self._getSlaveInstanceFromCurrentComputerPartition(sequence)
...@@ -3258,7 +3245,7 @@ class TestVifibSlapWebService(TestVifibSlapWebServiceMixin): ...@@ -3258,7 +3245,7 @@ class TestVifibSlapWebService(TestVifibSlapWebServiceMixin):
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
......
...@@ -59,7 +59,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -59,7 +59,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Tic # in order to call real build Tic # in order to call real build
CheckComputerPartitionSaleOrderAggregatedList CheckComputerPartitionSaleOrderAggregatedList
...@@ -92,7 +92,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -92,7 +92,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckSlaveInstanceNotReady CheckSlaveInstanceNotReady
Logout Logout
...@@ -118,7 +118,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -118,7 +118,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Logout Logout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
...@@ -149,7 +149,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -149,7 +149,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
LoginTestVifibCustomer LoginTestVifibCustomer
...@@ -183,7 +183,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -183,7 +183,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSlaveInstance PersonRequestSlaveInstance
Tic Tic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentComputer SlapLoginCurrentComputer
SoftwareInstanceAvailable SoftwareInstanceAvailable
...@@ -216,13 +216,13 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -216,13 +216,13 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSoftwareInstance PersonRequestSoftwareInstance
CleanTic CleanTic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
LoginTestVifibCustomer LoginTestVifibCustomer
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSlaveInstance PersonRequestSlaveInstance
Tic Tic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentComputer SlapLoginCurrentComputer
SoftwareInstanceAvailable SoftwareInstanceAvailable
...@@ -250,7 +250,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -250,7 +250,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSlaveInstance PersonRequestSlaveInstance
Tic Tic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckSlaveInstanceNotReady CheckSlaveInstanceNotReady
Logout Logout
...@@ -280,7 +280,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -280,7 +280,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSlaveInstance PersonRequestSlaveInstance
Tic Tic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckSlaveInstanceReady CheckSlaveInstanceReady
CheckSlaveInstanceAllocationWithTwoDifferentSoftwareInstance CheckSlaveInstanceAllocationWithTwoDifferentSoftwareInstance
...@@ -307,7 +307,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -307,7 +307,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSlaveInstance PersonRequestSlaveInstance
Tic Tic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
""" + self.prepare_published_software_release + """ """ + self.prepare_published_software_release + """
Tic Tic
...@@ -323,14 +323,14 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -323,14 +323,14 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSoftwareInstance PersonRequestSoftwareInstance
CleanTic CleanTic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SelectDifferentSoftwareReleaseUri SelectDifferentSoftwareReleaseUri
LoginTestVifibCustomer LoginTestVifibCustomer
SetSoftwareTitleRandom SetSoftwareTitleRandom
PersonRequestSlaveInstance PersonRequestSlaveInstance
Tic Tic
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckSlaveInstanceAssociationWithSoftwareInstance CheckSlaveInstanceAssociationWithSoftwareInstance
SlapLogout SlapLogout
...@@ -362,7 +362,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -362,7 +362,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
CheckTwoSlaveInstanceRequest CheckTwoSlaveInstanceRequest
SlapLogout SlapLogout
...@@ -395,7 +395,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -395,7 +395,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
SlapLoginCurrentComputer SlapLoginCurrentComputer
...@@ -441,7 +441,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -441,7 +441,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
SlapLoginCurrentComputer SlapLoginCurrentComputer
...@@ -493,7 +493,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -493,7 +493,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentComputer SlapLoginCurrentComputer
...@@ -545,7 +545,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -545,7 +545,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
LoginTestVifibCustomer LoginTestVifibCustomer
RequestSoftwareInstanceDestroy RequestSoftwareInstanceDestroy
...@@ -575,7 +575,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -575,7 +575,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
LoginAsCustomerA LoginAsCustomerA
...@@ -584,7 +584,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -584,7 +584,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLogout SlapLogout
LoginTestVifibCustomer LoginTestVifibCustomer
...@@ -615,7 +615,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -615,7 +615,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginCurrentComputer SlapLoginCurrentComputer
CheckSlaveInstanceListFromOneComputerPartition CheckSlaveInstanceListFromOneComputerPartition
...@@ -644,7 +644,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -644,7 +644,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
StoreSalePackingListLineFromSlaveInstance StoreSalePackingListLineFromSlaveInstance
StoreSaleOrderFromSlaveInstance StoreSaleOrderFromSlaveInstance
...@@ -678,7 +678,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -678,7 +678,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SlapLoginSoftwareInstanceFromCurrentSoftwareInstance SlapLoginSoftwareInstanceFromCurrentSoftwareInstance
SetConnectionXmlToSlaveInstance SetConnectionXmlToSlaveInstance
...@@ -722,7 +722,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -722,7 +722,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
RequestSlaveInstanceFromComputerPartition RequestSlaveInstanceFromComputerPartition
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -792,7 +792,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -792,7 +792,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
RequestSlaveInstanceFromComputerPartition RequestSlaveInstanceFromComputerPartition
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
...@@ -822,7 +822,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -822,7 +822,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Logout Logout
Tic Tic
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
SetSelectedComputerPartition SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid SelectCurrentlyUsedSalePackingListUid
...@@ -837,7 +837,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -837,7 +837,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic Tic
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm CallSlaposAllocateInstanceAlarm
Tic Tic
Logout Logout
SlapLoginCurrentSoftwareInstance SlapLoginCurrentSoftwareInstance
......
...@@ -42,7 +42,7 @@ class TestVifibUpgrader(testVifibMixin): ...@@ -42,7 +42,7 @@ class TestVifibUpgrader(testVifibMixin):
self.assertEqual(1, self.assertEqual(1,
self.portal.portal_alarms.accept_submitted_credentials.isEnabled()) self.portal.portal_alarms.accept_submitted_credentials.isEnabled())
self.assertEqual(1, self.assertEqual(1,
self.portal.portal_alarms.confirm_ordered_sale_order.isEnabled()) self.portal.portal_alarms.slapos_allocate_instance.isEnabled())
def test_suite(): def test_suite():
......
...@@ -58,7 +58,7 @@ class TestVifibUsageReportMixin(TestVifibSlapWebServiceMixin): ...@@ -58,7 +58,7 @@ class TestVifibUsageReportMixin(TestVifibSlapWebServiceMixin):
Logout \ Logout \
\ \
LoginDefaultUser \ LoginDefaultUser \
CallConfirmOrderedSaleOrderAlarm \ CallSlaposAllocateInstanceAlarm \
Tic \ Tic \
SetSelectedComputerPartition \ SetSelectedComputerPartition \
SelectCurrentlyUsedSalePackingListUid \ SelectCurrentlyUsedSalePackingListUid \
......
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