]> git.proxmox.com Git - pve-storage.git/commit
Allow passing options to volume_has_feature
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 23 Mar 2020 11:18:50 +0000 (12:18 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 27 Mar 2020 07:50:23 +0000 (08:50 +0100)
commite6f4eed43581de9b9706cc2263c9631ea2abfc1a
treec9f7da3580129acfbf56d97da75cb18a8979dba8
parent6c25dbd495d894416f2436fae54e15a331985f78
Allow passing options to volume_has_feature

With the option valid_target_formats it's possible
to let the caller specify possible formats for the target
of an operation.
[0]: If the option is not set, assume that every format is valid.

In most cases the format of the the target and the format
of the source will agree (and therefore assumption [0] is
not actually assuming very much and ensures backwards
compatability). But when cloning a volume on a storage
using Plugin.pm's implementation (e.g. directory based
storages), the result is always a qcow2 image.

When cloning containers, the new option can be used to detect
that qcow2 is not valid and hence the clone feature is not
available.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm
PVE/Storage/Plugin.pm