From 7cf87f750baf6b7f280cb763aa02bdc473c3ec24 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Tue, 14 Apr 2015 15:54:42 +0200 Subject: [PATCH] RNG schema: allow plain @floor to The element to has several attributes from which two are mandatory. Well, from two at least one has to be present: @average or @floor or both. Instead of inventing crazy RNG schema, let's make all the attributes optional there and rely on our parsing code to correctly handle the situation. Signed-off-by: Michal Privoznik --- docs/schemas/networkcommon.rng | 8 ++- .../qemuxml2argv-net-bandwidth2.xml | 65 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth2.xml diff --git a/docs/schemas/networkcommon.rng b/docs/schemas/networkcommon.rng index cc8b1dcad7..09691dcbd0 100644 --- a/docs/schemas/networkcommon.rng +++ b/docs/schemas/networkcommon.rng @@ -152,9 +152,11 @@ - - - + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth2.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth2.xml new file mode 100644 index 0000000000..10e15eeaa4 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth2.xml @@ -0,0 +1,65 @@ + + f14-60 + 38644c45-5227-a936-3b38-bc4f72c355bb + 1048576 + 1048576 + 2 + + hvm + + + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-kvm + + + + +
+ + + +
+ + + + + + + + + +
+ + + + + + + + + + + + +
+ +