From: Pavel Hrdina Date: Wed, 6 Mar 2019 17:59:39 +0000 (+0100) Subject: caps: drop requiredSourceElements from storage pool capabilities X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9dadc7302920f9fca0057c655d03c2b0206b9a70;p=libvirt.git caps: drop requiredSourceElements from storage pool capabilities Capabilities should not duplicate data that are obvious from our documentation and will not change with different QEMU binaries or the way how we compile libvirt. Signed-off-by: Pavel Hrdina --- diff --git a/docs/formatstoragecaps.html.in b/docs/formatstoragecaps.html.in index 2813d061b0..ee3888f44d 100644 --- a/docs/formatstoragecaps.html.in +++ b/docs/formatstoragecaps.html.in @@ -56,9 +56,6 @@ <value>ext2</value> ... </enum> - <enum name='requiredSourceElements'> - <value>device</value> - </enum> </poolOptions> <volOptions> <defaultFormat type='raw'</> @@ -92,10 +89,6 @@
Lists all the possible poolOptions source pool format types.
-
requiredSourceElements
-
Lists all the required poolOptions source - subelements required for a valid source pool element. -
targetFormatType
Lists all the possible volOptions target volume format types. diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 751a00aaf0..c7ab5b8802 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -366,7 +366,7 @@ virStoragePoolOptionsFormatPool(virBufferPtr buf, if (!(poolOptions = virStoragePoolOptionsForPoolType(type))) return -1; - if (!poolOptions->formatToString && !poolOptions->flags) + if (!poolOptions->formatToString) return 0; virBufferAddLit(buf, "\n"); @@ -389,29 +389,6 @@ virStoragePoolOptionsFormatPool(virBufferPtr buf, virBufferAddLit(buf, "\n"); } - if (poolOptions->flags) { - virBufferAddLit(buf, "\n"); - virBufferAdjustIndent(buf, 2); - - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_HOST) - virBufferAddLit(buf, "host\n"); - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_DEVICE) - virBufferAddLit(buf, "device\n"); - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_DIR) - virBufferAddLit(buf, "dir\n"); - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_ADAPTER) - virBufferAddLit(buf, "adapter\n"); - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_NAME) - virBufferAddLit(buf, "name\n"); - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_INITIATOR_IQN) - virBufferAddLit(buf, "initiator\n"); - if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_NETWORK) - virBufferAddLit(buf, "network\n"); - - virBufferAdjustIndent(buf, -2); - virBufferAddLit(buf, "\n"); - } - virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); return 0; diff --git a/tests/storagepoolcapsschemadata/poolcaps-fs.xml b/tests/storagepoolcapsschemadata/poolcaps-fs.xml index 0e15af0607..6513ea621a 100644 --- a/tests/storagepoolcapsschemadata/poolcaps-fs.xml +++ b/tests/storagepoolcapsschemadata/poolcaps-fs.xml @@ -41,9 +41,6 @@ xfs ocfs2 - - device - @@ -77,10 +74,6 @@ glusterfs cifs - - host - dir - @@ -112,10 +105,6 @@ unknown lvm2 - - device - name - @@ -132,9 +121,6 @@ sun lvm2 - - device - @@ -151,60 +137,18 @@ - - - host - device - initiator - - - - - host - device - initiator - network - - - - - adapter - - - - - host - name - network - - - - - host - name - network - - - - - host - dir - name - network - - @@ -229,19 +173,8 @@ - - - device - name - - - - - name - - diff --git a/tests/storagepoolcapsschemadata/poolcaps-full.xml b/tests/storagepoolcapsschemadata/poolcaps-full.xml index 0bb3faf04e..32003dd608 100644 --- a/tests/storagepoolcapsschemadata/poolcaps-full.xml +++ b/tests/storagepoolcapsschemadata/poolcaps-full.xml @@ -41,9 +41,6 @@ xfs ocfs2 - - device - @@ -77,10 +74,6 @@ glusterfs cifs - - host - dir - @@ -112,10 +105,6 @@ unknown lvm2 - - device - name - @@ -132,9 +121,6 @@ sun lvm2 - - device - @@ -151,60 +137,18 @@ - - - host - device - initiator - - - - - host - device - initiator - network - - - - - adapter - - - - - host - name - network - - - - - host - name - network - - - - - host - dir - name - network - - @@ -229,19 +173,8 @@ - - - device - name - - - - - name - -