[libvirt] [PATCH v2] test: storage: Fill in default vol types for every pool
Andrea Bolognani
abologna at redhat.com
Wed Mar 13 16:40:54 UTC 2019
On Fri, 2019-03-08 at 12:43 -0500, Cole Robinson wrote:
> static int
> testStorageVolumeTypeForPool(int pooltype)
> {
> - switch (pooltype) {
> - case VIR_STORAGE_POOL_DIR:
> - case VIR_STORAGE_POOL_FS:
> - case VIR_STORAGE_POOL_NETFS:
> - return VIR_STORAGE_VOL_FILE;
> - default:
> - return VIR_STORAGE_VOL_BLOCK;
> + switch ((virStoragePoolType) pooltype) {
> + case VIR_STORAGE_POOL_DIR:
> + case VIR_STORAGE_POOL_FS:
> + case VIR_STORAGE_POOL_NETFS:
> + case VIR_STORAGE_POOL_VSTORAGE:
> + return VIR_STORAGE_VOL_FILE;
> + case VIR_STORAGE_POOL_SHEEPDOG:
> + case VIR_STORAGE_POOL_ISCSI_DIRECT:
> + case VIR_STORAGE_POOL_GLUSTER:
> + case VIR_STORAGE_POOL_RBD:
> + return VIR_STORAGE_VOL_NETWORK;
> + case VIR_STORAGE_POOL_LOGICAL:
> + case VIR_STORAGE_POOL_DISK:
> + case VIR_STORAGE_POOL_MPATH:
> + case VIR_STORAGE_POOL_ISCSI:
> + case VIR_STORAGE_POOL_SCSI:
> + case VIR_STORAGE_POOL_ZFS:
> + return VIR_STORAGE_VOL_BLOCK;
> + case VIR_STORAGE_POOL_LAST:
> + default:
> + virReportEnumRangeError(virStoragePoolType, pooltype);
> + return -1;
> }
> }
This is not my area of expertise but the categorization looks
sane enough, so assuming you've done your homework... :)
Reviewed-by: Andrea Bolognani <abologna at redhat.com>
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list