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
Lisa Casino
slapos.core
Commits
73c42017
Commit
73c42017
authored
Aug 29, 2013
by
Vivien Alger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mass Upgrade: Upgraded tests and small refactoring
parent
8500e7ad
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
79 deletions
+212
-79
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/ComputerPartition_changeHostingSubscriptionSoftwareRelease.xml
...terPartition_changeHostingSubscriptionSoftwareRelease.xml
+22
-18
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareRelease_requestInstanceUpgrade.xml
...ins/slapos_pdm/SoftwareRelease_requestInstanceUpgrade.xml
+6
-12
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSCloudMassUpgrade.py
...slapos_pdm/TestTemplateItem/testSlapOSCloudMassUpgrade.py
+183
-48
master/bt5/slapos_pdm/bt/revision
master/bt5/slapos_pdm/bt/revision
+1
-1
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/
HostingSubscription_change
SoftwareRelease.xml
→
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/
ComputerPartition_changeHostingSubscription
SoftwareRelease.xml
View file @
73c42017
...
...
@@ -50,26 +50,30 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
person = context.getDestinationSectionValue(portal_type="Person"
)\n
<value>
<string>
instance = context.getAggregateRelatedValue(
)\n
\n
status = context.getSlapState()\n
if instance is not None:\n
host_sub = instance.getSpecialiseValue()\n
person = host_sub.getDestinationSectionValue(portal_type="Person")\n
\n
if status == "start_requested":\n
state = "started"\n
elif status == "stop_requested":\n
state = "stopped"\n
elif status == "destroy_requested":\n
state = "destroyed"\n
status = host_sub.getSlapState()\n
\n
if status == "start_requested":\n
state = "started"\n
elif status == "stop_requested":\n
state = "stopped"\n
elif status == "destroy_requested":\n
state = "destroyed"\n
\n
person.requestSoftwareInstance(\n
state=state,\n
software_release=new_sr_url,\n
software_title=context
.getTitle(),\n
software_type=context
.getSourceReference(),\n
instance_xml=context
.getTextContent(),\n
sla_xml=context
.getSlaXml(),\n
shared=context
.isRootSlave()\n
)\n
person.requestSoftwareInstance(\n
state=state,\n
software_release=new_sr_url,\n
software_title=host_sub
.getTitle(),\n
software_type=host_sub
.getSourceReference(),\n
instance_xml=host_sub
.getTextContent(),\n
sla_xml=host_sub
.getSlaXml(),\n
shared=host_sub
.isRootSlave()\n
)\n
</string>
</value>
</item>
<item>
...
...
@@ -78,7 +82,7 @@ person.requestSoftwareInstance(\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_change
SoftwareRelease
</string>
</value>
<value>
<string>
ComputerPartition_changeHostingSubscription
SoftwareRelease
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareRelease_requestInstanceUpgrade.xml
View file @
73c42017
...
...
@@ -56,18 +56,12 @@
old_sr_url = context.getUrlString()\n
portal = context.getPortalObject()\n
\n
hosting_sub_list = portal.portal_catalog.searchAndActivate(\n
portal_type = \'Hosting Subscription\',\n
default_specialise_related_uid = [x.getUid() for x in portal.portal_catalog(\n
portal_type = [\'Software Instance\', \'Slave Instance\'],\n
url_string = old_sr_url,\n
default_aggregate_uid = [y.getUid() for y in portal.portal_catalog(\n
portal_type = \'Computer Partition\',\n
parent_reference = comp_reference_list,\n
free_for_request = 0\n
)]\n
)],\n
method_id = \'HostingSubscription_changeSoftwareRelease\',\n
portal.portal_catalog.searchAndActivate( \n
portal_type = \'Computer Partition\',\n
parent_reference = comp_reference_list,\n
free_for_request = 0,\n
software_release_url = old_sr_url,\n
method_id = \'ComputerPartition_changeHostingSubscriptionSoftwareRelease\',\n
method_kw = {\'new_sr_url\': new_sr_url},\n
activate_kw = {\'tag\': tag}\n
)\n
...
...
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSCloudMassUpgrade.py
View file @
73c42017
This diff is collapsed.
Click to expand it.
master/bt5/slapos_pdm/bt/revision
View file @
73c42017
8
\ No newline at end of file
9
\ No newline at end of file
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