rename comment to notes
so that we are more consistent with pbs Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
093d5ad385
commit
6fef456c8d
@ -87,8 +87,8 @@ __PACKAGE__->register_method ({
|
|||||||
minimum => 0,
|
minimum => 0,
|
||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
comment => {
|
notes => {
|
||||||
description => "An optional Comment.",
|
description => "Optional notes. If they contain multiple lines, only the first one is returned here.",
|
||||||
type => 'string',
|
type => 'string',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -544,7 +544,7 @@ sub list_volumes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$info->{verification} = $item->{verification} if defined($item->{verification});
|
$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;
|
push @$res, $info;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use base qw(PVE::SectionConfig);
|
|||||||
|
|
||||||
use constant COMPRESSOR_RE => 'gz|lzo|zst';
|
use constant COMPRESSOR_RE => 'gz|lzo|zst';
|
||||||
|
|
||||||
use constant COMMENT_EXT => ".comment";
|
use constant NOTES_EXT => ".notes";
|
||||||
|
|
||||||
our @COMMON_TAR_FLAGS = qw(
|
our @COMMON_TAR_FLAGS = qw(
|
||||||
--one-file-system
|
--one-file-system
|
||||||
@ -1035,10 +1035,10 @@ my $get_subdir_files = sub {
|
|||||||
$info->{vmid} = $vmid // $1;
|
$info->{vmid} = $vmid // $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $comment_fn = $original.COMMENT_EXT;
|
my $notes_fn = $original.NOTES_EXT;
|
||||||
if (-f $comment_fn) {
|
if (-f $notes_fn) {
|
||||||
my $comment = PVE::Tools::file_read_firstline($comment_fn);
|
my $notes = PVE::Tools::file_read_firstline($notes_fn);
|
||||||
$info->{comment} = $comment if defined($comment);
|
$info->{notes} = $notes if defined($notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
} elsif ($tt eq 'snippets') {
|
} elsif ($tt eq 'snippets') {
|
||||||
|
|||||||
Reference in New Issue
Block a user