Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
83e731d9
Commit
83e731d9
authored
Oct 26, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to delivery-less allocation.
parent
bd4bbde2
Changes
39
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
307 additions
and
604 deletions
+307
-604
master/bt5/slapos_cloud/ExtensionTemplateItem/SlapOSCloudSecurity.py
...slapos_cloud/ExtensionTemplateItem/SlapOSCloudSecurity.py
+69
-0
master/bt5/slapos_cloud/PathTemplateItem/portal_alarms/slapos_allocate_instance.xml
...thTemplateItem/portal_alarms/slapos_allocate_instance.xml
+6
-4
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_allocateInstance.xml
...Item/portal_skins/slapos_cloud/Alarm_allocateInstance.xml
+9
-7
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.xml
...teItem/portal_skins/slapos_cloud/Person_findPartition.xml
+7
-7
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_isAllowedToAllocate.xml
.../portal_skins/slapos_cloud/Person_isAllowedToAllocate.xml
+1
-9
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_restrictMethodAsShadowUser.xml
..._skins/slapos_cloud/Person_restrictMethodAsShadowUser.xml
+2
-2
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareInstance_tryToAllocatePartition.xml
.../slapos_cloud/SoftwareInstance_tryToAllocatePartition.xml
+46
-35
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_allocatePartition.xml
..._workflow/scripts/RequestedInstance_allocatePartition.xml
+1
-1
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
master/bt5/slapos_cloud/bt/template_extension_id_list
master/bt5/slapos_cloud/bt/template_extension_id_list
+1
-0
master/bt5/slapos_cloud/bt/template_path_list
master/bt5/slapos_cloud/bt/template_path_list
+1
-0
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
master/bt5/vifib_erp5/ExtensionTemplateItem/VifibSecurity.py
master/bt5/vifib_erp5/ExtensionTemplateItem/VifibSecurity.py
+0
-31
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
master/bt5/vifib_open_trade/bt/revision
master/bt5/vifib_open_trade/bt/revision
+1
-1
master/bt5/vifib_slap/PathTemplateItem/portal_alarms/confirm_ordered_sale_order.xml
...TemplateItem/portal_alarms/confirm_ordered_sale_order.xml
+0
-95
master/bt5/vifib_slap/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+0
-4
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_orderPlannedSaleOrder.xml
...m/portal_skins/vifib_slap/Alarm_orderPlannedSaleOrder.xml
+0
-79
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleOrderLine_tryToAllocatePartition.xml
...skins/vifib_slap/SaleOrderLine_tryToAllocatePartition.xml
+0
-137
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/interactions/SoftwareInstance_validate.xml
...ction_workflow/interactions/SoftwareInstance_validate.xml
+5
-7
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/SoftwareInstance_triggerAlarm.xml
...action_workflow/scripts/SoftwareInstance_triggerAlarm.xml
+5
-12
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
master/bt5/vifib_slap/bt/template_path_list
master/bt5/vifib_slap/bt/template_path_list
+0
-2
master/bt5/vifib_slap/bt/template_portal_type_workflow_chain_list
...t5/vifib_slap/bt/template_portal_type_workflow_chain_list
+0
-1
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
.../DocumentTemplateItem/portal_components/VifibRestAPIV1.py
+1
-5
master/bt5/vifib_slapos_rest_api_v1/bt/revision
master/bt5/vifib_slapos_rest_api_v1/bt/revision
+1
-1
master/product/Vifib/tests/testVifibSlapAllocationScope.py
master/product/Vifib/tests/testVifibSlapAllocationScope.py
+21
-21
master/product/Vifib/tests/testVifibSlapBang.py
master/product/Vifib/tests/testVifibSlapBang.py
+17
-17
master/product/Vifib/tests/testVifibSlapBug.py
master/product/Vifib/tests/testVifibSlapBug.py
+21
-21
master/product/Vifib/tests/testVifibSlapComputerGetComputerPartitionList.py
...ib/tests/testVifibSlapComputerGetComputerPartitionList.py
+2
-2
master/product/Vifib/tests/testVifibSlapComputerPartitionConnection.py
...t/Vifib/tests/testVifibSlapComputerPartitionConnection.py
+1
-1
master/product/Vifib/tests/testVifibSlapComputerPartitionLock.py
...product/Vifib/tests/testVifibSlapComputerPartitionLock.py
+2
-2
master/product/Vifib/tests/testVifibSlapComputerPartitionRequest.py
...duct/Vifib/tests/testVifibSlapComputerPartitionRequest.py
+31
-31
master/product/Vifib/tests/testVifibSlapComputerPartitionUpdate.py
...oduct/Vifib/tests/testVifibSlapComputerPartitionUpdate.py
+1
-1
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
+6
-6
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+17
-30
master/product/Vifib/tests/testVifibSlapWebServiceSlaveInstance.py
...oduct/Vifib/tests/testVifibSlapWebServiceSlaveInstance.py
+26
-26
master/product/Vifib/tests/testVifibUpgrader.py
master/product/Vifib/tests/testVifibUpgrader.py
+1
-1
master/product/Vifib/tests/testVifibUsageReport.py
master/product/Vifib/tests/testVifibUsageReport.py
+1
-1
No files found.
master/bt5/slapos_cloud/ExtensionTemplateItem/SlapOSCloudSecurity.py
0 → 100644
View file @
83e731d9
###############################################################################
#
# 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
)
master/bt5/
vifib_slap/PathTemplateItem/portal_alarms/order_planned_sale_order
.xml
→
master/bt5/
slapos_cloud/PathTemplateItem/portal_alarms/slapos_allocate_instance
.xml
View file @
83e731d9
...
@@ -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 Order
s
</string>
</value>
<value>
<string>
Allocates instance
s
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/
vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_confirmOrderedSaleOrder
.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_allocateInstance
.xml
View file @
83e731d9
...
@@ -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>
...
...
master/bt5/
vifib_base/SkinTemplateItem/portal_skins/vifib_base/OpenSaleOrder
_findPartition.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person
_findPartition.xml
View file @
83e731d9
...
@@ -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>
...
...
master/bt5/
vifib_open_trade/SkinTemplateItem/portal_skins/vifib_open_trade/Delivery_isDestinationSectionAllowedToRequest
.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_isAllowedToAllocate
.xml
View file @
83e731d9
...
@@ -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>
...
...
master/bt5/
vifib_erp5/SkinTemplateItem/portal_skins/vifib_core/OpenSaleOrder
_restrictMethodAsShadowUser.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person
_restrictMethodAsShadowUser.xml
View file @
83e731d9
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
</item>
</item>
<item>
<item>
<key>
<string>
_module
</string>
</key>
<key>
<string>
_module
</string>
</key>
<value>
<string>
Vifib
Security
</string>
</value>
<value>
<string>
SlapOSCloud
Security
</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>
...
...
master/bt5/
vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleOrderLine_tryToAssociateSoftwareRelease
.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareInstance_tryToAllocatePartition
.xml
View file @
83e731d9
...
@@ -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>
S
aleOrderLine_tryToAssociateSoftwareRelease
</string>
</value>
<value>
<string>
S
oftwareInstance_tryToAllocatePartition
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_allocatePartition.xml
View file @
83e731d9
...
@@ -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
...
...
master/bt5/slapos_cloud/bt/revision
View file @
83e731d9
102
103
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_cloud/bt/template_extension_id_list
0 → 100644
View file @
83e731d9
SlapOSCloudSecurity
\ No newline at end of file
master/bt5/slapos_cloud/bt/template_path_list
View file @
83e731d9
...
@@ -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
master/bt5/vifib_base/bt/revision
View file @
83e731d9
507
508
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_erp5/ExtensionTemplateItem/VifibSecurity.py
View file @
83e731d9
...
@@ -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."""
...
...
master/bt5/vifib_erp5/bt/revision
View file @
83e731d9
525
526
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_open_trade/bt/revision
View file @
83e731d9
185
186
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_slap/PathTemplateItem/portal_alarms/confirm_ordered_sale_order.xml
deleted
100644 → 0
View file @
bd4bbde2
<?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>
master/bt5/vifib_slap/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
83e731d9
...
@@ -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>
...
...
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_orderPlannedSaleOrder.xml
deleted
100644 → 0
View file @
bd4bbde2
<?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>
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleOrderLine_tryToAllocatePartition.xml
deleted
100644 → 0
View file @
bd4bbde2
<?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>
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/interactions/S
aleOrder_reindexObject
.xml
→
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/interactions/S
oftwareInstance_validate
.xml
View file @
83e731d9
...
@@ -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>
S
aleOrder_reindexObject
</string>
</value>
<value>
<string>
S
oftwareInstance_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>
...
...
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/S
aleOrder
_triggerAlarm.xml
→
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/S
oftwareInstance
_triggerAlarm.xml
View file @
83e731d9
...
@@ -50,19 +50,12 @@
...
@@ -50,19 +50,12 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
s
ale_order
= state_change[\'object\']\n
<value>
<string>
s
oftware_instance
= state_change[\'object\']\n
\n
\n
portal = s
ale_order
.getPortalObject()\n
portal = s
oftware_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>
S
aleOrder
_triggerAlarm
</string>
</value>
<value>
<string>
S
oftwareInstance
_triggerAlarm
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/vifib_slap/bt/revision
View file @
83e731d9
855
856
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_slap/bt/template_path_list
View file @
83e731d9
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
...
...
master/bt5/vifib_slap/bt/template_portal_type_workflow_chain_list
View file @
83e731d9
...
@@ -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
...
...
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
View file @
83e731d9
...
@@ -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'
])],
...
...
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
83e731d9
22
23
\ No newline at end of file
\ No newline at end of file
master/product/Vifib/tests/testVifibSlapAllocationScope.py
View file @
83e731d9
...
@@ -105,7 +105,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
...
@@ -105,7 +105,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# instantiate for owner
# instantiate for owner
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
SelectCurrentlyUsedSalePackingListUid
...
@@ -499,7 +499,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
...
@@ -499,7 +499,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
SelectCurrentlyUsedSalePackingListUid
...
@@ -653,7 +653,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
...
@@ -653,7 +653,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
SelectCurrentlyUsedSalePackingListUid
...
...
master/product/Vifib/tests/testVifibSlapBang.py
View file @
83e731d9
...
@@ -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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
SlapLogout
SlapLogout
...
@@ -880,7 +880,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -880,7 +880,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
RequestComputerPartition
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SlapLogout
SlapLogout
...
@@ -892,7 +892,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -892,7 +892,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
RequestComputerPartition
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SlapLogout
SlapLogout
...
@@ -978,7 +978,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -978,7 +978,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
CheckRaisesNotFoundComputerPartitionParameterDict
CheckRaisesNotFoundComputerPartitionParameterDict
Tic
Tic
RequestComputerPartition
RequestComputerPartition
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SlapLogout
SlapLogout
...
@@ -988,7 +988,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -988,7 +988,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
RenameCurrentSoftwareInstanceDead
RenameCurrentSoftwareInstanceDead
Tic
Tic
Bang
Bang
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
SlapLogout
SlapLogout
...
@@ -1002,7 +1002,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -1002,7 +1002,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
RequestComputerPartition
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SlapLogout
SlapLogout
...
@@ -1013,7 +1013,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -1013,7 +1013,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
RequestComputerPartition
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SlapLogout
SlapLogout
...
@@ -1025,7 +1025,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
...
@@ -1025,7 +1025,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
RequestComputerPartition
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SlapLogout
SlapLogout
...
...
master/product/Vifib/tests/testVifibSlapBug.py
View file @
83e731d9
...
@@ -14,7 +14,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -14,7 +14,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
PersonRequestSoftwareInstance
\
PersonRequestSoftwareInstance
\
Tic
\
Tic
\
Logout
\
Logout
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
...
@@ -1121,7 +1121,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1121,7 +1121,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
LoginDefaultUser
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstance
SaleOrderLineNoPartitionFound
SoftwareInstance
FailedAllocation
Logout
Logout
SlapLoginTestVifibCustomer
SlapLoginTestVifibCustomer
...
@@ -1130,7 +1130,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1130,7 +1130,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
SoftwareInstance
SaleOrderLineNoPartitionFound
SoftwareInstance
FailedAllocation
Logout
Logout
LoginERP5TypeTestCase
LoginERP5TypeTestCase
...
@@ -1167,7 +1167,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1167,7 +1167,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -1237,7 +1237,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1237,7 +1237,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -1280,7 +1280,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1280,7 +1280,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -1324,7 +1324,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1324,7 +1324,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Logout
Logout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
SelectCurrentlyUsedSalePackingListUid
...
@@ -1395,7 +1395,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1395,7 +1395,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
Logout
Logout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
...
@@ -1585,7 +1585,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1585,7 +1585,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
...
master/product/Vifib/tests/testVifibSlapComputerGetComputerPartitionList.py
View file @
83e731d9
...
@@ -225,7 +225,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
...
@@ -225,7 +225,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
SlapLogout
\
SlapLogout
\
\
\
LoginDefaultUser
\
LoginDefaultUser
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
Tic
\
Tic
\
CheckComputerPartitionInstanceSetupSalePackingListDelivered
\
CheckComputerPartitionInstanceSetupSalePackingListDelivered
\
Logout
\
Logout
\
...
@@ -255,7 +255,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
...
@@ -255,7 +255,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
SlapLogout
\
SlapLogout
\
\
\
LoginDefaultUser
\
LoginDefaultUser
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
Tic
\
Tic
\
SetDeliveryLineAmountEqualOne
\
SetDeliveryLineAmountEqualOne
\
CheckComputerPartitionInstanceSetupSalePackingListDelivered
\
CheckComputerPartitionInstanceSetupSalePackingListDelivered
\
...
...
master/product/Vifib/tests/testVifibSlapComputerPartitionConnection.py
View file @
83e731d9
...
@@ -42,7 +42,7 @@ class TestVifibSlapComputerPartitionConnection(TestVifibSlapWebServiceMixin):
...
@@ -42,7 +42,7 @@ class TestVifibSlapComputerPartitionConnection(TestVifibSlapWebServiceMixin):
Logout
Logout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
CheckGetSetConnectionDict
CheckGetSetConnectionDict
...
...
master/product/Vifib/tests/testVifibSlapComputerPartitionLock.py
View file @
83e731d9
...
@@ -65,7 +65,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
...
@@ -65,7 +65,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
\
\
LoginDefaultUser
\
LoginDefaultUser
\
SoftwareInstanceSaleOrderConfirmRaisesUnauthorized
\
SoftwareInstanceSaleOrderConfirmRaisesUnauthorized
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
Tic
\
Tic
\
AssertNoComputerPartition
\
AssertNoComputerPartition
\
Logout
\
Logout
\
...
@@ -94,7 +94,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
...
@@ -94,7 +94,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
\
\
LoginDefaultUser
\
LoginDefaultUser
\
SoftwareInstanceSaleOrderConfirmRaisesUnauthorized
\
SoftwareInstanceSaleOrderConfirmRaisesUnauthorized
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
Tic
\
Tic
\
AssertNoComputerPartition
\
AssertNoComputerPartition
\
Logout
\
Logout
\
...
...
master/product/Vifib/tests/testVifibSlapComputerPartitionRequest.py
View file @
83e731d9
This diff is collapsed.
Click to expand it.
master/product/Vifib/tests/testVifibSlapComputerPartitionUpdate.py
View file @
83e731d9
...
@@ -67,7 +67,7 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
...
@@ -67,7 +67,7 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
Logout
Logout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
SelectCurrentlyUsedSalePackingListUid
...
...
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
View file @
83e731d9
...
@@ -41,7 +41,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -41,7 +41,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
LoginDefaultUser
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstance
SaleOrderLineNoPartitionFound
SoftwareInstance
FailedAllocation
Logout
Logout
LoginERP5TypeTestCase
LoginERP5TypeTestCase
...
@@ -97,7 +97,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -97,7 +97,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -155,7 +155,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -155,7 +155,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -285,7 +285,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -285,7 +285,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
@@ -348,7 +348,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -348,7 +348,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
...
...
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
83e731d9
...
@@ -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
stepSoftwareInstance
SaleOrderLineNoPartitionFound
(
self
,
sequence
,
def
stepSoftwareInstance
FailedAllocation
(
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
RequestComputerPartition
RequestComputerPartition
...
@@ -1241,7 +1234,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
...
@@ -1241,7 +1234,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Logout
\
Logout
\
\
\
LoginDefaultUser
\
LoginDefaultUser
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
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
.
stepCall
ConfirmOrderedSaleOrder
Alarm
()
self
.
stepCall
SlaposAllocateInstance
Alarm
()
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
SelectCurrentlyUsedSalePackingListUid
SelectCurrentlyUsedSalePackingListUid
...
...
master/product/Vifib/tests/testVifibSlapWebServiceSlaveInstance.py
View file @
83e731d9
...
@@ -59,7 +59,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
...
@@ -59,7 +59,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic
Tic
Logout
Logout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
CheckSlaveInstanceNotReady
CheckSlaveInstanceNotReady
Logout
Logout
...
@@ -118,7 +118,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
...
@@ -118,7 +118,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Logout
Logout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SetSelectedComputerPartition
SetSelectedComputerPartition
...
@@ -149,7 +149,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
...
@@ -149,7 +149,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
Tic
Tic
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
LoginTestVifibCustomer
LoginTestVifibCustomer
SetSoftwareTitleRandom
SetSoftwareTitleRandom
PersonRequestSlaveInstance
PersonRequestSlaveInstance
Tic
Tic
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
SelectDifferentSoftwareReleaseUri
SelectDifferentSoftwareReleaseUri
LoginTestVifibCustomer
LoginTestVifibCustomer
SetSoftwareTitleRandom
SetSoftwareTitleRandom
PersonRequestSlaveInstance
PersonRequestSlaveInstance
Tic
Tic
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
CheckSlaveInstanceAssociationWithSoftwareInstance
CheckSlaveInstanceAssociationWithSoftwareInstance
SlapLogout
SlapLogout
...
@@ -362,7 +362,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
...
@@ -362,7 +362,7 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
SlapLogout
SlapLogout
LoginDefaultUser
LoginDefaultUser
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
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
Call
ConfirmOrderedSaleOrder
Alarm
Call
SlaposAllocateInstance
Alarm
Tic
Tic
Logout
Logout
SlapLoginCurrentSoftwareInstance
SlapLoginCurrentSoftwareInstance
...
...
master/product/Vifib/tests/testVifibUpgrader.py
View file @
83e731d9
...
@@ -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
():
...
...
master/product/Vifib/tests/testVifibUsageReport.py
View file @
83e731d9
...
@@ -58,7 +58,7 @@ class TestVifibUsageReportMixin(TestVifibSlapWebServiceMixin):
...
@@ -58,7 +58,7 @@ class TestVifibUsageReportMixin(TestVifibSlapWebServiceMixin):
Logout
\
Logout
\
\
\
LoginDefaultUser
\
LoginDefaultUser
\
Call
ConfirmOrderedSaleOrder
Alarm
\
Call
SlaposAllocateInstance
Alarm
\
Tic
\
Tic
\
SetSelectedComputerPartition
\
SetSelectedComputerPartition
\
SelectCurrentlyUsedSalePackingListUid
\
SelectCurrentlyUsedSalePackingListUid
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment