From 77dd67087bfbe60f3b27e643d3794f0db60abac2 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Fri, 1 Jan 2010 20:40:26 -0500 Subject: [PATCH] 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 ;-) --- docs/schemas/interface.rng | 322 +++++++++++------- tests/interfaceschemadata/bond-arp.xml | 6 +- tests/interfaceschemadata/bond.xml | 6 +- tests/interfaceschemadata/bridge-bond.xml | 17 + tests/interfaceschemadata/bridge-empty.xml | 6 + .../interfaceschemadata/bridge-no-address.xml | 3 +- tests/interfaceschemadata/bridge-vlan.xml | 2 +- tests/interfaceschemadata/bridge.xml | 5 +- tests/interfaceschemadata/bridge42.xml | 3 +- .../ipv6-autoconf-dhcp.xml | 7 + tests/interfaceschemadata/ipv6-autoconf.xml | 6 + tests/interfaceschemadata/ipv6-dhcp.xml | 6 + tests/interfaceschemadata/ipv6-local.xml | 5 + .../interfaceschemadata/ipv6-static-multi.xml | 8 + tests/interfaceschemadata/ipv6-static.xml | 7 + tests/interfacexml2xmltest.c | 9 + 16 files changed, 291 insertions(+), 127 deletions(-) create mode 100644 tests/interfaceschemadata/bridge-bond.xml create mode 100644 tests/interfaceschemadata/bridge-empty.xml create mode 100644 tests/interfaceschemadata/ipv6-autoconf-dhcp.xml create mode 100644 tests/interfaceschemadata/ipv6-autoconf.xml create mode 100644 tests/interfaceschemadata/ipv6-dhcp.xml create mode 100644 tests/interfaceschemadata/ipv6-local.xml create mode 100644 tests/interfaceschemadata/ipv6-static-multi.xml create mode 100644 tests/interfaceschemadata/ipv6-static.xml diff --git a/docs/schemas/interface.rng b/docs/schemas/interface.rng index bed2f0a27e..a0df9bacc7 100644 --- a/docs/schemas/interface.rng +++ b/docs/schemas/interface.rng @@ -1,7 +1,13 @@ - + + @@ -109,12 +115,17 @@ - + + + + + + - + @@ -125,90 +136,105 @@ + + + bond + + + + + + + + + + balance-rr + + active-backup + balance-xor + broadcast + 802.3ad + balance-tlb + balance-alb + + + + + + + + + + + + + + + + + + + + + + ioctl + + netif + + + + + + + + + + + none + active + backup + all + + + + + + + + + + + + + + + + + + + - - bond - - + - - - - - balance-rr - - active-backup - balance-xor - broadcast - 802.3ad - balance-tlb - balance-alb - - - - - - - - - - - - - - - - - - - - - - ioctl - - netif - - - - - - - - - - - none - active - backup - all - - - - - - - - - - + @@ -245,47 +271,87 @@ different protocols --> - - - - - - - - - - ipv4 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + ipv4 + + + + + + + + + + + + + + + + + + + + + + + + ipv6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - [1-9]|[12][0-9]|3[0-2] + + (([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))))|(([0-9A-Fa-f]{1,4}:){0,5}:((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))))|(::([0-9A-Fa-f]{1,4}:){0,5}((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:) + + + + + + 128 diff --git a/tests/interfaceschemadata/bond-arp.xml b/tests/interfaceschemadata/bond-arp.xml index 7b4ed6fc1a..69e1d98f08 100644 --- a/tests/interfaceschemadata/bond-arp.xml +++ b/tests/interfaceschemadata/bond-arp.xml @@ -6,7 +6,9 @@ - - + + + + diff --git a/tests/interfaceschemadata/bond.xml b/tests/interfaceschemadata/bond.xml index 81b92e35e3..c4e6d403bc 100644 --- a/tests/interfaceschemadata/bond.xml +++ b/tests/interfaceschemadata/bond.xml @@ -6,7 +6,9 @@ - - + + + + diff --git a/tests/interfaceschemadata/bridge-bond.xml b/tests/interfaceschemadata/bridge-bond.xml new file mode 100644 index 0000000000..a8c30b95b9 --- /dev/null +++ b/tests/interfaceschemadata/bridge-bond.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/interfaceschemadata/bridge-empty.xml b/tests/interfaceschemadata/bridge-empty.xml new file mode 100644 index 0000000000..72861e66aa --- /dev/null +++ b/tests/interfaceschemadata/bridge-empty.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/interfaceschemadata/bridge-no-address.xml b/tests/interfaceschemadata/bridge-no-address.xml index cddafb1692..77575349fd 100644 --- a/tests/interfaceschemadata/bridge-no-address.xml +++ b/tests/interfaceschemadata/bridge-no-address.xml @@ -5,6 +5,7 @@ - + + diff --git a/tests/interfaceschemadata/bridge-vlan.xml b/tests/interfaceschemadata/bridge-vlan.xml index 77f992d1a5..559ebc4c5d 100644 --- a/tests/interfaceschemadata/bridge-vlan.xml +++ b/tests/interfaceschemadata/bridge-vlan.xml @@ -6,7 +6,7 @@ - + diff --git a/tests/interfaceschemadata/bridge.xml b/tests/interfaceschemadata/bridge.xml index 1f17114081..2535edf94e 100644 --- a/tests/interfaceschemadata/bridge.xml +++ b/tests/interfaceschemadata/bridge.xml @@ -4,10 +4,11 @@ - + - + + diff --git a/tests/interfaceschemadata/bridge42.xml b/tests/interfaceschemadata/bridge42.xml index c6639ab801..199b62c0d9 100644 --- a/tests/interfaceschemadata/bridge42.xml +++ b/tests/interfaceschemadata/bridge42.xml @@ -2,6 +2,7 @@ - + + diff --git a/tests/interfaceschemadata/ipv6-autoconf-dhcp.xml b/tests/interfaceschemadata/ipv6-autoconf-dhcp.xml new file mode 100644 index 0000000000..9ea716d0d0 --- /dev/null +++ b/tests/interfaceschemadata/ipv6-autoconf-dhcp.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/interfaceschemadata/ipv6-autoconf.xml b/tests/interfaceschemadata/ipv6-autoconf.xml new file mode 100644 index 0000000000..eda0ea764f --- /dev/null +++ b/tests/interfaceschemadata/ipv6-autoconf.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/interfaceschemadata/ipv6-dhcp.xml b/tests/interfaceschemadata/ipv6-dhcp.xml new file mode 100644 index 0000000000..74395390ab --- /dev/null +++ b/tests/interfaceschemadata/ipv6-dhcp.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/interfaceschemadata/ipv6-local.xml b/tests/interfaceschemadata/ipv6-local.xml new file mode 100644 index 0000000000..895d0f7944 --- /dev/null +++ b/tests/interfaceschemadata/ipv6-local.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/interfaceschemadata/ipv6-static-multi.xml b/tests/interfaceschemadata/ipv6-static-multi.xml new file mode 100644 index 0000000000..f0cb00bd8c --- /dev/null +++ b/tests/interfaceschemadata/ipv6-static-multi.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/interfaceschemadata/ipv6-static.xml b/tests/interfaceschemadata/ipv6-static.xml new file mode 100644 index 0000000000..e43d2a2fea --- /dev/null +++ b/tests/interfaceschemadata/ipv6-static.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/interfacexml2xmltest.c b/tests/interfacexml2xmltest.c index ed3093c3ac..d8f1b43e72 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); }