Commit 5029f941 authored by Alain Takoudjou's avatar Alain Takoudjou

do not load tap ip information from xml if the option is disabled

parent 1dd08722
......@@ -383,10 +383,11 @@ class Computer(object):
if partition_dict['tap']:
tap = Tap(partition_dict['tap']['name'])
tap.ipv4_addr = partition_dict['tap'].get('ipv4_addr', '')
tap.ipv4_netmask = partition_dict['tap'].get('ipv4_netmask', '')
tap.ipv4_gateway = partition_dict['tap'].get('ipv4_gateway', '')
tap.ipv4_network = partition_dict['tap'].get('ipv4_network', '')
if tap_gateway_interface:
tap.ipv4_addr = partition_dict['tap'].get('ipv4_addr', '')
tap.ipv4_netmask = partition_dict['tap'].get('ipv4_netmask', '')
tap.ipv4_gateway = partition_dict['tap'].get('ipv4_gateway', '')
tap.ipv4_network = partition_dict['tap'].get('ipv4_network', '')
else:
tap = Tap(partition_dict['reference'])
......
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