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
0
Merge Requests
0
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
Carlos Ramos Carreño
slapos.core
Commits
c2c76f5b
Commit
c2c76f5b
authored
Aug 06, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Aug 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move not related scipts and tests from slapos_cloud to slapos_pdm
parent
6e0d89c3
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
230 additions
and
32 deletions
+230
-32
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
master/bt5/slapos_cloud/bt/template_test_id_list
master/bt5/slapos_cloud/bt/template_test_id_list
+1
-2
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/HostingSubscription_getNewerSofwareRelease.xml
...slapos_pdm/HostingSubscription_getNewerSofwareRelease.xml
+5
-5
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/HostingSubscription_getUpgradableSoftwareRelease.xml
..._pdm/HostingSubscription_getUpgradableSoftwareRelease.xml
+17
-13
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareProduct_getSortedSoftwareReleaseList.xml
...apos_pdm/SoftwareProduct_getSortedSoftwareReleaseList.xml
+0
-0
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSPDMSkins.py
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSPDMSkins.py
+205
-10
master/bt5/slapos_pdm/bt/revision
master/bt5/slapos_pdm/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/bt/revision
View file @
c2c76f5b
321
\ No newline at end of file
322
\ No newline at end of file
master/bt5/slapos_cloud/bt/template_test_id_list
View file @
c2c76f5b
...
...
@@ -3,5 +3,4 @@ testSlapOSCloudConstraint
testSlapOSCloudSecurityGroup
testSlapOSCloudShadow
testSlapOSCloudWorkflow
testSlapOSCloudDocument
testSlapOSSoftwareProduct
\ No newline at end of file
testSlapOSCloudDocument
\ No newline at end of file
master/bt5/slapos_
cloud/SkinTemplateItem/portal_skins/slapos_cloud
/HostingSubscription_getNewerSofwareRelease.xml
→
master/bt5/slapos_
pdm/SkinTemplateItem/portal_skins/slapos_pdm
/HostingSubscription_getNewerSofwareRelease.xml
View file @
c2c76f5b
...
...
@@ -55,17 +55,17 @@ portal = context.getPortalObject()\n
\n
software_instance = hosting_subscription.getPredecessorValue()\n
if not software_instance:\n
return
""
\n
return
None
\n
software_release_list = context.SoftwareProduct_getSortedSoftwareReleaseList(\n
software_release_url=software_instance.getUrlString())\n
\n
if not software_release_list:\n
return
""
\n
return
None
\n
latest_software_release = software_release_list[0]\n
if
software_release_list[0]
.getUrlString() == software_instance.getUrlString():\n
return
""
\n
if
latest_software_release
.getUrlString() == software_instance.getUrlString():\n
return
None
\n
else:\n
return latest_software_release
.getUrlString()
\n
return latest_software_release\n
</string>
</value>
</item>
<item>
...
...
master/bt5/slapos_
cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_isUpgradabl
e.xml
→
master/bt5/slapos_
pdm/SkinTemplateItem/portal_skins/slapos_pdm/HostingSubscription_getUpgradableSoftwareReleas
e.xml
View file @
c2c76f5b
...
...
@@ -50,42 +50,46 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
hosting_subscription = context\n
<value>
<string>
"""\n
Check if this hosting subscription is upgradable to the latest version,\n
and return the software release to upgrade with.\n
"""\n
\n
hosting_subscription = context\n
portal = context.getPortalObject()\n
\n
slap_state = [\'start_requested\', \'stop_requested\']\n
\n
if not hosting_subscription.getSlapState() in slap_state:\n
return
Fals
e\n
return
Non
e\n
\n
source_instance = hosting_subscription.getPredecessorValue()\n
if not source_instance or source_instance.getSlapState() not in slap_state:\n
return
Fals
e\n
return
Non
e\n
\n
latest_software_url
= hosting_subscription.HostingSubscription_getNewerSofwareRelease()\n
if
latest_software_url == ""
:\n
return
Fals
e\n
software_release
= hosting_subscription.HostingSubscription_getNewerSofwareRelease()\n
if
not software_release
:\n
return
Non
e\n
\n
computer = source_instance.getAggregateValue().getParentValue()\n
if computer.getValidationState() != \'validated\':\n
return False\n
isUpgradable = True\n
return None\n
\n
#Find Software Installation\n
software_installation_list = portal.portal_catalog(\n
portal_type="Software Installation",\n
validation_state="validated",\n
url_string=
latest_software_url
,\n
url_string=
software_release.getUrlString()
,\n
default_aggregate_uid=computer.getUid(),\n
#XXX - don\'t select destroyed Software Installation\n
slap_state=\'start_requested\'\n
)\n
# check again slap_state because it might be ignored in previous request!\n
if
not
\'start_requested\' in [software_installation.getSlapState() \\\n
if \'start_requested\' in [software_installation.getSlapState() \\\n
for software_installation in software_installation_list]:\n
isUpgradable = Fal
se\n
return software_relea
se\n
\n
return
isUpgradabl
e\n
return
Non
e\n
</string>
</value>
</item>
<item>
...
...
@@ -94,7 +98,7 @@ return isUpgradable\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_
isUpgradabl
e
</string>
</value>
<value>
<string>
HostingSubscription_
getUpgradableSoftwareReleas
e
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_
cloud/SkinTemplateItem/portal_skins/slapos_cloud
/SoftwareProduct_getSortedSoftwareReleaseList.xml
→
master/bt5/slapos_
pdm/SkinTemplateItem/portal_skins/slapos_pdm
/SoftwareProduct_getSortedSoftwareReleaseList.xml
View file @
c2c76f5b
File moved
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSPDMSkins.py
View file @
c2c76f5b
This diff is collapsed.
Click to expand it.
master/bt5/slapos_pdm/bt/revision
View file @
c2c76f5b
3
3
3
4
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