Commit 3d4bcf71 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

Improve SoftwareRelease_getRelatedNetworkList and Usable computer

parent e527f54c
...@@ -50,20 +50,11 @@ ...@@ -50,20 +50,11 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>software_release_url = context.getUrlString()\n <value> <string>network_list = []\n
portal = context.getPortalObject()\n for computer in context.SoftwareRelease_getUsableComputerList():\n
network_list = []\n network = computer.getSubordinationValue()\n
\n if network and not network in network_list:\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 network_list.append(network)\n
break\n
\n \n
return network_list\n return network_list\n
</string> </value> </string> </value>
......
...@@ -50,10 +50,13 @@ ...@@ -50,10 +50,13 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>software_installation_list = context.portal_catalog(url_string=context.getUrlString(),\n <value> <string>kw[\'portal_type\'] = \'Software Installation\'\n
portal_type=\'Software Installation\', validation_state=\'validated\')\n kw[\'validation_state\'] = \'validated\'\n
kw[\'url_string\'] = context.getUrlString()\n
\n
software_installation_list = context.portal_catalog(**kw)\n
computer_list = []\n computer_list = []\n
allocation_scope_list = [\'open/personal\', \'open/public\', \'open/frien\']\n allocation_scope_list = [\'open/personal\', \'open/public\', \'open/friend\']\n
for software_installation in software_installation_list:\n for software_installation in software_installation_list:\n
computer = software_installation.getAggregateValue()\n computer = software_installation.getAggregateValue()\n
if software_installation.getSlapState() == \'start_requested\' and \\\n if software_installation.getSlapState() == \'start_requested\' and \\\n
......
317 318
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment