diff options
author | Laine Stump <laine@laine.org> | 2010-01-01 20:40:26 -0500 |
---|---|---|
committer | Matthias Bolte <matthias.bolte@googlemail.com> | 2010-01-19 21:13:03 +0100 |
commit | 77dd67087bfbe60f3b27e643d3794f0db60abac2 (patch) | |
tree | 87140bc59b504bc12c91807fec0494d943f26958 /tests | |
parent | Support bond interfaces attached to bridges in interface xml. (diff) | |
download | libvirt-77dd67087bfbe60f3b27e643d3794f0db60abac2.tar.gz libvirt-77dd67087bfbe60f3b27e643d3794f0db60abac2.tar.bz2 libvirt-77dd67087bfbe60f3b27e643d3794f0db60abac2.zip |
Update interface.rng and xml test files to match netcf 0.1.5
The RNG now supports IPv6 and bonds attached to bridges, along with
some other minor tweaks. All test files from netcf have been copied to
the test directory and added to the xml2xml and schema tests (and they
all pass, of course ;-)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/interfaceschemadata/bond-arp.xml | 6 | ||||
-rw-r--r-- | tests/interfaceschemadata/bond.xml | 6 | ||||
-rw-r--r-- | tests/interfaceschemadata/bridge-bond.xml | 17 | ||||
-rw-r--r-- | tests/interfaceschemadata/bridge-empty.xml | 6 | ||||
-rw-r--r-- | tests/interfaceschemadata/bridge-no-address.xml | 3 | ||||
-rw-r--r-- | tests/interfaceschemadata/bridge-vlan.xml | 2 | ||||
-rw-r--r-- | tests/interfaceschemadata/bridge.xml | 5 | ||||
-rw-r--r-- | tests/interfaceschemadata/bridge42.xml | 3 | ||||
-rw-r--r-- | tests/interfaceschemadata/ipv6-autoconf-dhcp.xml | 7 | ||||
-rw-r--r-- | tests/interfaceschemadata/ipv6-autoconf.xml | 6 | ||||
-rw-r--r-- | tests/interfaceschemadata/ipv6-dhcp.xml | 6 | ||||
-rw-r--r-- | tests/interfaceschemadata/ipv6-local.xml | 5 | ||||
-rw-r--r-- | tests/interfaceschemadata/ipv6-static-multi.xml | 8 | ||||
-rw-r--r-- | tests/interfaceschemadata/ipv6-static.xml | 7 | ||||
-rw-r--r-- | tests/interfacexml2xmltest.c | 9 |
15 files changed, 87 insertions, 9 deletions
diff --git a/tests/interfaceschemadata/bond-arp.xml b/tests/interfaceschemadata/bond-arp.xml index 7b4ed6fc1..69e1d98f0 100644 --- a/tests/interfaceschemadata/bond-arp.xml +++ b/tests/interfaceschemadata/bond-arp.xml @@ -6,7 +6,9 @@ </protocol> <bond mode='active-backup'> <arpmon interval='100' target='192.168.50.1' validate='active'/> - <interface type='ethernet' name='eth1'/> - <interface type='ethernet' name='eth0'/> + <interface type='ethernet' name='eth1'> + </interface> + <interface type='ethernet' name='eth0'> + </interface> </bond> </interface> diff --git a/tests/interfaceschemadata/bond.xml b/tests/interfaceschemadata/bond.xml index 81b92e35e..c4e6d403b 100644 --- a/tests/interfaceschemadata/bond.xml +++ b/tests/interfaceschemadata/bond.xml @@ -6,7 +6,9 @@ </protocol> <bond mode='active-backup'> <miimon freq='100' updelay='10' carrier='ioctl'/> - <interface type='ethernet' name='eth1'/> - <interface type='ethernet' name='eth0'/> + <interface type='ethernet' name='eth1'> + </interface> + <interface type='ethernet' name='eth0'> + </interface> </bond> </interface> diff --git a/tests/interfaceschemadata/bridge-bond.xml b/tests/interfaceschemadata/bridge-bond.xml new file mode 100644 index 000000000..a8c30b95b --- /dev/null +++ b/tests/interfaceschemadata/bridge-bond.xml @@ -0,0 +1,17 @@ +<interface type='bridge' name='br0'> + <start mode='onboot'/> + <mtu size='1500'/> + <bridge stp='off'> + <interface type='ethernet' name='eth2'> + </interface> + <interface type='bond' name='bond0'> + <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> + </bridge> +</interface> diff --git a/tests/interfaceschemadata/bridge-empty.xml b/tests/interfaceschemadata/bridge-empty.xml new file mode 100644 index 000000000..72861e66a --- /dev/null +++ b/tests/interfaceschemadata/bridge-empty.xml @@ -0,0 +1,6 @@ +<interface type='bridge' name='br0'> + <start mode='onboot'/> + <mtu size='1500'/> + <bridge stp='off'> + </bridge> +</interface> diff --git a/tests/interfaceschemadata/bridge-no-address.xml b/tests/interfaceschemadata/bridge-no-address.xml index cddafb169..77575349f 100644 --- a/tests/interfaceschemadata/bridge-no-address.xml +++ b/tests/interfaceschemadata/bridge-no-address.xml @@ -5,6 +5,7 @@ <interface type='ethernet' name='eth0'> <mac address='ab:bb:cc:dd:ee:ff'/> </interface> - <interface type='ethernet' name='eth1'/> + <interface type='ethernet' name='eth1'> + </interface> </bridge> </interface> diff --git a/tests/interfaceschemadata/bridge-vlan.xml b/tests/interfaceschemadata/bridge-vlan.xml index 77f992d1a..559ebc4c5 100644 --- a/tests/interfaceschemadata/bridge-vlan.xml +++ b/tests/interfaceschemadata/bridge-vlan.xml @@ -6,7 +6,7 @@ <bridge stp='off'> <interface type='vlan' name='eth0.42'> <vlan tag='42'> - <interface name='eth0'/> + <interface name='eth0'/> </vlan> </interface> </bridge> diff --git a/tests/interfaceschemadata/bridge.xml b/tests/interfaceschemadata/bridge.xml index 1f1711408..2535edf94 100644 --- a/tests/interfaceschemadata/bridge.xml +++ b/tests/interfaceschemadata/bridge.xml @@ -4,10 +4,11 @@ <protocol family='ipv4'> <dhcp/> </protocol> - <bridge stp='off'> + <bridge stp='off' delay='0.01'> <interface type='ethernet' name='eth0'> <mac address='ab:bb:cc:dd:ee:ff'/> </interface> - <interface type='ethernet' name='eth1'/> + <interface type='ethernet' name='eth1'> + </interface> </bridge> </interface> diff --git a/tests/interfaceschemadata/bridge42.xml b/tests/interfaceschemadata/bridge42.xml index c6639ab80..199b62c0d 100644 --- a/tests/interfaceschemadata/bridge42.xml +++ b/tests/interfaceschemadata/bridge42.xml @@ -2,6 +2,7 @@ <start mode='onboot'/> <mtu size='1500'/> <bridge stp='off'> - <interface type='ethernet' name='eth42'/> + <interface type='ethernet' name='eth42'> + </interface> </bridge> </interface> diff --git a/tests/interfaceschemadata/ipv6-autoconf-dhcp.xml b/tests/interfaceschemadata/ipv6-autoconf-dhcp.xml new file mode 100644 index 000000000..9ea716d0d --- /dev/null +++ b/tests/interfaceschemadata/ipv6-autoconf-dhcp.xml @@ -0,0 +1,7 @@ +<interface type='ethernet' name='eth0'> + <start mode='onboot'/> + <protocol family='ipv6'> + <autoconf/> + <dhcp/> + </protocol> +</interface> diff --git a/tests/interfaceschemadata/ipv6-autoconf.xml b/tests/interfaceschemadata/ipv6-autoconf.xml new file mode 100644 index 000000000..eda0ea764 --- /dev/null +++ b/tests/interfaceschemadata/ipv6-autoconf.xml @@ -0,0 +1,6 @@ +<interface type='ethernet' name='eth0'> + <start mode='onboot'/> + <protocol family='ipv6'> + <autoconf/> + </protocol> +</interface> diff --git a/tests/interfaceschemadata/ipv6-dhcp.xml b/tests/interfaceschemadata/ipv6-dhcp.xml new file mode 100644 index 000000000..74395390a --- /dev/null +++ b/tests/interfaceschemadata/ipv6-dhcp.xml @@ -0,0 +1,6 @@ +<interface type='ethernet' name='eth0'> + <start mode='onboot'/> + <protocol family='ipv6'> + <dhcp/> + </protocol> +</interface> diff --git a/tests/interfaceschemadata/ipv6-local.xml b/tests/interfaceschemadata/ipv6-local.xml new file mode 100644 index 000000000..895d0f794 --- /dev/null +++ b/tests/interfaceschemadata/ipv6-local.xml @@ -0,0 +1,5 @@ +<interface type='ethernet' name='eth0'> + <start mode='onboot'/> + <protocol family='ipv6'> + </protocol> +</interface> diff --git a/tests/interfaceschemadata/ipv6-static-multi.xml b/tests/interfaceschemadata/ipv6-static-multi.xml new file mode 100644 index 000000000..f0cb00bd8 --- /dev/null +++ b/tests/interfaceschemadata/ipv6-static-multi.xml @@ -0,0 +1,8 @@ +<interface type='ethernet' name='eth0'> + <start mode='onboot'/> + <protocol family='ipv6'> + <ip address='3ffe:ffff:0:5::1' prefix='128'/> + <ip address='3ffe:ffff:0:5::3' prefix='128'/> + <ip address='3ffe:ffff:0:5::5' prefix='128'/> + </protocol> +</interface> diff --git a/tests/interfaceschemadata/ipv6-static.xml b/tests/interfaceschemadata/ipv6-static.xml new file mode 100644 index 000000000..e43d2a2fe --- /dev/null +++ b/tests/interfaceschemadata/ipv6-static.xml @@ -0,0 +1,7 @@ +<interface type='ethernet' name='eth0'> + <start mode='onboot'/> + <protocol family='ipv6'> + <ip address='3ffe:ffff:0:5::1' prefix='128'/> + <route gateway='3ffe:ffff:1234:5678::1'/> + </protocol> +</interface> diff --git a/tests/interfacexml2xmltest.c b/tests/interfacexml2xmltest.c index ed3093c3a..d8f1b43e7 100644 --- a/tests/interfacexml2xmltest.c +++ b/tests/interfacexml2xmltest.c @@ -83,11 +83,20 @@ mymain(int argc, char **argv) DO_TEST("ethernet-static-no-prefix"); DO_TEST("bridge"); DO_TEST("bridge42"); + DO_TEST("bridge-bond"); + DO_TEST("bridge-empty"); + DO_TEST("bridge-no-address"); DO_TEST("bridge-vlan"); DO_TEST("bridge-no-address"); DO_TEST("vlan"); DO_TEST("bond"); DO_TEST("bond-arp"); + DO_TEST("ipv6-autoconf-dhcp"); + DO_TEST("ipv6-autoconf"); + DO_TEST("ipv6-dhcp"); + DO_TEST("ipv6-local"); + DO_TEST("ipv6-static-multi"); + DO_TEST("ipv6-static"); return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); } |