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
Xavier Thompson
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
Hide 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 @@
<string>
_setTextContent
</string>
<string>
_setSourceReference
</string>
<string>
_setSlaXml
</string>
<string>
bang
</string>
</list>
</value>
</item>
...
...
master/bt5/vifib_slapos_accounting/bt/revision
View file @
87cee04f
15
\ No newline at end of file
16
\ 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 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
software_
instance = state_change[\'object\']\n
portal = software_instance.getPortalObject()
\n
<value>
<string>
instance = state_change[\'object\']\n
assert instance.getPortalType() in ["Slave Instance", "Software Instance"]
\n
\n
root_hosting_subscription = portal.portal_catalog.getResultValue(uid=software_instance.SoftwareInstance_getRootHostingSubscriptionUid())\n
tag = \'%s_%s_inProgress\' % (software_instance.getUid(), root_hosting_subscription.getTitle())\n
root_software_instance = root_hosting_subscription.getPredecessorValue()\n
\n
# Use iterative algorithm instead of recursive approach in order to avoid\n
# complexity as much as possible.\n
flat_tree = [root_software_instance]\n
while flat_tree:\n
software_instance = flat_tree.pop(0)\n
flat_tree.extend(software_instance.getPredecessorValueList())\n
try:\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
if state_change.kwargs[\'bang_tree\']:\n
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery\n
portal = instance.getPortalObject()\n
hosting_subscription = instance.getSpecialiseValue(portal_type="Hosting Subscription")\n
portal.portal_catalog.searchAndActivate(\n
specialise_uid=hosting_subscription.getUid(),\n
uid=NegatedQuery(Query(uid=instance.getUid())),\n
portal_type=["Slave Instance", "Software Instance"],\n
method_id=\'bang\',\n
method_kw={\'bang_tree\': False},\n
)\n
</string>
</value>
</item>
<item>
...
...
@@ -76,7 +72,11 @@ while flat_tree:\n
</item>
<item>
<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>
</dictionary>
</pickle>
...
...
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/destroy_requested.xml
View file @
87cee04f
...
...
@@ -22,6 +22,7 @@
<key>
<string>
transitions
</string>
</key>
<value>
<tuple>
<string>
bang
</string>
<string>
request_instance
</string>
</tuple>
</value>
...
...
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/states/start_requested.xml
View file @
87cee04f
...
...
@@ -23,6 +23,7 @@
<value>
<tuple>
<string>
allocate_partition
</string>
<string>
bang
</string>
<string>
rename
</string>
<string>
request_destroy
</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 @@
<value>
<tuple>
<string>
allocate_partition
</string>
<string>
bang
</string>
<string>
rename
</string>
<string>
request_destroy
</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 @@
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string>
SoftwareInstance_bangSoftware
InstanceTree
</string>
</value>
<value>
<string>
RequestedInstance_bang
InstanceTree
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -38,7 +38,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
report_computer_partition_
bang
</string>
</value>
<value>
<string>
bang
</string>
</value>
</item>
<item>
<key>
<string>
new_state_id
</string>
</key>
...
...
@@ -46,7 +46,7 @@
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
Instance_checkConsistency
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
master/bt5/vifib_slapos_core/bt/revision
View file @
87cee04f
26
\ No newline at end of file
27
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
87cee04f
...
...
@@ -734,8 +734,8 @@ class SlapTool(BaseTool):
"""
return
self
.
_getSoftwareInstanceForComputerPartition
(
computer_id
,
computer_partition_id
).
reportComputerPartitionBang
(
comment
=
message
)
computer_partition_id
).
bang
(
bang_tree
=
True
,
comment
=
message
)
@
convertToREST
def
_startedComputerPartition
(
self
,
computer_id
,
computer_partition_id
):
...
...
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