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
45d96643
Commit
45d96643
authored
Mar 19, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable slave_instance_list code.
Narrow to only return Slave Instance related delivery lines.
parent
98df019f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SalePackinListLine_asSoftwareInstnaceComputerPartitionMergedDict.xml
...istLine_asSoftwareInstnaceComputerPartitionMergedDict.xml
+21
-21
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SalePackinListLine_asSoftwareInstnaceComputerPartitionMergedDict.xml
View file @
45d96643
...
...
@@ -50,7 +50,8 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
sale_packing_list_line = context\n
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery\n
sale_packing_list_line = context\n
instance_type_list = [\'Software Instance\', \'Slave Instance\']\n
\n
hosting_service = context.restrictedTraverse(\n
...
...
@@ -75,26 +76,25 @@ if computer_partition.getPortalType() == \'Computer Partition\':\n
if software_instance is not None and computer_partition is not None and software_release is not None:\n
slave_instance_list = []\n
\n
# sale_packing_list_line_list = computer_partition.portal_catalog(\n
# aggregate_uid=computer_partition.getUid(),\n
# portal_type="Sale Packing List Line",\n
# simulation_state=state_list,\n
# default_resource_uid=service_uid_list)\n
# for sale_packing_list_line in sale_packing_list_line_list:\n
# instance = sale_packing_list_line.getAggregateValue(portal_type=instance_type_list)\n
# if instance is None:\n
# raise NotImplementedError, "Unexpected Sale Packing List without Instance aggregated %s" % sale_packing_list_line.getRelativeUrl()\n
# elif instance.getPortalType() == "Slave Instance":\n
# slave_instance = dict(slave_title=instance.getTitle(),\n
# slap_software_type=instance.getSourceReference(),\n
# slave_reference=instance.getReference(),\n
# xml=instance.getTextContent(),\n
# connection_xml=instance.getConnectionXml(),\n
# )\n
# if slave_instance not in slave_instance_list:\n
# slave_instance_list.append(slave_instance)\n
# elif instance.getPortalType() == "Software Instance":\n
# software_instance = instance\n
sale_packing_list_line_list = computer_partition.portal_catalog(\n
aggregate_uid=computer_partition.getUid(),\n
aggregate_portal_type=\'Slave Instance\',\n
portal_type="Sale Packing List Line",\n
simulation_state=state_list,\n
default_resource_uid=service_uid_list)\n
\n
for sale_packing_list_line in sale_packing_list_line_list:\n
instance = sale_packing_list_line.getAggregateValue(portal_type=\'Slave Instance\')\n
if instance.getUid() == software_instance.getUid():\n
# ignore self\n
continue\n
slave_instance = dict(slave_title=instance.getTitle(),\n
slap_software_type=instance.getSourceReference(),\n
slave_reference=instance.getReference(),\n
xml=instance.getTextContent(),\n
connection_xml=instance.getConnectionXml(),\n
)\n
slave_instance_list.append(slave_instance)\n
return {\n
\'xml\':software_instance.getTextContent(),\n
\'connection_xml\':software_instance.getConnectionXml(),\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
45d96643
660
\ No newline at end of file
661
\ 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