mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-30 12:31:16 +00:00
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.
16 lines
445 B
XML
16 lines
445 B
XML
<interface type='bond' name='bond0'>
|
|
<start mode='none'/>
|
|
<protocol family='ipv4'>
|
|
<ip address='192.168.50.7' prefix='24'/>
|
|
<route gateway='192.168.50.1'/>
|
|
</protocol>
|
|
<link speed='1000' state='up'/>
|
|
<bond mode='active-backup'>
|
|
<miimon freq='100' updelay='10' carrier='ioctl'/>
|
|
<interface type='ethernet' name='eth1'>
|
|
</interface>
|
|
<interface type='ethernet' name='eth0'>
|
|
</interface>
|
|
</bond>
|
|
</interface>
|