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

- follow XML feature -- allow to have more then one address in computer partition

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42030 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6b1c0b5c
......@@ -67,11 +67,16 @@ for send_partition in computer_dict[\'partition_list\']:\n
if partition is None:\n
partition = context.newContent(portal_type=\'Computer Partition\')\n
partition.markFree()\n
partition.edit(default_network_address_ip_address = send_partition[\'addr\'],\n
default_network_address_netmask = send_partition[\'netmask\'],\n
reference = send_partition[\'reference\'],)\n
partition.getDefaultNetworkAddressValue().edit(\n
network_interface = send_partition[\'tap\'][\'name\'])\n
partition.edit(reference=send_partition[\'reference\'])\n
network_interface = send_partition[\'tap\'][\'name\']\n
# XXX: non optimal way to "update" partition interface, update = delete + insert\n
partition.deleteContent(list(partition.objectIds(portal_type=\'Internet Protocol Address\')))\n
for address in send_partition[\'address_list\']:\n
partition.newContent(portal_type=\'Internet Protocol Address\',\n
network_interface=network_interface,\n
ip_address=address[\'addr\'],\n
netmask=address[\'netmask\'],\n
)\n
</string> </value>
</item>
<item>
......@@ -126,6 +131,9 @@ for send_partition in computer_dict[\'partition_list\']:\n
<string>send_partition</string>
<string>None</string>
<string>partition</string>
<string>network_interface</string>
<string>list</string>
<string>address</string>
</tuple>
</value>
</item>
......
307
\ No newline at end of file
309
\ 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