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
42a2f646
Commit
42a2f646
authored
Jan 23, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: drop approveRegistration
parent
0956fa41
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
176 deletions
+9
-176
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
...al_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
+9
-1
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_approveRegistration.py
...ce_workflow/script_UpgradeDecision_approveRegistration.py
+0
-22
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_approveRegistration.xml
...e_workflow/script_UpgradeDecision_approveRegistration.xml
+0
-84
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/state_draft.xml
..._workflow/upgrade_slap_interface_workflow/state_draft.xml
+0
-1
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/transition_approve_registration.xml
...ap_interface_workflow/transition_approve_registration.xml
+0
-68
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
View file @
42a2f646
...
...
@@ -100,6 +100,14 @@ if len(allocation_cell_list) == 1:
aggregate_value
=
instance_tree
,
)
upgrade_decision
.
approveRegistration
()
with
upgrade_decision
.
defaultActivateParameterDict
({
'tag'
:
tag
}):
if
upgrade_decision
.
getSimulationState
()
==
"draft"
:
upgrade_decision
.
plan
()
upgrade_decision
.
setStartDate
(
DateTime
())
if
upgrade_decision
.
getSimulationState
()
==
"planned"
:
upgrade_decision
.
confirm
()
# Prevent concurrent transaction to create 2 upgrade decision for the same instance_tree
instance_tree
.
serialize
()
return
upgrade_decision
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_approveRegistration.py
deleted
100644 → 0
View file @
0956fa41
upgrade_decision
=
state_change
[
"object"
]
from
DateTime
import
DateTime
portal
=
upgrade_decision
.
getPortalObject
()
instance_tree
=
upgrade_decision
.
getAggregateValue
()
tag
=
"%s_requestUpgradeDecisionCreation_inProgress"
%
instance_tree
.
getUid
()
activate_kw
=
{
'tag'
:
tag
}
if
portal
.
portal_activities
.
countMessageWithTag
(
tag
)
>
0
:
# nothing to do
return
with
upgrade_decision
.
defaultActivateParameterDict
(
activate_kw
):
if
upgrade_decision
.
getSimulationState
()
==
"draft"
:
upgrade_decision
.
plan
()
upgrade_decision
.
setStartDate
(
DateTime
())
if
upgrade_decision
.
getSimulationState
()
==
"planned"
:
upgrade_decision
.
confirm
()
# Prevent concurrent transaction to create 2 upgrade decision for the same instance_tree
instance_tree
.
serialize
()
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_approveRegistration.xml
deleted
100644 → 0
View file @
0956fa41
<?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>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_UpgradeDecision_approveRegistration
</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>
UpgradeDecision_approveRegistration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/state_draft.xml
View file @
42a2f646
...
...
@@ -16,7 +16,6 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination/portal_workflow/upgrade_slap_interface_workflow/transition_approve_registration
</string>
<string>
destination/portal_workflow/upgrade_slap_interface_workflow/transition_notify
</string>
</tuple>
</value>
...
...
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/transition_approve_registration.xml
deleted
100644 → 0
View file @
0956fa41
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Transition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
action_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/workflow
</string>
<string>
before_script/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_checkConsistency
</string>
<string>
after_script/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_approveRegistration
</string>
</tuple>
</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>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
transition_approve_registration
</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>
Approve Registration
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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