From 2668adcec2b104f88fcf04d848bb8a6c6fd50ccd Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Wed, 8 Apr 2020 13:40:07 +0200 Subject: [PATCH] Add comment for volume_has_feature Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index c381394..0848176 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -285,6 +285,21 @@ sub volume_snapshot_delete { } } +# check if a volume or snapshot supports a given feature +# $feature - one of: +# clone - linked clone is possible +# copy - full clone is possible +# replicate - replication is possible +# snapshot - taking a snapshot is possible +# sparseinit - volume is sparsely initialized +# template - conversion to base image is possible +# $snap - check if the feature is supported for a given snapshot +# $running - if the guest owning the volume is running +# $opts - hash with further options: +# valid_target_formats - list of formats for the target of a copy/clone +# operation that the caller could work with. The +# format of $volid is always considered valid and if +# no list is specified, all formats are considered valid. sub volume_has_feature { my ($cfg, $feature, $volid, $snap, $running, $opts) = @_; -- 2.39.5