]> git.proxmox.com Git - pve-storage.git/commitdiff
rename comment to notes
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 24 Nov 2020 09:09:30 +0000 (10:09 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Nov 2020 09:23:25 +0000 (10:23 +0100)
so that we are more consistent with pbs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Storage/Content.pm
PVE/Storage/PBSPlugin.pm
PVE/Storage/Plugin.pm

index 8d2ff3269ca35c274bffa71e397c02618089c318..d4e23926b9dc8f1d4333173132551e3770c6d446 100644 (file)
@@ -87,8 +87,8 @@ __PACKAGE__->register_method ({
                    minimum => 0,
                    optional => 1,
                },
-               comment => {
-                   description => "An optional Comment.",
+               notes => {
+                   description => "Optional notes. If they contain multiple lines, only the first one is returned here.",
                    type => 'string',
                    optional => 1,
                },
index ef9bc79b978e450ada8f6c53fc21a2fcbdf77f05..fbffbdf0f03cc4b60071eb5e21130b6c247c2c97 100644 (file)
@@ -544,7 +544,7 @@ sub list_volumes {
        };
 
        $info->{verification} = $item->{verification} if defined($item->{verification});
-       $info->{comment} = $item->{comment} if defined($item->{comment});
+       $info->{notes} = $item->{comment} if defined($item->{comment});
 
        push @$res, $info;
     }
index c60d84bad16241ae8898e0b907b30c2b62ec8897..1c8666661fc66e7f35f694522e4fad72e4f6f640 100644 (file)
@@ -19,7 +19,7 @@ use base qw(PVE::SectionConfig);
 
 use constant COMPRESSOR_RE => 'gz|lzo|zst';
 
-use constant COMMENT_EXT => ".comment";
+use constant NOTES_EXT => ".notes";
 
 our @COMMON_TAR_FLAGS = qw(
     --one-file-system
@@ -1035,10 +1035,10 @@ my $get_subdir_files = sub {
                $info->{vmid} = $vmid // $1;
            }
 
-           my $comment_fn = $original.COMMENT_EXT;
-           if (-f $comment_fn) {
-               my $comment = PVE::Tools::file_read_firstline($comment_fn);
-               $info->{comment} = $comment if defined($comment);
+           my $notes_fn = $original.NOTES_EXT;
+           if (-f $notes_fn) {
+               my $notes = PVE::Tools::file_read_firstline($notes_fn);
+               $info->{notes} = $notes if defined($notes);
            }
 
        } elsif ($tt eq 'snippets') {