Commit f62806da authored by Łukasz Nowak's avatar Łukasz Nowak

Allow to use network for instance allocation.

parent 5874c584
...@@ -98,6 +98,14 @@ if "instance_guid" in filter_kw:\n ...@@ -98,6 +98,14 @@ if "instance_guid" in filter_kw:\n
else:\n else:\n
query_kw["uid"] = "-1"\n query_kw["uid"] = "-1"\n
\n \n
if \'network_guid\' in filter_kw:\n
network_guid = filter_kw.pop(\'network_guid\')\n
network = context.getPortalObject().portal_catalog.getResultValue(portal_type=\'Computer Network\', reference=network_guid)\n
if network is None:\n
query_kw["uid"] = "-1"\n
else:\n
query_kw["subordination_uid"] = network.getUid()\n
\n
computer_base_category_list = [\n computer_base_category_list = [\n
\'group\',\n \'group\',\n
\'cpu_core\',\n \'cpu_core\',\n
......
478 479
\ No newline at end of file \ No newline at end of file
...@@ -75,6 +75,7 @@ $(document).ready(function () {\n ...@@ -75,6 +75,7 @@ $(document).ready(function () {\n
\'storage_redundancy\',\n \'storage_redundancy\',\n
\'computer_guid\',\n \'computer_guid\',\n
\'group\',\n \'group\',\n
\'network_guid\',\n
];\n ];\n
\n \n
checkallocable = function () {\n checkallocable = function () {\n
......
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
<string>your_instance_xml</string> <string>your_instance_xml</string>
<string>your_description</string> <string>your_description</string>
<string>your_computer_guid</string> <string>your_computer_guid</string>
<string>your_network_guid</string>
<string>your_group</string> <string>your_group</string>
<string>your_cpu_core</string> <string>your_cpu_core</string>
<string>your_cpu_frequency</string> <string>your_cpu_frequency</string>
......
460 461
\ 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