Commit c70c08db authored by Alain Takoudjou's avatar Alain Takoudjou

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

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