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
Nicolas Wavrant
slapos.core
Commits
87cee04f
Commit
87cee04f
authored
May 22, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate software instance bang
parent
29f16200
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
26 deletions
+30
-26
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
master/bt5/vifib_slapos_accounting/WorkflowTemplateItem/portal_workflow/instance_accounting_slap_interaction_workflow/interactions/change_instance_parameter.xml
...ction_workflow/interactions/change_instance_parameter.xml
+1
-0
master/bt5/vifib_slapos_accounting/bt/revision
master/bt5/vifib_slapos_accounting/bt/revision
+1
-1
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_bangInstanceTree.xml
...e_workflow/scripts/RequestedInstance_bangInstanceTree.xml
+18
-18
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/destroy_requested.xml
...ance_slap_interface_workflow/states/destroy_requested.xml
+1
-0
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/start_requested.xml
...stance_slap_interface_workflow/states/start_requested.xml
+1
-0
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/stop_requested.xml
...nstance_slap_interface_workflow/states/stop_requested.xml
+1
-0
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/transitions/bang.xml
...low/instance_slap_interface_workflow/transitions/bang.xml
+3
-3
master/bt5/vifib_slapos_core/bt/revision
master/bt5/vifib_slapos_core/bt/revision
+1
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+2
-2
No files found.
master/bt5/vifib_base/bt/revision
View file @
87cee04f
44
6
44
7
\ No newline at end of file
master/bt5/vifib_slapos_accounting/WorkflowTemplateItem/portal_workflow/instance_accounting_slap_interaction_workflow/interactions/change_instance_parameter.xml
View file @
87cee04f
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
<string>
_setTextContent
</string>
<string>
_setTextContent
</string>
<string>
_setSourceReference
</string>
<string>
_setSourceReference
</string>
<string>
_setSlaXml
</string>
<string>
_setSlaXml
</string>
<string>
bang
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
master/bt5/vifib_slapos_accounting/bt/revision
View file @
87cee04f
15
16
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_
base/WorkflowTemplateItem/portal_workflow/software_instance_slap_interface_workflow/scripts/SoftwareInstance_bangSoftware
InstanceTree.xml
→
master/bt5/vifib_
slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_bang
InstanceTree.xml
View file @
87cee04f
...
@@ -50,24 +50,20 @@
...
@@ -50,24 +50,20 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
software_
instance = state_change[\'object\']\n
<value>
<string>
instance = state_change[\'object\']\n
portal = software_instance.getPortalObject()
\n
assert instance.getPortalType() in ["Slave Instance", "Software Instance"]
\n
\n
\n
root_hosting_subscription = portal.portal_catalog.getResultValue(uid=software_instance.SoftwareInstance_getRootHostingSubscriptionUid())\n
if state_change.kwargs[\'bang_tree\']:\n
tag = \'%s_%s_inProgress\' % (software_instance.getUid(), root_hosting_subscription.getTitle())\n
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery\n
root_software_instance = root_hosting_subscription.getPredecessorValue()\n
portal = instance.getPortalObject()\n
\n
hosting_subscription = instance.getSpecialiseValue(portal_type="Hosting Subscription")\n
# Use iterative algorithm instead of recursive approach in order to avoid\n
portal.portal_catalog.searchAndActivate(\n
# complexity as much as possible.\n
specialise_uid=hosting_subscription.getUid(),\n
flat_tree = [root_software_instance]\n
uid=NegatedQuery(Query(uid=instance.getUid())),\n
while flat_tree:\n
portal_type=["Slave Instance", "Software Instance"],\n
software_instance = flat_tree.pop(0)\n
method_id=\'bang\',\n
flat_tree.extend(software_instance.getPredecessorValueList())\n
method_kw={\'bang_tree\': False},\n
try:\n
)\n
software_instance.Item_getInstancePackingListLine(service_relative_url=portal.portal_preferences.getPreferredInstanceCleanupResource())\n
except ValueError:\n
#no instance cleanup, there is sense to try to update\n
software_instance.activate().requestUpdateComputerPartition()\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
@@ -76,7 +72,11 @@ while flat_tree:\n
...
@@ -76,7 +72,11 @@ while flat_tree:\n
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
SoftwareInstance_bangSoftwareInstanceTree
</string>
</value>
<value>
<string>
RequestedInstance_bangInstanceTree
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/destroy_requested.xml
View file @
87cee04f
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<key>
<string>
transitions
</string>
</key>
<key>
<string>
transitions
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
bang
</string>
<string>
request_instance
</string>
<string>
request_instance
</string>
</tuple>
</tuple>
</value>
</value>
...
...
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/start_requested.xml
View file @
87cee04f
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<value>
<value>
<tuple>
<tuple>
<string>
allocate_partition
</string>
<string>
allocate_partition
</string>
<string>
bang
</string>
<string>
rename
</string>
<string>
rename
</string>
<string>
request_destroy
</string>
<string>
request_destroy
</string>
<string>
request_instance
</string>
<string>
request_instance
</string>
...
...
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/stop_requested.xml
View file @
87cee04f
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<value>
<value>
<tuple>
<tuple>
<string>
allocate_partition
</string>
<string>
allocate_partition
</string>
<string>
bang
</string>
<string>
rename
</string>
<string>
rename
</string>
<string>
request_destroy
</string>
<string>
request_destroy
</string>
<string>
request_instance
</string>
<string>
request_instance
</string>
...
...
master/bt5/vifib_
base/WorkflowTemplateItem/portal_workflow/software_instance_slap_interface_workflow/transitions/report_computer_partition_
bang.xml
→
master/bt5/vifib_
slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/transitions/
bang.xml
View file @
87cee04f
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string>
SoftwareInstance_bangSoftware
InstanceTree
</string>
</value>
<value>
<string>
RequestedInstance_bang
InstanceTree
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
report_computer_partition_
bang
</string>
</value>
<value>
<string>
bang
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
new_state_id
</string>
</key>
<key>
<string>
new_state_id
</string>
</key>
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
script_name
</string>
</key>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
Instance_checkConsistency
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
...
master/bt5/vifib_slapos_core/bt/revision
View file @
87cee04f
26
27
\ No newline at end of file
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
87cee04f
...
@@ -734,7 +734,7 @@ class SlapTool(BaseTool):
...
@@ -734,7 +734,7 @@ class SlapTool(BaseTool):
"""
"""
return
self
.
_getSoftwareInstanceForComputerPartition
(
return
self
.
_getSoftwareInstanceForComputerPartition
(
computer_id
,
computer_id
,
computer_partition_id
).
reportComputerPartitionBang
(
computer_partition_id
).
bang
(
bang_tree
=
True
,
comment
=
message
)
comment
=
message
)
@
convertToREST
@
convertToREST
...
...
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