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
1dbb15ae
Commit
1dbb15ae
authored
Jun 07, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent allocating slave on stopped/destroyed instance.
parent
f24f54d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
29 deletions
+19
-29
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/ComputerPartition_getAvailableSoftwareReleaseUrlStringList.xml
...terPartition_getAvailableSoftwareReleaseUrlStringList.xml
+1
-1
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/ComputerPartition_getSoftwareType.xml
...al_skins/vifib_base/ComputerPartition_getSoftwareType.xml
+1
-1
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/interactions/SoftwareInstance_changeState.xml
...on_workflow/interactions/SoftwareInstance_changeState.xml
+9
-10
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/SoftwareInstance_reindexComputerPartition.xml
...low/scripts/SoftwareInstance_reindexComputerPartition.xml
+6
-15
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/ComputerPartition_getAvailableSoftwareReleaseUrlStringList.xml
View file @
1dbb15ae
...
@@ -65,7 +65,7 @@ elif slap_state == \'busy\':\n
...
@@ -65,7 +65,7 @@ elif slap_state == \'busy\':\n
validation_state="validated",\n
validation_state="validated",\n
default_aggregate_uid=context.getUid(),\n
default_aggregate_uid=context.getUid(),\n
)\n
)\n
if
instance is None
:\n
if
(instance is None) or (instance.getSlapState() == "start_requested")
:\n
return []\n
return []\n
else:\n
else:\n
return [instance.getRootSoftwareReleaseUrl()]\n
return [instance.getRootSoftwareReleaseUrl()]\n
...
...
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/ComputerPartition_getSoftwareType.xml
View file @
1dbb15ae
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
validation_state="validated",\n
validation_state="validated",\n
default_aggregate_uid=context.getUid(),\n
default_aggregate_uid=context.getUid(),\n
)\n
)\n
if
instance is None
:\n
if
(instance is None) or (instance.getSlapState() == "start_requested")
:\n
return ""\n
return ""\n
else:\n
else:\n
return instance.getSourceReference()\n
return instance.getSourceReference()\n
...
...
master/bt5/vifib_base/bt/revision
View file @
1dbb15ae
458
459
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/interactions/S
alePackingList_changeDestruction
State.xml
→
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/interactions/S
oftwareInstance_change
State.xml
View file @
1dbb15ae
...
@@ -27,15 +27,15 @@
...
@@ -27,15 +27,15 @@
<item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<key>
<string>
after_script_name
</string>
</key>
<value>
<value>
<list>
<tuple/>
<string>
SalePackingList_reindexUnderDestructionComputerPartition
</string>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<value>
<tuple/>
<list>
<string>
SoftwareInstance_reindexComputerPartition
</string>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -50,16 +50,15 @@
...
@@ -50,16 +50,15 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
S
alePackingList_changeDestruction
State
</string>
</value>
<value>
<string>
S
oftwareInstance_change
State
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
method_id
</string>
</key>
<key>
<string>
method_id
</string>
</key>
<value>
<value>
<list>
<list>
<string>
confirm
</string>
<string>
requestStart
</string>
<string>
start
</string>
<string>
requestStop
</string>
<string>
stop
</string>
<string>
requestDestroy
</string>
<string>
deliver
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
@@ -71,7 +70,7 @@
...
@@ -71,7 +70,7 @@
<key>
<string>
portal_type_filter
</string>
</key>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<value>
<list>
<list>
<string>
S
ale Packing List
</string>
<string>
S
oftware Instance
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/S
alePackingList_reindexUnderDestruction
ComputerPartition.xml
→
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/S
oftwareInstance_reindex
ComputerPartition.xml
View file @
1dbb15ae
...
@@ -50,20 +50,11 @@
...
@@ -50,20 +50,11 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery, NegatedQuery\n
<value>
<string>
instance = state_change[\'object\']\n
\n
partition = instance.getAggregateValue(portal_type="Computer Partition")\n
current_delivery = state_change[\'object\']\n
if computer_partition is not None:\n
portal = current_delivery.getPortalObject()\n
computer_partition.activate(\n
\n
after_path_and_method_id=(instance.getPath(), (\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).reindexObject()\n
destroy_service_relative_url = portal.portal_preferences.getPreferredInstanceCleanupResource()\n
\n
sale_packing_list_line_list = current_delivery.contentValues(portal_type="Sale Packing List Line")\n
for current_delivery_line in sale_packing_list_line_list:\n
if current_delivery_line.getResource() == destroy_service_relative_url:\n
\n
computer_partition = current_delivery_line.getAggregateValue(portal_type=["Computer Partition"])\n
computer_partition.activate(\n
after_path_and_method_id=(current_delivery.getPath(), (\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).reindexObject()\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
@@ -80,7 +71,7 @@ for current_delivery_line in sale_packing_list_line_list:\n
...
@@ -80,7 +71,7 @@ for current_delivery_line in sale_packing_list_line_list:\n
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
S
alePackingList_reindexUnderDestruction
ComputerPartition
</string>
</value>
<value>
<string>
S
oftwareInstance_reindex
ComputerPartition
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/vifib_slap/bt/revision
View file @
1dbb15ae
757
758
\ 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