From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 1/1] api: import working storage: improve error message
Date: Tue, 19 Nov 2024 09:39:56 +0100 [thread overview]
Message-ID: <20241119083958.513287-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20241119083958.513287-1-d.csapak@proxmox.com>
the ui and api talks about 'import working storage' but the error here
still said 'for extraction'. Improve the message by unifiying the
wording and adding the storage name to it too.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
PVE/API2/Qemu.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 01ad167a..53ff7092 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -178,14 +178,15 @@ my $check_storage_access = sub {
? PVE::Storage::storage_config($storecfg, $extraction_storage)
: $scfg;
my $extraction_param = defined($extraction_storage) ? 'import-working-storage' : $ds;
+ my $extraction_id = $extraction_storage // $storeid;
if (!$extraction_scfg->{content}->{images} || !$extraction_scfg->{path}) {
raise_param_exc({
- $extraction_param => "storage selected for extraction does not support"
+ $extraction_param => "import working storage '$extraction_id' does not support"
." 'images' content type or is not file based.",
});
}
- $rpcenv->check($authuser, "/storage/" . ($extraction_storage // $storeid), ['Datastore.AllocateSpace']);
+ $rpcenv->check($authuser, "/storage/$extraction_id", ['Datastore.AllocateSpace']);
}
}
--
2.39.5
_______________________________________________
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:[~2024-11-19 8:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 8:39 [pve-devel] [PATCH docs/qemu-server/manager] improving docs & consistency for ova/ovf import Dominik Csapak
2024-11-19 8:39 ` [pve-devel] [PATCH docs 1/1] qm: adapt import section to newly added OVA/OVF import Dominik Csapak
2024-11-19 8:39 ` Dominik Csapak [this message]
2024-11-19 8:39 ` [pve-devel] [PATCH manager 1/2] ui: import: add onlineHelp reference Dominik Csapak
2024-11-19 8:39 ` [pve-devel] [PATCH manager 2/2] ui: import: clarify working storage emptyText Dominik Csapak
2024-11-19 16:00 ` [pve-devel] applied-series: [PATCH docs/qemu-server/manager] improving docs & consistency for ova/ovf import 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=20241119083958.513287-3-d.csapak@proxmox.com \
--to=d.csapak@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