diff --git a/docs/schemas/Makefile.am b/docs/schemas/Makefile.am index c217d69482a3c4bd2e1e4094aa6c024abc6e4aaf..22f9f3f991bfa815a174e0e7ca77d86eef3463b6 100644 --- a/docs/schemas/Makefile.am +++ b/docs/schemas/Makefile.am @@ -10,6 +10,7 @@ schema_DATA = \ storagepool.rng \ storagevol.rng \ nodedev.rng \ - capability.rng + capability.rng \ + nwfilter.rng EXTRA_DIST = $(schema_DATA) diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 228665c6a4ddd1402b7ae2f1ecb3d6912e136be6..58c9fcb2532016c238cba8f874998c927d7b16af 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -894,6 +894,11 @@ + + + + + + + + + + + + + + root + arp + ipv4 + ipv6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [a-fA-F0-9]{32} + + + + [a-fA-F0-9]{8}\-([a-fA-F0-9]{4}\-){3}[a-fA-F0-9]{12} + + + + + + + + + [\\$]{1}[a-zA-Z0-9_]+ + + + + ([a-fA-F0-9]{1,2}:){5}[a-fA-F0-9]{1,2} + + + + + + + + + [\\$]{1}[a-zA-Z0-9_]+ + + + + ([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9] + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + ([a-fA-F0-9]{0,4}:){2,7}([a-fA-F0-9]*)(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])? + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 32 + + + + ([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9] + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 128 + + + + ([a-fA-F0-9]{0,4}:){2,7}([a-fA-F0-9]*) + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 63 + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 1536 + 65535 + + + + arp + ipv4 + ipv6 + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 255 + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 65535 + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 65535 + + + + ([Rr]eply|[Rr]equest|[Rr]equest_[Rr]everse|[Rr]eply_[Rr]everse|DRARP_[Rr]equest|DRARP_[Rr]eply|DRARP_[Ee]rror|InARP_[Rr]equest|ARP_NAK) + + + + + + + + + + ^[\\$]{1}[a-zA-Z0-9_]+$ + + + + 0 + 255 + + + + tcp + udp + udplite + esp + ah + icmp + igmp + sctp + icmpv6 + + + + + + + [a-zA-Z0-9_]+ + + + + + + [a-zA-Z0-9_\.:]+ + + + + + + drop + accept + + + + + + in + out + inout + + + + + + 0 + 1000 + + + diff --git a/libvirt.spec.in b/libvirt.spec.in index 21e311c0ed7e8e4dbb48c3a42afa8c6fc8c00f51..dcbc139dcb0b296badaa1a3d05b50556b24d97d0 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -785,6 +785,7 @@ fi %{_datadir}/libvirt/schemas/interface.rng %{_datadir}/libvirt/schemas/secret.rng %{_datadir}/libvirt/schemas/storageencryption.rng +%{_datadir}/libvirt/schemas/nwfilter.rng %{_datadir}/libvirt/cpu_map.xml diff --git a/tests/Makefile.am b/tests/Makefile.am index 883d1ace9b392a95aa5075a4b81f4af3335c414a..ef12386cdd162fde2911b404ba3dca48dfc1fe24 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -74,6 +74,7 @@ EXTRA_DIST = \ xml2vmxdata \ nwfilterxml2xmlout \ nwfilterxml2xmlin \ + nwfilterschematest \ $(patsubst %,qemuhelpdata/%,$(qemuhelpdata)) noinst_PROGRAMS = virshtest conftest \ @@ -120,7 +121,8 @@ test_scripts = \ storagepoolschematest \ storagevolschematest \ domainschematest \ - nodedevschematest + nodedevschematest \ + nwfilterschematest if WITH_LIBVIRTD test_scripts += \ diff --git a/tests/nwfilterschematest b/tests/nwfilterschematest new file mode 100755 index 0000000000000000000000000000000000000000..2c50c03322139c86197957c77078e983ce6564d8 --- /dev/null +++ b/tests/nwfilterschematest @@ -0,0 +1,10 @@ +#!/bin/sh + +: ${srcdir=.} +. $srcdir/test-lib.sh +. $abs_srcdir/schematestutils.sh + +DIRS="nwfilterxml2xmlout" +SCHEMA="nwfilter.rng" + +check_schema "$DIRS" "$SCHEMA"