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
d8398ab1
Commit
d8398ab1
authored
Jul 29, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Jul 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve SoftwareRelease_getRelatedNetworkList and Usable computer
parent
3f737526
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
18 deletions
+12
-18
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getRelatedNetworkList.xml
...ns/slapos_cloud/SoftwareRelease_getRelatedNetworkList.xml
+5
-14
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputerList.xml
...ns/slapos_cloud/SoftwareRelease_getUsableComputerList.xml
+6
-3
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getRelatedNetworkList.xml
View file @
d8398ab1
...
...
@@ -50,20 +50,11 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
software_release_url = context.getUrlString()\n
portal = context.getPortalObject()\n
network_list = []\n
\n
kw[\'portal_type\']=\'Computer Network\'\n
kw[\'validation_state\']=\'validated\'\n
\n
full_network_list = portal.portal_catalog(**kw)\n
for network in full_network_list:\n
computer_list = network.getSubordinationRelatedValueList()\n
for computer in computer_list:\n
if software_release_url in computer.Computer_getSoftwareReleaseUrlStringList():\n
network_list.append(network)\n
break\n
<value>
<string>
network_list = []\n
for computer in context.SoftwareRelease_getUsableComputerList():\n
network = computer.getSubordinationValue()\n
if network and not network in network_list:\n
network_list.append(network)\n
\n
return network_list\n
</string>
</value>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputerList.xml
View file @
d8398ab1
...
...
@@ -50,10 +50,13 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
software_installation_list = context.portal_catalog(url_string=context.getUrlString(),\n
portal_type=\'Software Installation\', validation_state=\'validated\')\n
<value>
<string>
kw[\'portal_type\'] = \'Software Installation\'\n
kw[\'validation_state\'] = \'validated\'\n
kw[\'url_string\'] = context.getUrlString()\n
\n
software_installation_list = context.portal_catalog(**kw)\n
computer_list = []\n
allocation_scope_list = [\'open/personal\', \'open/public\', \'open/frien\']\n
allocation_scope_list = [\'open/personal\', \'open/public\', \'open/frien
d
\']\n
for software_installation in software_installation_list:\n
computer = software_installation.getAggregateValue()\n
if software_installation.getSlapState() == \'start_requested\' and \\\n
...
...
master/bt5/slapos_cloud/bt/revision
View file @
d8398ab1
317
\ No newline at end of file
318
\ 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