Commit 4fea8805 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud:

* drop ComputerNetwork_getSoftwareReleaseAllocableState
  source_administration is not used anymore on Compute Node
* source_administration is not used anymore on Compute Node
* drop transfer from another Project
* drop transfer from another Project
* drop transfer from another Project
* drop transfer from another Project
* drop allocation_scope/open categories
* drop allocation_scope/open categories
* move test function to mixin
* drop ERP5Type_getSecurityCategoryFromAssignmentDestinationClientOrganisation
* add SlapOSVirtualMasterSourceProjectConstraint
* force source_project accessors when using SlapOSVirtualMasterSourceProjectConstraint
* use instance/computer project in the security mapping
* test use production/manager to request compute node
* allocation_scope/open/public and friend do not exist anymore
* only allocate on allocation_scope/open
* only allocate on allocation_scope/open
parent 0e4432f8
......@@ -29,7 +29,7 @@ from Products.ERP5Security.ERP5GroupManager import ConsistencyError
from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager, newSecurityManager
from AccessControl import Unauthorized
from DateTime import DateTime
def getComputeNodeSecurityCategory(self, base_category_list, user_name,
ob, portal_type):
......@@ -47,10 +47,19 @@ def getComputeNodeSecurityCategory(self, base_category_list, user_name,
)
if len(compute_node_list) == 1:
category_dict = {}
for base_category in base_category_list:
if base_category == "role":
category_list.append(
{base_category: ['role/computer']})
elif base_category == "destination_project":
compute_node = compute_node_list[0]
project = compute_node.getFollowUpValue(portal_type='Project')
if project is not None:
category_dict.setdefault(base_category, []).append(project.getRelativeUrl())
else:
raise NotImplementedError('Not supported base category: %s' % base_category)
category_list.append(category_dict)
elif len(compute_node_list) > 1:
raise ConsistencyError("Error: There is more than one Compute Node " \
"with reference '%s'" % user_name)
......@@ -77,11 +86,18 @@ def getSoftwareInstanceSecurityCategory(self, base_category_list, user_name,
for base_category in base_category_list:
if base_category == "role":
category_dict.setdefault(base_category, []).extend(['role/instance'])
if base_category == "aggregate":
elif base_category == "destination_project":
software_instance = software_instance_list[0]
project = software_instance.getFollowUpValue(portal_type='Project')
if project is not None:
category_dict.setdefault(base_category, []).append(project.getRelativeUrl())
elif base_category == "aggregate":
software_instance = software_instance_list[0]
instance_tree = software_instance.getSpecialiseValue(portal_type='Instance Tree')
if instance_tree is not None:
category_dict.setdefault(base_category, []).append(instance_tree.getRelativeUrl())
else:
raise NotImplementedError('Not supported base category: %s' % base_category)
category_list.append(category_dict)
elif len(software_instance_list) > 1:
raise ConsistencyError("Error: There is more than one Software Instance " \
......@@ -126,68 +142,3 @@ def restrictMethodAsShadowUser(self, shadow_document=None, callable_object=None,
finally:
# Restore the original user.
setSecurityManager(sm)
def getSecurityCategoryFromAssignmentDestinationClientOrganisation(
self,
base_category_list,
user_name,
ob,
portal_type,
child_category_list=None
):
"""
This script returns a list of dictionaries which represent
the security groups which a person is member of. It extracts
the categories from the current user assignment.
It is useful in the following cases:
- associate a document (ex. an accounting transaction)
to the division which the user was assigned to
at the time it was created
- calculate security membership of a user
The parameters are
base_category_list -- list of category values we need to retrieve
user_name -- string obtained from getSecurityManager().getUser().getId()
ob -- object which we want to assign roles to
portal_type -- portal type of object
"""
category_list = []
if child_category_list is None:
child_category_list = []
user_path_set = {
x['path'] for x in self.acl_users.searchUsers(
id=user_name,
exact_match=True,
) if 'path' in x
}
if not user_path_set:
# if a person_object was not found in the module, we do nothing more
# this happens for example when a manager with no associated person object
# creates a person_object for a new user
return []
user_path, = user_path_set
person_object = self.getPortalObject().unrestrictedTraverse(user_path)
now = DateTime()
# We look for every valid assignments of this user
for assignment in person_object.contentValues(filter={'portal_type': 'Assignment'}):
if assignment.getValidationState() == "open" and (
not assignment.hasStartDate() or assignment.getStartDate() <= now
) and (
not assignment.hasStopDate() or assignment.getStopDate() >= now
):
category_dict = {}
for base_category in base_category_list:
category_value_list = assignment.getAcquiredValueList(base_category)
if category_value_list:
for category_value in category_value_list:
if category_value.getPortalType() == "Organisation":
category_dict.setdefault(base_category, []).append(category_value.getRelativeUrl())
category_list.append(category_dict)
return category_list
......@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SlapOSSecurity</string> </value>
......@@ -55,28 +49,13 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -89,7 +68,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -98,7 +77,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
......
......@@ -2,66 +2,63 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<key> <string>_count</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>action_name</string> </key>
<key> <string>_mt_index</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<key> <string>_tree</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
<string>after_script/portal_workflow/compute_node_slap_interface_workflow/script_ComputeNode_requestTransfer</string>
</tuple>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
<value> <string>Require a portal type to be linked to a virtual master.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_request_transfer</string> </value>
<value> <string>SlapOSVirtualMasterSourceProjectConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Request Transfer</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>source_project_category</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,65 +2,87 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
<global name="Category Membership Arity Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>action_name</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
<string>before_script/portal_workflow/instance_slap_interface_workflow/script_Instance_checkConsistency</string>
<string>after_script/portal_workflow/instance_slap_interface_workflow/script_RequesterInstance_requestTransfer</string>
<string>source_project</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Project\', )</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<value> <string>Require to link to a Project</string> </value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple/>
</value>
<key> <string>id</string> </key>
<value> <string>source_project_project_contraint_constraint</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_request_transfer</string> </value>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>title</string> </key>
<value> <string>Request Transfer</string> </value>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
......
......@@ -2,31 +2,25 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
<global name="Category Membership State Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>action_name</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
<string>before_script/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_checkConsistency</string>
<string>after_script/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_requestTransfer</string>
</tuple>
</value>
<key> <string>base_category</string> </key>
<value> <string>source_project</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -35,32 +29,54 @@
</value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple/>
</value>
<key> <string>id</string> </key>
<value> <string>source_project_project_state_constraint_constraint</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
<key> <string>membership_portal_type_list</string> </key>
<value> <string>python: (\'Project\', )</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_request_transfer</string> </value>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership State Constraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
<key> <string>workflow_state_list</string> </key>
<value> <string>python: (\'validated\', \'invalidated\', \'suspended\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Request Transfer</string> </value>
<key> <string>workflow_variable</string> </key>
<value> <string>validation_state</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
......
portal = context.getPortalObject()
category_list = [portal.restrictedTraverse("portal_categories/allocation_scope/open/public", None),
portal.restrictedTraverse("portal_categories/allocation_scope/open/subscription", None),
portal.restrictedTraverse("portal_categories/allocation_scope/open/personal", None)]
category_list = [portal.restrictedTraverse("portal_categories/allocation_scope/open", None)]
category_uid_list = [ i.getUid() for i in category_list if i is not None]
......
......@@ -4,8 +4,8 @@ from zExceptions import Unauthorized
if REQUEST is not None:
raise Unauthorized
if compute_node.getAllocationScope() not in ['open/public', 'open/subscription', 'open/personal']:
# Don't update non closed computers
if compute_node.getAllocationScope() != 'open':
# Don't update non public compute_node
return
can_allocate = True
......
"""
Create an internal Packing List and attach the compute_node
"""
tag = "transfer_compute_node_%s" % context.getUid()
context.activate(activity="SQLQueue", tag=tag).requestTransfer(
destination=destination,
destination_project=destination_project,
destination_section=destination_section
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>destination=None, destination_project=None, destination_section=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputeNode_createMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Create an internal Packing List and attach the computer network
"""
tag = "transfer_compute_network_%s" % context.getUid()
context.activate(activity="SQLQueue", tag=tag).requestTransfer(
destination_project=destination_project,
destination_section=destination_section
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>destination_project=None, destination_section=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputerNetwork_createMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
network = context
# XXX - The use of current authenticated person will return always 'Close' if
# the person is administrator (such as 'zope' user) but not the owner of compute_node
#
# person = portal.portal_membership.getAuthenticatedMember().getUserValue()
allocation_state = 'Close'
software_type = ''
filter_kw = {}
for compute_node in network.getSubordinationRelatedValueList():
person = compute_node.getSourceAdministrationValue()
filter_kw['computer_guid']=compute_node.getReference()
try:
isAllowed = person.Person_restrictMethodAsShadowUser(shadow_document=person,
callable_object=person.Person_findPartition,
argument_list=[software_release_url, software_type, 'Software Instance',
filter_kw],
argument_dict={'test_mode': True}
)
if isAllowed:
allocation_state = 'Open'
break
except Exception:
continue
return allocation_state
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>software_release_url</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputerNetwork_getSoftwareReleaseAllocableState</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -69,7 +69,6 @@
<value>
<list>
<string>listbox_image</string>
<string>listbox_status</string>
<string>listbox_title</string>
</list>
</value>
......
......@@ -419,10 +419,6 @@
<string>version</string>
<string>Version</string>
</tuple>
<tuple>
<string>status</string>
<string>Status</string>
</tuple>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>display_width</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_status</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Status</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.ComputerNetwork_getSoftwareReleaseAllocableState(cell.getUrlString())</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Create an internal Packing List and attach the compute_node
"""
tag = "transfer_instance_tree_%s" % context.getUid()
context.activate(activity="SQLQueue",tag=tag).requestTransfer(
destination=destination,
destination_project=destination_project
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>destination_project=None, destination=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InstanceTree_createMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import random
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery
person = context
portal = person.getPortalObject()
assert project_uid
......@@ -8,6 +9,7 @@ compute_partition = None
filter_kw_copy = filter_kw.copy()
query_kw = {
'parent__follow_up__uid': project_uid,
'allocation_scope__uid': portal.restrictedTraverse("portal_categories/allocation_scope/open").getUid(),
'software_release_url': software_release_url,
'portal_type': 'Compute Partition',
}
......@@ -108,8 +110,8 @@ if test_mode:
SQL_WINDOW_SIZE = 50
# fetch at mot 50 random Compute Partitions, and check if they are ok
isTransitionPossible = person.getPortalObject().portal_workflow.isTransitionPossible
result_count = person.portal_catalog.countResults(**query_kw)[0][0]
isTransitionPossible = portal.portal_workflow.isTransitionPossible
result_count = portal.portal_catalog.countResults(**query_kw)[0][0]
offset = max(0, result_count-1)
if offset >= SQL_WINDOW_SIZE:
limit = (random.randint(0, offset), SQL_WINDOW_SIZE)
......@@ -117,7 +119,7 @@ else:
limit = (0, SQL_WINDOW_SIZE)
for compute_partition_candidate in context.portal_catalog(
for compute_partition_candidate in portal.portal_catalog(
limit=limit, **query_kw):
compute_partition_candidate = compute_partition_candidate.getObject()
if compute_partition_candidate.getParentValue().getCapacityScope() == "close":
......
......@@ -59,7 +59,6 @@
<value>
<list>
<string>listbox_amount</string>
<string>listbox_status</string>
</list>
</value>
</item>
......
......@@ -92,10 +92,6 @@
<string>amount</string>
<string>Instances Amount</string>
</tuple>
<tuple>
<string>status</string>
<string>Allocation Status</string>
</tuple>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>display_width</string>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_status</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Status</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.ComputerNetwork_getSoftwareReleaseAllocableState(context.REQUEST.get(\'here\').getUrlString())</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -52,6 +52,48 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
# Create akarls steps
self.createAlarmStep()
def createProject(self):
project = self.portal.project_module.newContent(
portal_type='Project',
title='project-%s' % self.generateNewId()
)
project.validate()
return project
def createAdminUser(self, project):
""" Create a Admin user, to manage compute_nodes and instances eventually """
admin_user_login = self.portal.portal_catalog.getResultValue(
portal_type="ERP5 Login",
reference="admin_user",
validation_state="validated"
)
if admin_user_login is None:
admin_user = self.portal.person_module.template_member.\
Base_createCloneDocument(batch_mode=1)
admin_user.newContent(
portal_type="ERP5 Login",
reference="admin_user").validate()
admin_user.edit(
first_name="Admin User",
reference="Admin_user",
default_email_text="do_not_reply_to_admin@example.org",
)
admin_user.validate()
else:
admin_user = admin_user_login.getParentValue()
admin_user.newContent(
portal_type='Assignment',
destination_project_value=project,
function='production/manager'
).open()
self.admin_user = admin_user
@changeSkin('Hal')
def joinSlapOS(self, web_site, reference):
def findMessage(email, body):
......@@ -150,11 +192,10 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
@changeSkin('RJS')
def setServerOpenPublic(self, server):
server.edit(
allocation_scope='open/public')
self.assertEqual('open/public', server.getAllocationScope())
# Called by alarm
server.ComputeNode_checkAndUpdateCapacityScope()
self.assertEqual('open', server.getCapacityScope())
allocation_scope='open')
self.assertEqual('open', server.getAllocationScope())
self.assertEqual('close', server.getCapacityScope())
server.edit(capacity_scope='open')
self.tic()
@changeSkin('RJS')
......
compute_node = state_change['object']
portal = compute_node.getPortalObject()
from zExceptions import Unauthorized
from DateTime import DateTime
# Get required arguments
kwargs = state_change.kwargs
# Required args
# Raise TypeError if all parameters are not provided
try:
# destination=None, destination_project=None, destination_section=None
destination = kwargs['destination']
destination_project = kwargs["destination_project"]
destination_section = kwargs["destination_section"]
except KeyError:
raise TypeError("ComputeNode_requestTransfer takes exactly 3 arguments")
user = portal.portal_membership.getAuthenticatedMember().getUserValue()
if user is None or user.getRelativeUrl() != compute_node.getSourceAdministration():
raise Unauthorized("Only the compute_node owner can Transfer compute_node from one location to another.")
tag = "%s_%s_%s_%s_inProgress" % (compute_node.getUid(), destination, destination_project, destination_section)
if (portal.portal_activities.countMessageWithTag(tag) > 0):
# The software instance is already under creation but can not be fetched from catalog
# As it is not possible to fetch informations, it is better to raise an error
raise NotImplementedError(tag)
movement_portal_type = "Internal Packing List"
source = compute_node.Item_getCurrentSiteValue()
source_project = compute_node.Item_getCurrentProjectValue()
source_section = compute_node.Item_getCurrentOwnerValue()
resource_value = compute_node.Item_getResourceValue()
if destination_project is None and source_project is not None:
destination_project = source_project.getRelativeUrl()
if destination_section is None:
destination_section = compute_node.getSourceAdministration()
if destination is None and source is not None:
# We do not change location of the machine
destination = source.getRelativeUrl()
if source is None and destination is None:
raise ValueError("Sorry, destination is required for the initial set.")
if source_section is None:
source_section = compute_node.getSourceAdministration()
resource_value = portal.product_module.compute_node
module = portal.getDefaultModule(portal_type=movement_portal_type)
line_portal_type = '%s Line' % movement_portal_type
delivery = module.newContent(title="Transfer %s to %s" % (compute_node.getTitle(), destination),
source_value=source,
source_section_value=source_section,
source_project_value=source_project,
destination=destination,
destination_section=destination_section,
source_decision=destination_section,
destination_decision=destination_section,
destination_project_value=destination_project,
start_date=DateTime(),
stop_date=DateTime(),
portal_type=movement_portal_type)
delivery_line = delivery.newContent(
portal_type=line_portal_type,
title=compute_node.getReference(),
quantity_unit=compute_node.getQuantityUnit(),
resource_value=resource_value)
delivery_line.edit(
price=0.0,
quantity=1.0,
aggregate_value=compute_node)
delivery.confirm()
delivery.stop()
delivery.deliver()
delivery.reindexObject(activate_kw=dict(tag=tag))
delivery_line.reindexObject(activate_kw=dict(tag=tag))
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_ComputeNode_requestTransfer</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,6 @@
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_generate_certificate</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_report_compute_node_bang</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_request_software_release</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_request_transfer</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_revoke_certificate</string>
</tuple>
</value>
......
requester_instance = state_change['object']
portal = requester_instance.getPortalObject()
from zExceptions import Unauthorized
from DateTime import DateTime
assert requester_instance.getPortalType() == 'Instance Tree'
# Get required arguments
kwargs = state_change.kwargs
# Required args
# Raise TypeError if all parameters are not provided
try:
# destination=None, destination_project=None
destination = kwargs['destination']
destination_project = kwargs["destination_project"]
except KeyError:
raise TypeError("InstanceTree_requestTransfer takes exactly 2 arguments")
user = portal.portal_membership.getAuthenticatedMember().getUserValue()
if user is None or user.getRelativeUrl() != requester_instance.getDestinationSection():
raise Unauthorized("Only the Instance Tree owner can transfer it from one location to another.")
tag = "%s_%s_%s_inProgress" % (requester_instance.getUid(), destination, destination_project)
if (portal.portal_activities.countMessageWithTag(tag) > 0):
# The software instance is already under creation but can not be fetched from catalog
# As it is not possible to fetch informations, it is better to raise an error
raise NotImplementedError(tag)
movement_portal_type = "Internal Packing List"
source = requester_instance.Item_getCurrentSiteValue()
source_project = requester_instance.Item_getCurrentProjectValue()
source_section = requester_instance.Item_getCurrentOwnerValue()
resource_value = requester_instance.Item_getResourceValue()
if destination_project is None and source_project is not None:
destination_project = source_project.getRelativeUrl()
destination_section = requester_instance.getDestinationSection()
if source_section is None:
source_section = requester_instance.getDestinationSectionValue()
if destination is None and source is not None:
destination = source.getRelativeUrl()
resource_value = requester_instance.product_module.compute_node
module = portal.getDefaultModule(portal_type=movement_portal_type)
line_portal_type = '%s Line' % movement_portal_type
delivery = module.newContent(title="Transfer %s to %s" % (requester_instance.getTitle(), destination_project),
source_value=source,
source_section_value=source_section,
source_project_value=source_project,
destination=destination,
destination_section=destination_section,
source_decision=destination_section,
destination_decision=destination_section,
destination_project_value=destination_project,
start_date=DateTime(),
stop_date=DateTime(),
portal_type=movement_portal_type)
delivery_line = delivery.newContent(
portal_type=line_portal_type,
title=requester_instance.getReference(),
quantity_unit=requester_instance.getQuantityUnit(),
resource_value=resource_value)
delivery_line.edit(
price=0.0,
quantity=1.0,
aggregate_value=requester_instance)
delivery.confirm()
delivery.stop()
delivery.deliver()
delivery.reindexObject(activate_kw=dict(tag=tag))
delivery_line.reindexObject(activate_kw=dict(tag=tag))
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_RequesterInstance_requestTransfer</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,6 @@
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_generate_certificate</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_report_compute_partition_error</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_instance</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_transfer</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_revoke_certificate</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_unallocate_partition</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_update_connection</string>
......
......@@ -20,7 +20,6 @@
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_generate_certificate</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_start</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_stop</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_transfer</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_revoke_certificate</string>
</tuple>
</value>
......
......@@ -25,7 +25,6 @@
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_instance</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_start</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_stop</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_transfer</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_revoke_certificate</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_update_connection</string>
</tuple>
......
......@@ -25,7 +25,6 @@
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_instance</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_start</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_stop</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_request_transfer</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_revoke_certificate</string>
<string>destination/portal_workflow/instance_slap_interface_workflow/transition_update_connection</string>
</tuple>
......
computer_network = state_change["object"]
from DateTime import DateTime
from zExceptions import Unauthorized
portal = computer_network.getPortalObject()
# Get required arguments
kwargs = state_change.kwargs
user = portal.portal_membership.getAuthenticatedMember().getUserValue()
if user is None or user.getRelativeUrl() != computer_network.getSourceAdministration():
raise Unauthorized("Only the Computer Network owner can transfer it from one location to another.")
# Required args
# Raise TypeError if all parameters are not provided
try:
# destination_project=None, destination_section=None
destination_section = kwargs['destination_section']
destination_project = kwargs["destination_project"]
except KeyError:
raise TypeError("ComputerNetwork_requestTransfer takes exactly 2 arguments")
tag = "%s_%s_%s_inProgress" % (computer_network.getUid(), destination_section, destination_project)
if (portal.portal_activities.countMessageWithTag(tag) > 0):
# The software instance is already under creation but can not be fetched from catalog
# As it is not possible to fetch informations, it is better to raise an error
raise NotImplementedError(tag)
movement_portal_type = "Internal Packing List"
source_project = computer_network.Item_getCurrentProjectValue()
source_section = computer_network.Item_getCurrentOwnerValue()
source = computer_network.getSourceAdministration()
destination = computer_network.getSourceAdministration()
resource_value = portal.product_module.compute_node
if destination_project is None and source_project is not None:
destination_project = source_project.getRelativeUrl()
if source_section is None:
source_section = computer_network.getSourceAdministrationValue()
if destination_section is None:
destination_section = source_section.getRelativeUrl()
module = portal.getDefaultModule(portal_type=movement_portal_type)
line_portal_type = '%s Line' % movement_portal_type
delivery = module.newContent(title="Transfer %s to %s" % (computer_network.getTitle(), destination_project),
source=source,
source_section_value=source_section,
source_project_value=source_project,
destination=destination,
destination_section=destination_section,
source_decision=destination_section,
destination_decision=destination_section,
destination_project=destination_project,
start_date=DateTime(),
stop_date=DateTime(),
portal_type=movement_portal_type)
delivery_line = delivery.newContent(
portal_type=line_portal_type,
title=computer_network.getReference(),
quantity_unit=resource_value.getQuantityUnit(),
resource_value=resource_value)
delivery_line.edit(
price=0.0,
quantity=1.0,
aggregate=computer_network.getRelativeUrl())
delivery.confirm()
delivery.stop()
delivery.deliver()
delivery.reindexObject(activate_kw=dict(tag=tag))
delivery_line.reindexObject(activate_kw=dict(tag=tag))
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_ComputerNetwork_requestTransfer</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ComputerNetwork_requestTransfer</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -17,7 +17,6 @@
<value>
<tuple>
<string>destination/portal_workflow/network_slap_interface_workflow/transition_approve_registration</string>
<string>destination/portal_workflow/network_slap_interface_workflow/transition_request_transfer</string>
</tuple>
</value>
</item>
......
......@@ -20,3 +20,4 @@ SlaposComputeNodeConstraint
ComputeNodeSlapOSMetadata
SlapOSReferenceConstraint
SlapOSVirtualMasterConstraint
SlapOSVirtualMasterSourceProjectConstraint
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment