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
60cc2a52
Commit
60cc2a52
authored
Jan 18, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: drop not used scripts
parent
8dd2db04
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
178 deletions
+0
-178
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getNewerSofwareRelease.py
...l_skins/slapos_pdm/InstanceTree_getNewerSofwareRelease.py
+0
-15
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getNewerSofwareRelease.xml
..._skins/slapos_pdm/InstanceTree_getNewerSofwareRelease.xml
+0
-62
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getUpgradableSoftwareRelease.py
...s/slapos_pdm/InstanceTree_getUpgradableSoftwareRelease.py
+0
-39
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getUpgradableSoftwareRelease.xml
.../slapos_pdm/InstanceTree_getUpgradableSoftwareRelease.xml
+0
-62
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getNewerSofwareRelease.py
deleted
100644 → 0
View file @
8dd2db04
instance_tree
=
context
software_instance
=
instance_tree
.
getSuccessorValue
()
if
not
software_instance
:
return
None
software_release_list
=
context
.
SoftwareProduct_getSortedSoftwareReleaseList
(
software_release_url
=
software_instance
.
getUrlString
())
if
not
software_release_list
:
return
None
latest_software_release
=
software_release_list
[
0
]
if
latest_software_release
.
getUrlString
()
==
software_instance
.
getUrlString
():
return
None
else
:
return
latest_software_release
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getNewerSofwareRelease.xml
deleted
100644 → 0
View file @
8dd2db04
<?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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InstanceTree_getNewerSofwareRelease
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getUpgradableSoftwareRelease.py
deleted
100644 → 0
View file @
8dd2db04
"""
Check if this instance tree is upgradable to the latest version,
and return the software release to upgrade with.
"""
instance_tree
=
context
portal
=
context
.
getPortalObject
()
slap_state
=
[
'start_requested'
,
'stop_requested'
]
if
not
instance_tree
.
getSlapState
()
in
slap_state
:
return
None
source_instance_list
=
[
q
for
q
in
instance_tree
.
getSuccessorValueList
()
if
q
.
getSlapState
()
in
slap_state
]
if
len
(
source_instance_list
)
==
0
:
return
None
source_instance
=
source_instance_list
[
0
]
software_release
=
instance_tree
.
InstanceTree_getNewerSofwareRelease
()
if
not
software_release
:
return
None
compute_node
=
source_instance
.
getAggregateValue
().
getParentValue
()
if
compute_node
.
getValidationState
()
!=
'validated'
:
return
None
#Find Software Installation
software_installation_list
=
portal
.
portal_catalog
(
portal_type
=
"Software Installation"
,
validation_state
=
"validated"
,
url_string
=
software_release
.
getUrlString
(),
default_aggregate_uid
=
compute_node
.
getUid
(),
)
# check again slap_state because it might be ignored in previous request!
if
'start_requested'
in
[
software_installation
.
getSlapState
()
\
for
software_installation
in
software_installation_list
]:
return
software_release
return
None
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_getUpgradableSoftwareRelease.xml
deleted
100644 → 0
View file @
8dd2db04
<?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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InstanceTree_getUpgradableSoftwareRelease
</string>
</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