This avoids showing empty notes in the result of the content/{volid}
API call for volumes that do not even support notes. It's also in
preparation for the proposed get_volume_attribute generalization,
which expects undef to be returned when an attribute is not supported.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
sub get_volume_notes {
my ($class, $scfg, $storeid, $volname, $timeout) = @_;
+ my ($vtype) = $class->parse_volname($volname);
+ return if $vtype ne 'backup';
+
my $path = $class->filesystem_path($scfg, $volname);
$path .= $class->SUPER::NOTES_EXT;