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
3f096f85
Commit
3f096f85
authored
Jan 23, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: drop reviewUpgrade
parent
2b6e0f2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
197 deletions
+0
-197
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_reviewUpgrade.py
...nterface_workflow/script_UpgradeDecision_reviewUpgrade.py
+0
-46
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_reviewUpgrade.xml
...terface_workflow/script_UpgradeDecision_reviewUpgrade.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_review_upgrade.xml
...ade_slap_interface_workflow/transition_review_upgrade.xml
+0
-66
No files found.
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_reviewUpgrade.py
deleted
100644 → 0
View file @
2b6e0f2f
upgrade_decision
=
state_change
[
"object"
]
from
DateTime
import
DateTime
portal
=
upgrade_decision
.
getPortalObject
()
instance_tree
=
upgrade_decision
.
UpgradeDecision_getAggregateValue
(
"Instance Tree"
)
software_release
=
upgrade_decision
.
UpgradeDecision_getAggregateValue
(
"Software Release"
)
if
upgrade_decision
.
getSimulationState
()
==
"cancelled"
:
return
if
software_release
.
getValidationState
()
==
"archived"
:
software_product
=
software_release
.
getAggregateValue
()
if
software_product
is
not
None
and
\
software_product
.
getValidationState
()
==
"invalidated"
:
upgrade_decision
.
cancel
(
comment
=
"Software Product is invalidated."
)
return
if
instance_tree
is
not
None
:
if
instance_tree
.
getUpgradeScope
()
in
[
'never'
,
'disabled'
]:
upgrade_decision
.
cancel
(
"Upgrade scope was disabled on the related Instance Tree"
)
elif
instance_tree
.
getSlapState
()
==
"destroy_requested"
:
upgrade_decision
.
cancel
(
comment
=
"Instance Tree is destroyed."
)
elif
instance_tree
.
getUrlString
()
==
software_release
.
getUrlString
():
upgrade_decision
.
cancel
(
comment
=
"Instance tree is already upgraded."
)
return
compute_node
=
upgrade_decision
.
UpgradeDecision_getAggregateValue
(
"Compute Node"
)
if
compute_node
is
not
None
:
if
compute_node
.
getUpgradeScope
()
in
[
'never'
,
'disabled'
]:
upgrade_decision
.
cancel
(
"Upgrade scope was disabled on the related Compute Node"
)
return
elif
compute_node
.
getAllocationScope
()
==
"close/forever"
:
upgrade_decision
.
cancel
(
comment
=
"Compute Node is close forever."
)
return
already_deployed
=
len
(
portal
.
portal_catalog
(
limit
=
1
,
portal_type
=
"Compute Partition"
,
parent_reference
=
compute_node
.
getReference
(),
software_release_url
=
software_release
.
getUrlString
()))
if
already_deployed
:
upgrade_decision
.
cancel
(
comment
=
"Compute Node already has the software release"
)
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_reviewUpgrade.xml
deleted
100644 → 0
View file @
2b6e0f2f
<?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_reviewUpgrade
</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_reviewUpgrade
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/state_draft.xml
View file @
3f096f85
...
...
@@ -19,7 +19,6 @@
<string>
destination/portal_workflow/upgrade_slap_interface_workflow/transition_approve_registration
</string>
<string>
destination/portal_workflow/upgrade_slap_interface_workflow/transition_notify
</string>
<string>
destination/portal_workflow/upgrade_slap_interface_workflow/transition_request_upgrade
</string>
<string>
destination/portal_workflow/upgrade_slap_interface_workflow/transition_review_upgrade
</string>
</tuple>
</value>
</item>
...
...
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/transition_review_upgrade.xml
deleted
100644 → 0
View file @
2b6e0f2f
<?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_reviewUpgrade
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Review if the upgrade still applicable
</string>
</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_review_upgrade
</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>
Review Upgrade
</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