From 8ef12b96faa357eae17fad7ab884b63dbd70feaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 28 Mar 2017 15:07:50 +0200 Subject: [PATCH] schema: do not require name for certain pool types Pool types that have the VIR_STORAGE_POOL_SOURCE_NAME flag set allow omitting the element and instead fill out the pool name from the element. Relax the schema to make optional for these pools. Expressing that at least one of these is required is out of scope of the schema. --- docs/schemas/storagepool.rng | 27 ++++++++++++++----- .../pool-logical-noname.xml | 18 +++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 tests/storagepoolxml2xmlin/pool-logical-noname.xml diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index 6219ce5afe..8386f29aa7 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -70,7 +70,7 @@ logical - + @@ -132,7 +132,7 @@ rbd - + @@ -143,7 +143,7 @@ sheepdog - + @@ -154,7 +154,7 @@ gluster - + @@ -165,7 +165,7 @@ zfs - + @@ -179,7 +179,7 @@ vstorage - + @@ -205,6 +205,21 @@ + + + + + + + + + + + + + + + diff --git a/tests/storagepoolxml2xmlin/pool-logical-noname.xml b/tests/storagepoolxml2xmlin/pool-logical-noname.xml new file mode 100644 index 0000000000..ad3f88dfe1 --- /dev/null +++ b/tests/storagepoolxml2xmlin/pool-logical-noname.xml @@ -0,0 +1,18 @@ + + 1c13165a-d0f4-3aee-b447-30fb38789091 + 99891544064 + 99220455424 + 671088640 + + zily + + + + /dev/zily + + 0700 + 0 + 0 + + +