1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00

Fix network change operation: add interface type network config

This commit is contained in:
catborise 2019-01-25 13:42:48 +03:00
parent 1f005e90e1
commit 5c3a9e2a81

View file

@ -986,6 +986,21 @@ class wvmInstance(wvmConnect):
source.set('bridge', bridge_name)
source = interface.find('filterref')
if net_filter:
if source is not None: source.set('filter', net_filter)
else:
element = ElementTree.Element("filterref")
element.attrib['filter'] = net_filter
interface.append(element)
else:
if source is not None: interface.remove(source)
elif interface.get('type') == 'network':
source = interface.find('mac')
source.set('address', net_mac)
source = interface.find('source')
source.set('network', net_source)
source = interface.find('filterref')
if net_filter:
if source is not None: source.set('filter', net_filter)
else: