]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Add iscsi-direct pool list type flag
authorHan Han <hhan@redhat.com>
Thu, 11 Jul 2019 07:23:05 +0000 (15:23 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 13 Jul 2019 15:40:09 +0000 (17:40 +0200)
Add pool list type flag VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT,
which was forgotten when introducing iscsi-direct pool at f0bf1be3.

https://bugzilla.redhat.com/show_bug.cgi?id=1726609

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
include/libvirt/libvirt-storage.h
src/conf/storage_conf.h
src/conf/virstorageobj.c
src/libvirt-storage.c
tools/virsh-pool.c
tools/virsh.pod

index 5a95b2b139f3ef708d9d2d99893f687e310aa017..089e1e0bd1b774200db5ae99541af71ee16a5456 100644 (file)
@@ -244,6 +244,7 @@ typedef enum {
     VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER       = 1 << 16,
     VIR_CONNECT_LIST_STORAGE_POOLS_ZFS           = 1 << 17,
     VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE      = 1 << 18,
+    VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT  = 1 << 19,
 } virConnectListAllStoragePoolsFlags;
 
 int                     virConnectListAllStoragePools(virConnectPtr conn,
index 338e70244d26c92251fec557b384ea6f03a01bda..f399ac6192dac093bd341c146e2fcc7d170966b4 100644 (file)
@@ -484,7 +484,8 @@ VIR_ENUM_DECL(virStoragePartedFs);
                  VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG | \
                  VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER  | \
                  VIR_CONNECT_LIST_STORAGE_POOLS_ZFS      | \
-                 VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE)
+                 VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE | \
+                 VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT)
 
 #define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL \
                 (VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE     | \
index 31b5af8e9e09b79e8ab3473461de946cd1b32ae5..0ac128c4bcec16d4979639b72605cf576b473969 100644 (file)
@@ -1967,7 +1967,9 @@ virStoragePoolObjMatch(virStoragePoolObjPtr obj,
               (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ZFS) &&
                (obj->def->type == VIR_STORAGE_POOL_ZFS))     ||
               (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE) &&
-               (obj->def->type == VIR_STORAGE_POOL_VSTORAGE))))
+               (obj->def->type == VIR_STORAGE_POOL_VSTORAGE)) ||
+              (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT) &&
+               (obj->def->type == VIR_STORAGE_POOL_ISCSI_DIRECT))))
             return false;
     }
 
index 93f80e9751bd9eeeef513b070b5dd695f465bb64..05b23656925bbaf14656ee34823a68c81a4d6168 100644 (file)
@@ -96,6 +96,7 @@ virStoragePoolGetConnect(virStoragePoolPtr pool)
  * VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER
  * VIR_CONNECT_LIST_STORAGE_POOLS_ZFS
  * VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE
+ * VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT
  *
  * Returns the number of storage pools found or -1 and sets @pools to
  * NULL in case of error.  On success, the array stored into @pools is
index c56ab2d90a32f43a0335f1a992117243a60be905..510d41b508fc50ecfc96ad8292e7d0bff8db2b38 100644 (file)
@@ -1205,7 +1205,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
                 flags |= VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI;
                 break;
             case VIR_STORAGE_POOL_ISCSI_DIRECT:
-                flags |= VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI;
+                flags |= VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT;
                 break;
             case VIR_STORAGE_POOL_SCSI:
                 flags |= VIR_CONNECT_LIST_STORAGE_POOLS_SCSI;
index ed5308a6d44286133fc328da59f1bbb4f42bfa98..40c7b638f7c4e2e864c70c0b838254ee6fd78b51 100644 (file)
@@ -4093,7 +4093,7 @@ I<--uuid> and I<--name>.
 You may also want to list pools with specified types using I<type>, the
 pool types must be separated by comma, e.g. --type dir,disk. The valid pool
 types include 'dir', 'fs', 'netfs', 'logical', 'disk', 'iscsi', 'scsi',
-'mpath', 'rbd', 'sheepdog', 'gluster', 'zfs' and 'vstorage'.
+'mpath', 'rbd', 'sheepdog', 'gluster', 'zfs', 'vstorage' and 'iscsi-direct'.
 
 The I<--details> option instructs virsh to additionally
 display pool persistence and capacity related information where available.