From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage v2 1/4] rename comment to notes
Date: Tue, 24 Nov 2020 10:09:30 +0100 [thread overview]
Message-ID: <20201124090936.21810-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20201124090936.21810-1-d.csapak@proxmox.com>
so that we are more consistent with pbs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
PVE/API2/Storage/Content.pm | 4 ++--
PVE/Storage/PBSPlugin.pm | 2 +-
PVE/Storage/Plugin.pm | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/PVE/API2/Storage/Content.pm b/PVE/API2/Storage/Content.pm
index 8d2ff32..d4e2392 100644
--- a/PVE/API2/Storage/Content.pm
+++ b/PVE/API2/Storage/Content.pm
@@ -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,
},
diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm
index ef9bc79..fbffbdf 100644
--- a/PVE/Storage/PBSPlugin.pm
+++ b/PVE/Storage/PBSPlugin.pm
@@ -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;
}
diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index c60d84b..1c86666 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -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') {
--
2.20.1
next prev parent reply other threads:[~2020-11-24 9:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 9:09 [pve-devel] [PATCH proxmox-backup/pve-storage/pve-manager v2] show/edit backup comments Dominik Csapak
2020-11-24 9:09 ` [pve-devel] [PATCH proxmox-backup v2 1/1] client: add 'snapshot notes show/update' command Dominik Csapak
2020-11-24 9:52 ` Wolfgang Bumiller
2020-11-24 12:28 ` [pve-devel] applied: [pbs-devel] " Dietmar Maurer
2020-11-24 9:09 ` Dominik Csapak [this message]
2020-11-24 9:09 ` [pve-devel] [PATCH storage v2 2/4] api2/storage/content: change to volume_size_info and add return properties Dominik Csapak
2020-11-24 9:09 ` [pve-devel] [PATCH storage v2 3/4] Storage/Plugin: add get/update_volume_comment and implement for dir Dominik Csapak
2020-11-24 9:09 ` [pve-devel] [PATCH storage v2 4/4] Storage/PBSPlugin: implement get/update_volume_notes for pbs Dominik Csapak
2020-11-24 9:09 ` [pve-devel] [PATCH manager v2 1/3] ui: change comment column to notes Dominik Csapak
2020-11-24 9:09 ` [pve-devel] [PATCH manager v2 2/3] ui: add ability to show and edit comments for backups Dominik Csapak
2020-11-24 9:09 ` [pve-devel] [PATCH manager v2 3/3] ui: enable notesedit for pbs Dominik Csapak
2021-03-25 8:22 ` [pve-devel] applied: " Thomas Lamprecht
2020-11-24 13:11 ` [pve-devel] applied-partially: [PATCH proxmox-backup/pve-storage/pve-manager v2] show/edit backup comments Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201124090936.21810-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox