mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
interface: clean up virInterfaceDefDevFormat
This modifies the formatting function of virInterface to be a proper mirror of the parse function, including the addition of a "parentIfType" arg so that we can decide whether or not it is appropriate to emit the elements that are only in toplevel interfaces, as well as the <link> element (which isn't allowed for bridge interfaces). Since the restructuring of the code necessarily changes the order of some of the elements, some test case data had to be updated.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<interface type='vlan' name='eth0.42'>
|
||||
<start mode='onboot'/>
|
||||
<link state='lowerlayerdown'/>
|
||||
<protocol family='ipv4'>
|
||||
<dhcp peerdns='no'/>
|
||||
</protocol>
|
||||
<link state='lowerlayerdown'/>
|
||||
<vlan tag='42'>
|
||||
<interface name='eth0'/>
|
||||
</vlan>
|
||||
|
||||
Reference in New Issue
Block a user