]> git.proxmox.com Git - pve-storage.git/commitdiff
Storage/PBSPlugin: implement get/update_volume_notes for pbs
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 24 Nov 2020 09:09:33 +0000 (10:09 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Nov 2020 12:42:13 +0000 (13:42 +0100)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/Storage/PBSPlugin.pm

index fbffbdf0f03cc4b60071eb5e21130b6c247c2c97..7d3db34c9593e7ea3c08838e8371b3265d1ddd5e 100644 (file)
@@ -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) = @_;