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
Xiaowu Zhang
slapos.core
Commits
c51f75ef
Commit
c51f75ef
authored
Jul 26, 2011
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create script to remove the code duplicated
parent
1a9c7015
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
37 deletions
+90
-37
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/ERP5Site_getSlaveInstanceListFromComputerPartition.xml
...ts/ERP5Site_getSlaveInstanceListFromComputerPartition.xml
+83
-0
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/SoftwareInstance_startSlaveInstanceListFromComputerPartition.xml
...eInstance_startSlaveInstanceListFromComputerPartition.xml
+3
-18
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/SoftwareInstance_stopSlaveInstanceListFromComputerPartition.xml
...reInstance_stopSlaveInstanceListFromComputerPartition.xml
+3
-18
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/ERP5Site_getSlaveInstanceListFromComputerPartition.xml
0 → 100644
View file @
c51f75ef
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
portal = context.getPortalObject()\n
\n
sale_packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type="Sale Packing List Line",\n
aggregate_relative_url=relative_url)\n
computer_partition = sale_packing_list_line.getAggregateValue(portal_type="Computer Partition")\n
\n
slave_instance_query = ComplexQuery(\n
Query(aggregate_portal_type="Slave Instance"),\n
Query(aggregate_validation_state=state_list),\n
operator="AND")\n
\n
computer_partition_query = Query(aggregate_relative_url=computer_partition.getRelativeUrl())\n
query = ComplexQuery(computer_partition_query, slave_instance_query, operator="AND")\n
\n
return portal.portal_catalog(portal_type=\'Sale Packing List Line\', query=query)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
relative_url, state_list
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getSlaveInstanceListFromComputerPartition
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/SoftwareInstance_startSlaveInstanceListFromComputerPartition.xml
View file @
c51f75ef
...
...
@@ -50,24 +50,9 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
portal = context.getPortalObject()\n
\n
software_instance = state_change["object"]\n
sale_packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type="Sale Packing List Line",\n
aggregate_relative_url=software_instance.getRelativeUrl())\n
computer_partition = sale_packing_list_line.getAggregateValue(portal_type="Computer Partition")\n
\n
slave_instance_query = ComplexQuery(\n
Query(aggregate_portal_type="Slave Instance"),\n
Query(aggregate_validation_state=["%requested", "stopped"]),\n
operator="AND")\n
computer_partition_query = Query(aggregate_relative_url=computer_partition.getRelativeUrl())\n
query = ComplexQuery(computer_partition_query, slave_instance_query, operator="AND")\n
\n
sale_packing_list_line_list = portal.portal_catalog(\n
portal_type=\'Sale Packing List Line\', query=query)\n
<value>
<string>
software_instance = state_change["object"]\n
sale_packing_list_line_list = context.ERP5Site_getSlaveInstanceListFromComputerPartition(\n
software_instance.getRelativeUrl(),["%requested", "stopped"])\n
\n
for sale_packing_list_line in sale_packing_list_line_list:\n
slave_instance = sale_packing_list_line.getAggregateValue(portal_type="Slave Instance")\n
...
...
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/slap_interaction_workflow/scripts/SoftwareInstance_stopSlaveInstanceListFromComputerPartition.xml
View file @
c51f75ef
...
...
@@ -50,24 +50,9 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
portal = context.getPortalObject()\n
\n
software_instance = state_change["object"]\n
sale_packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type="Sale Packing List Line",\n
aggregate_relative_url=software_instance.getRelativeUrl())\n
computer_partition = sale_packing_list_line.getAggregateValue(portal_type="Computer Partition")\n
\n
slave_instance_query = ComplexQuery(\n
Query(aggregate_portal_type="Slave Instance"),\n
Query(aggregate_validation_state=["%requested", "started"]),\n
operator="AND")\n
computer_partition_query = Query(aggregate_relative_url=computer_partition.getRelativeUrl())\n
query = ComplexQuery(computer_partition_query, slave_instance_query, operator="AND")\n
\n
sale_packing_list_line_list = portal.portal_catalog(\n
portal_type=\'Sale Packing List Line\', query=query)\n
<value>
<string>
software_instance = state_change["object"]\n
sale_packing_list_line_list = context.ERP5Site_getSlaveInstanceListFromComputerPartition(\n
software_instance.getRelativeUrl(),["%requested", "started"])\n
\n
for sale_packing_list_line in sale_packing_list_line_list:\n
slave_instance = sale_packing_list_line.getAggregateValue(portal_type="Slave Instance")\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
c51f75ef
399
\ No newline at end of file
400
\ 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