From 45e93e6ddac32661d2fa2a3e2a606aa09db23d55 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 24 Nov 2020 10:09:33 +0100 Subject: [PATCH] Storage/PBSPlugin: implement get/update_volume_notes for pbs Signed-off-by: Dominik Csapak --- PVE/Storage/PBSPlugin.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index fbffbdf..7d3db34 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -608,6 +608,26 @@ sub deactivate_volume { return 1; } +sub get_volume_notes { + my ($class, $scfg, $storeid, $volname, $timeout) = @_; + + my (undef, $name, undef, undef, undef, undef, $format) = $class->parse_volname($volname); + + my $data = run_client_cmd($scfg, $storeid, "snapshot", [ "notes", "show", $name ]); + + return $data->{notes}; +} + +sub update_volume_notes { + my ($class, $scfg, $storeid, $volname, $notes, $timeout) = @_; + + my (undef, $name, undef, undef, undef, undef, $format) = $class->parse_volname($volname); + + run_client_cmd($scfg, $storeid, "snapshot", [ "notes", "update", $name, $notes ], 1); + + return undef; +} + sub volume_size_info { my ($class, $scfg, $storeid, $volname, $timeout) = @_; -- 2.39.5