From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Markus Frank <m.frank@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v13 08/12] api: add resource map api endpoints for directories
Date: Wed, 19 Feb 2025 15:14:59 +0100 [thread overview]
Message-ID: <3ad05689-153f-4976-9eac-83bc2886abdb@proxmox.com> (raw)
In-Reply-To: <20250122100901.74830-9-m.frank@proxmox.com>
Am 22.01.25 um 11:08 schrieb Markus Frank:
> Signed-off-by: Markus Frank <m.frank@proxmox.com>
Some minor nits, but otherwise:
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
> diff --git a/PVE/API2/Cluster/Mapping/Dir.pm b/PVE/API2/Cluster/Mapping/Dir.pm
> new file mode 100644
> index 00000000..5218241f
> --- /dev/null
> +++ b/PVE/API2/Cluster/Mapping/Dir.pm
> @@ -0,0 +1,307 @@
> +package PVE::API2::Cluster::Mapping::Dir;
> +
> +use strict;
> +use warnings;
> +
> +use Storable qw(dclone);
> +
> +use PVE::INotify;
> +use PVE::JSONSchema qw(get_standard_option parse_property_string);
Nit: parse_property_string is not used.
> +use PVE::Mapping::Dir ();
> +use PVE::RPCEnvironment;
Missing
use PVE::SectionConfig;
because of PVE::SectionConfig::delete_from_config() below
> +use PVE::Tools qw(extract_param);
> +
> +use base qw(PVE::RESTHandler);
> +
> +__PACKAGE__->register_method ({
> + name => 'index',
> + path => '',
> + method => 'GET',
> + # only proxy if we give the 'check-node' parameter
> + proxyto_callback => sub {
> + my ($rpcenv, $proxyto, $param) = @_;
> + return $param->{'check-node'} // 'localhost';
> + },
> + description => "List directory mapping",
> + permissions => {
> + description => "Only lists entries where you have 'Mapping.Modify', 'Mapping.Use' or".
> + " 'Mapping.Audit' permissions on '/mapping/dir/<id>'.",
I know these are copied, but while we're at it:
Style nit: dot should be on this line
https://pve.proxmox.com/wiki/Perl_Style_Guide#Wrapping_Strings
> + user => 'all',
> + },
> + parameters => {
> + additionalProperties => 0,
> + properties => {
> + 'check-node' => get_standard_option('pve-node', {
> + description => "If given, checks the configurations on the given node for ".
> + "correctness, and adds relevant diagnostics for the directory to the response.",
Style nit: dot and space should be on this line
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-02-19 14:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 10:08 [pve-devel] [PATCH cluster/guest-common/docs/qemu-server/manager v13 0/12] virtiofs Markus Frank
2025-01-22 10:08 ` [pve-devel] [PATCH cluster v13 1/12] add mapping/dir.cfg for resource mapping Markus Frank
2025-01-22 10:08 ` [pve-devel] [PATCH guest-common v13 2/12] add dir mapping section config Markus Frank
2025-02-18 12:35 ` Fiona Ebner
2025-02-19 10:06 ` Fiona Ebner
2025-02-19 17:00 ` Thomas Lamprecht
2025-01-22 10:08 ` [pve-devel] [PATCH docs v13 3/12] add doc section for the shared filesystem virtio-fs Markus Frank
2025-02-19 11:49 ` Fiona Ebner
2025-01-22 10:08 ` [pve-devel] [PATCH qemu-server v13 4/12] control: add virtiofsd as runtime dependency for qemu-server Markus Frank
2025-02-19 11:51 ` Fiona Ebner
2025-01-22 10:08 ` [pve-devel] [PATCH qemu-server v13 5/12] fix #1027: virtio-fs support Markus Frank
2025-02-19 13:43 ` Fiona Ebner
2025-01-22 10:08 ` [pve-devel] [PATCH qemu-server v13 6/12] migration: check_local_resources for virtiofs Markus Frank
2025-02-19 13:56 ` Fiona Ebner
2025-01-22 10:08 ` [pve-devel] [PATCH qemu-server v13 7/12] disable snapshot (with RAM) and hibernate with virtio-fs devices Markus Frank
2025-02-19 13:58 ` Fiona Ebner
2025-01-22 10:08 ` [pve-devel] [PATCH manager v13 08/12] api: add resource map api endpoints for directories Markus Frank
2025-02-19 14:14 ` Fiona Ebner [this message]
2025-01-22 10:08 ` [pve-devel] [PATCH manager v13 09/12] ui: add edit window for dir mappings Markus Frank
2025-01-22 10:08 ` [pve-devel] [PATCH manager v13 10/12] ui: add resource mapping view for directories Markus Frank
2025-02-18 14:29 ` Fiona Ebner
2025-01-22 10:09 ` [pve-devel] [PATCH manager v13 11/12] ui: form: add selector for directory mappings Markus Frank
2025-01-22 10:09 ` [pve-devel] [PATCH manager v13 12/12] ui: add options to add virtio-fs to qemu config Markus Frank
2025-02-19 14:17 ` Fiona Ebner
2025-02-19 14:19 ` [pve-devel] [PATCH cluster/guest-common/docs/qemu-server/manager v13 0/12] virtiofs Fiona Ebner
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=3ad05689-153f-4976-9eac-83bc2886abdb@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=m.frank@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.