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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
407a9889
Commit
407a9889
authored
Feb 10, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: Set date and skip if product reference is not set.
parent
ca825bb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Computer_checkAndCreateUpgradeDecision.xml
...ins/slapos_pdm/Computer_checkAndCreateUpgradeDecision.xml
+7
-2
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Computer_checkAndCreateUpgradeDecision.xml
View file @
407a9889
...
...
@@ -50,7 +50,8 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
computer = context\n
<value>
<string>
from DateTime import DateTime\n
computer = context\n
portal = context.getPortalObject()\n
\n
full_software_release_list = [si.getUrlString() for si in\n
...
...
@@ -71,6 +72,9 @@ software_release_list = portal.portal_catalog(\n
upgrade_decision_list = []\n
for software_release in software_release_list:\n
software_product_reference = software_release.getAggregateReference()\n
if software_product_reference in [None, ""]:\n
continue\n
\n
sorted_list = portal.SoftwareProduct_getSortedSoftwareReleaseList(\n
software_product_reference=software_product_reference)\n
\n
...
...
@@ -97,7 +101,8 @@ for software_release in software_release_list:\n
upgrade_decision.start()\n
elif context.getAllocationScope() in ["open/personal"]:\n
upgrade_decision.plan()\n
\n
\n
upgrade_decision.setStartDate(DateTime())\n
upgrade_decision_list.append(upgrade_decision)\n
\n
return upgrade_decision_list\n
...
...
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