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 <phrdina(a)redhat.com>
---
docs/formatstoragecaps.html.in | 7 --
src/conf/storage_conf.c | 25 +------
.../storagepoolcapsschemadata/poolcaps-fs.xml | 67 -------------------
.../poolcaps-full.xml | 67 -------------------
4 files changed, 1 insertion(+), 165 deletions(-)
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 @@
<dd>Lists all the possible <code>poolOptions</code> source
pool format types.
</dd>
- <dt><code>requiredSourceElements</code></dt>
- <dd>Lists all the required <code>poolOptions</code> source
- subelements required for a valid source pool element.
- </dd>
<dt><code>targetFormatType</code></dt>
<dd>Lists all the possible <code>volOptions</code> 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, "<poolOptions>\n");
@@ -389,29 +389,6 @@ virStoragePoolOptionsFormatPool(virBufferPtr buf,
virBufferAddLit(buf, "</enum>\n");
}
- if (poolOptions->flags) {
- virBufferAddLit(buf, "<enum
name='requiredSourceElements'>\n");
- virBufferAdjustIndent(buf, 2);
-
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_HOST)
- virBufferAddLit(buf, "<value>host</value>\n");
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_DEVICE)
- virBufferAddLit(buf, "<value>device</value>\n");
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_DIR)
- virBufferAddLit(buf, "<value>dir</value>\n");
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_ADAPTER)
- virBufferAddLit(buf, "<value>adapter</value>\n");
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_NAME)
- virBufferAddLit(buf, "<value>name</value>\n");
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_INITIATOR_IQN)
- virBufferAddLit(buf, "<value>initiator</value>\n");
- if (poolOptions->flags & VIR_STORAGE_POOL_SOURCE_NETWORK)
- virBufferAddLit(buf, "<value>network</value>\n");
-
- virBufferAdjustIndent(buf, -2);
- virBufferAddLit(buf, "</enum>\n");
- }
-
virBufferAdjustIndent(buf, -2);
virBufferAddLit(buf, "</poolOptions>\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 @@
<value>xfs</value>
<value>ocfs2</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>device</value>
- </enum>
</poolOptions>
<volOptions>
<defaultFormat type='raw'/>
@@ -77,10 +74,6 @@
<value>glusterfs</value>
<value>cifs</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>dir</value>
- </enum>
</poolOptions>
<volOptions>
<defaultFormat type='raw'/>
@@ -112,10 +105,6 @@
<value>unknown</value>
<value>lvm2</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>device</value>
- <value>name</value>
- </enum>
</poolOptions>
</pool>
<pool type='disk' supported='no'>
@@ -132,9 +121,6 @@
<value>sun</value>
<value>lvm2</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>device</value>
- </enum>
</poolOptions>
<volOptions>
<defaultFormat type='none'/>
@@ -151,60 +137,18 @@
</volOptions>
</pool>
<pool type='iscsi' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>device</value>
- <value>initiator</value>
- </enum>
- </poolOptions>
</pool>
<pool type='iscsi-direct' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>device</value>
- <value>initiator</value>
- <value>network</value>
- </enum>
- </poolOptions>
</pool>
<pool type='scsi' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>adapter</value>
- </enum>
- </poolOptions>
</pool>
<pool type='mpath' supported='no'>
</pool>
<pool type='rbd' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>name</value>
- <value>network</value>
- </enum>
- </poolOptions>
</pool>
<pool type='sheepdog' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>name</value>
- <value>network</value>
- </enum>
- </poolOptions>
</pool>
<pool type='gluster' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>dir</value>
- <value>name</value>
- <value>network</value>
- </enum>
- </poolOptions>
<volOptions>
<defaultFormat type='raw'/>
<enum name='targetFormatType'>
@@ -229,19 +173,8 @@
</volOptions>
</pool>
<pool type='zfs' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>device</value>
- <value>name</value>
- </enum>
- </poolOptions>
</pool>
<pool type='vstorage' supported='no'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>name</value>
- </enum>
- </poolOptions>
<volOptions>
<defaultFormat type='raw'/>
<enum name='targetFormatType'>
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 @@
<value>xfs</value>
<value>ocfs2</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>device</value>
- </enum>
</poolOptions>
<volOptions>
<defaultFormat type='raw'/>
@@ -77,10 +74,6 @@
<value>glusterfs</value>
<value>cifs</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>dir</value>
- </enum>
</poolOptions>
<volOptions>
<defaultFormat type='raw'/>
@@ -112,10 +105,6 @@
<value>unknown</value>
<value>lvm2</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>device</value>
- <value>name</value>
- </enum>
</poolOptions>
</pool>
<pool type='disk' supported='yes'>
@@ -132,9 +121,6 @@
<value>sun</value>
<value>lvm2</value>
</enum>
- <enum name='requiredSourceElements'>
- <value>device</value>
- </enum>
</poolOptions>
<volOptions>
<defaultFormat type='none'/>
@@ -151,60 +137,18 @@
</volOptions>
</pool>
<pool type='iscsi' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>device</value>
- <value>initiator</value>
- </enum>
- </poolOptions>
</pool>
<pool type='iscsi-direct' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>device</value>
- <value>initiator</value>
- <value>network</value>
- </enum>
- </poolOptions>
</pool>
<pool type='scsi' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>adapter</value>
- </enum>
- </poolOptions>
</pool>
<pool type='mpath' supported='yes'>
</pool>
<pool type='rbd' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>name</value>
- <value>network</value>
- </enum>
- </poolOptions>
</pool>
<pool type='sheepdog' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>name</value>
- <value>network</value>
- </enum>
- </poolOptions>
</pool>
<pool type='gluster' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>host</value>
- <value>dir</value>
- <value>name</value>
- <value>network</value>
- </enum>
- </poolOptions>
<volOptions>
<defaultFormat type='raw'/>
<enum name='targetFormatType'>
@@ -229,19 +173,8 @@
</volOptions>
</pool>
<pool type='zfs' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>device</value>
- <value>name</value>
- </enum>
- </poolOptions>
</pool>
<pool type='vstorage' supported='yes'>
- <poolOptions>
- <enum name='requiredSourceElements'>
- <value>name</value>
- </enum>
- </poolOptions>
<volOptions>
<defaultFormat type='raw'/>
<enum name='targetFormatType'>
--
2.20.1