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
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
Show 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 @@
...
@@ -50,26 +50,30 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
person = context.getDestinationSectionValue(portal_type="Person"
)\n
<value>
<string>
instance = context.getAggregateRelatedValue(
)\n
\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
\n
if status == "start_requested":\n
status = host_sub.getSlapState()\n
\n
if status == "start_requested":\n
state = "started"\n
state = "started"\n
elif status == "stop_requested":\n
elif status == "stop_requested":\n
state = "stopped"\n
state = "stopped"\n
elif status == "destroy_requested":\n
elif status == "destroy_requested":\n
state = "destroyed"\n
state = "destroyed"\n
\n
\n
person.requestSoftwareInstance(\n
person.requestSoftwareInstance(\n
state=state,\n
state=state,\n
software_release=new_sr_url,\n
software_release=new_sr_url,\n
software_title=context
.getTitle(),\n
software_title=host_sub
.getTitle(),\n
software_type=context
.getSourceReference(),\n
software_type=host_sub
.getSourceReference(),\n
instance_xml=context
.getTextContent(),\n
instance_xml=host_sub
.getTextContent(),\n
sla_xml=context
.getSlaXml(),\n
sla_xml=host_sub
.getSlaXml(),\n
shared=context
.isRootSlave()\n
shared=host_sub
.isRootSlave()\n
)\n
)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
@@ -78,7 +82,7 @@ person.requestSoftwareInstance(\n
...
@@ -78,7 +82,7 @@ person.requestSoftwareInstance(\n
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_change
SoftwareRelease
</string>
</value>
<value>
<string>
ComputerPartition_changeHostingSubscription
SoftwareRelease
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareRelease_requestInstanceUpgrade.xml
View file @
73c42017
...
@@ -56,18 +56,12 @@
...
@@ -56,18 +56,12 @@
old_sr_url = context.getUrlString()\n
old_sr_url = context.getUrlString()\n
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
\n
\n
hosting_sub_list = portal.portal_catalog.searchAndActivate(\n
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
portal_type = \'Computer Partition\',\n
parent_reference = comp_reference_list,\n
parent_reference = comp_reference_list,\n
free_for_request = 0\n
free_for_request = 0,\n
)]\n
software_release_url = old_sr_url,\n
)],\n
method_id = \'ComputerPartition_changeHostingSubscriptionSoftwareRelease\',\n
method_id = \'HostingSubscription_changeSoftwareRelease\',\n
method_kw = {\'new_sr_url\': new_sr_url},\n
method_kw = {\'new_sr_url\': new_sr_url},\n
activate_kw = {\'tag\': tag}\n
activate_kw = {\'tag\': tag}\n
)\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
9
\ No newline at end of file
\ 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