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
Eric Zheng
slapos.core
Commits
15fb044c
Commit
15fb044c
authored
Jul 28, 2011
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code to filter the search with filters and resources specific
parent
a2e71bd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SalePackingListLine_asSoftwareInstanceComputerPartitionMergedDict.xml
...istLine_asSoftwareInstanceComputerPartitionMergedDict.xml
+12
-1
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/SalePackingListLine_asSoftwareInstanceComputerPartitionMergedDict.xml
View file @
15fb044c
...
...
@@ -52,17 +52,28 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
sale_packing_list_line = context\n
instance_type_list = [\'Software Instance\', \'Slave Instance\']\n
\n
service_relative_url_list = (\n
context.portal_preferences.getPreferredInstanceHostingResource(),\n
context.portal_preferences.getPreferredInstanceSetupResource())\n
\n
state_list = ["confirmed", "started"]\n
\n
software_instance = sale_packing_list_line.getAggregateValue(portal_type=instance_type_list)\n
computer_partition = sale_packing_list_line.getAggregateValue(portal_type=\'Computer Partition\')\n
software_release = sale_packing_list_line.getAggregateValue(portal_type="Software Release")\n
\n
ip_list = []\n
if computer_partition.getPortalType() == \'Computer Partition\':\n
for internet_protocol_address in computer_partition.contentValues(portal_type=\'Internet Protocol Address\'):\n
ip_list.append((internet_protocol_address.getNetworkInterface(\'\'), internet_protocol_address.getIpAddress()))\n
if software_instance is not None and computer_partition is not None and software_release is not None:\n
slave_instance_list = []\n
sale_packing_list_line_list = computer_partition.getAggregateRelatedValueList(portal_type="Sale Packing List Line")\n
sale_packing_list_line_list = computer_partition.getAggregateRelatedValueList(\n
portal_type="Sale Packing List Line", resource_relative_url=service_relative_url_list)\n
for sale_packing_list_line in sale_packing_list_line_list:\n
if sale_packing_list_line.getParent().getSimulationState() not in state_list:\n
continue\n
instance = sale_packing_list_line.getAggregateValue(portal_type=instance_type_list)\n
if instance is None:\n
continue\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
15fb044c
404
\ No newline at end of file
405
\ 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