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
1
Merge Requests
1
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
Romain Courteaud
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
Show 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
validation_state="validated",\n
default_aggregate_uid=context.getUid(),\n
)\n
if
instance is None
:\n
if
(instance is None) or (instance.getSlapState() == "start_requested")
:\n
return []\n
else:\n
return [instance.getRootSoftwareReleaseUrl()]\n
...
...
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/ComputerPartition_getSoftwareType.xml
View file @
1dbb15ae
...
...
@@ -55,7 +55,7 @@
validation_state="validated",\n
default_aggregate_uid=context.getUid(),\n
)\n
if
instance is None
:\n
if
(instance is None) or (instance.getSlapState() == "start_requested")
:\n
return ""\n
else:\n
return instance.getSourceReference()\n
...
...
master/bt5/vifib_base/bt/revision
View file @
1dbb15ae
458
\ No newline at end of file
459
\ 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 @@
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
SalePackingList_reindexUnderDestructionComputerPartition
</string>
</list>
<tuple/>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<tuple/>
<list>
<string>
SoftwareInstance_reindexComputerPartition
</string>
</list>
</value>
</item>
<item>
...
...
@@ -50,16 +50,15 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
S
alePackingList_changeDestruction
State
</string>
</value>
<value>
<string>
S
oftwareInstance_change
State
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
confirm
</string>
<string>
start
</string>
<string>
stop
</string>
<string>
deliver
</string>
<string>
requestStart
</string>
<string>
requestStop
</string>
<string>
requestDestroy
</string>
</list>
</value>
</item>
...
...
@@ -71,7 +70,7 @@
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<list>
<string>
S
ale Packing List
</string>
<string>
S
oftware Instance
</string>
</list>
</value>
</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 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery, NegatedQuery\n
\n
current_delivery = state_change[\'object\']\n
portal = current_delivery.getPortalObject()\n
\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
<value>
<string>
instance = state_change[\'object\']\n
partition = instance.getAggregateValue(portal_type="Computer Partition")\n
if computer_partition is not None:\n
computer_partition.activate(\n
after_path_and_method_id=(current_delivery
.getPath(), (\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).reindexObject()\n
after_path_and_method_id=(instance
.getPath(), (\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).reindexObject()\n
</string>
</value>
</item>
<item>
...
...
@@ -80,7 +71,7 @@ for current_delivery_line in sale_packing_list_line_list:\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
S
alePackingList_reindexUnderDestruction
ComputerPartition
</string>
</value>
<value>
<string>
S
oftwareInstance_reindex
ComputerPartition
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/vifib_slap/bt/revision
View file @
1dbb15ae
757
\ No newline at end of file
758
\ 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