]> xenbits.xensource.com Git - libvirt.git/commitdiff
caps: drop requiredSourceElements from storage pool capabilities
authorPavel Hrdina <phrdina@redhat.com>
Wed, 6 Mar 2019 17:59:39 +0000 (18:59 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 7 Mar 2019 11:01:09 +0000 (12:01 +0100)
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@redhat.com>
docs/formatstoragecaps.html.in
src/conf/storage_conf.c
tests/storagepoolcapsschemadata/poolcaps-fs.xml
tests/storagepoolcapsschemadata/poolcaps-full.xml

index 2813d061b044e2726f5413d61e06725223c49dc8..ee3888f44d6449a199a24da0d6b9403284b30e1e 100644 (file)
@@ -56,9 +56,6 @@
         &lt;value&gt;ext2&lt;/value&gt;
         ...
       &lt;/enum&gt;
-      &lt;enum name='requiredSourceElements'&gt;
-        &lt;value&gt;device&lt;/value&gt;
-      &lt;/enum&gt;
     &lt;/poolOptions&gt;
     &lt;volOptions&gt;
       &lt;defaultFormat type='raw'&lt;/&gt;
             <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.
index 751a00aaf0c006472f5779d34a9e4a01a7580982..c7ab5b88022d2cda09583e3d300cab84b825ee4e 100644 (file)
@@ -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;
index 0e15af06071a642a7176cbc775bd86d19a59c7c1..6513ea621aa7b71e5508c49405d1c982691f03ee 100644 (file)
@@ -41,9 +41,6 @@
         <value>xfs</value>
         <value>ocfs2</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>device</value>
-      </enum>
     </poolOptions>
     <volOptions>
       <defaultFormat type='raw'/>
         <value>glusterfs</value>
         <value>cifs</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>host</value>
-        <value>dir</value>
-      </enum>
     </poolOptions>
     <volOptions>
       <defaultFormat type='raw'/>
         <value>unknown</value>
         <value>lvm2</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>device</value>
-        <value>name</value>
-      </enum>
     </poolOptions>
   </pool>
   <pool type='disk' supported='no'>
         <value>sun</value>
         <value>lvm2</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>device</value>
-      </enum>
     </poolOptions>
     <volOptions>
       <defaultFormat type='none'/>
     </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'>
     </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'>
index 0bb3faf04ee2cb5057bf8d826821d1f36eeb4b73..32003dd608438e058e32c56fe2d80434536dff45 100644 (file)
@@ -41,9 +41,6 @@
         <value>xfs</value>
         <value>ocfs2</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>device</value>
-      </enum>
     </poolOptions>
     <volOptions>
       <defaultFormat type='raw'/>
         <value>glusterfs</value>
         <value>cifs</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>host</value>
-        <value>dir</value>
-      </enum>
     </poolOptions>
     <volOptions>
       <defaultFormat type='raw'/>
         <value>unknown</value>
         <value>lvm2</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>device</value>
-        <value>name</value>
-      </enum>
     </poolOptions>
   </pool>
   <pool type='disk' supported='yes'>
         <value>sun</value>
         <value>lvm2</value>
       </enum>
-      <enum name='requiredSourceElements'>
-        <value>device</value>
-      </enum>
     </poolOptions>
     <volOptions>
       <defaultFormat type='none'/>
     </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'>
     </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'>