From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4A1BC7763F for ; Tue, 20 Jul 2021 21:15:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3F12ED831 for ; Tue, 20 Jul 2021 21:15:58 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 8E92AD820 for ; Tue, 20 Jul 2021 21:15:56 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5AD0A423EF for ; Tue, 20 Jul 2021 21:15:56 +0200 (CEST) Message-ID: Date: Tue, 20 Jul 2021 21:15:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0 Content-Language: en-US From: Thomas Lamprecht To: Proxmox VE development discussion , Lorenz Stechauner Reply-To: Proxmox VE development discussion References: <20210720115147.1988565-1-l.stechauner@proxmox.com> <20210720115147.1988565-4-l.stechauner@proxmox.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.417 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [status.pm, proxmox.com] Subject: Re: [pve-devel] [PATCH storage 2/3] status: add new-filename to upload X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2021 19:15:58 -0000 On 20.07.21 15:27, Thomas Lamprecht wrote: > On 20.07.21 13:51, Lorenz Stechauner wrote: >> Signed-off-by: Lorenz Stechauner >> --- >> PVE/API2/Storage/Status.pm | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm >> index b549d7d..eac5e13 100644 >> --- a/PVE/API2/Storage/Status.pm >> +++ b/PVE/API2/Storage/Status.pm >> @@ -378,9 +378,15 @@ __PACKAGE__->register_method ({ >> content => { >> description => "Content type.", >> type => 'string', format => 'pve-storage-content', >> + enum => ['iso', 'vztmpl'], > > unrelated change? That could be send as its own patch, does not even needs to be a > part of this series. > >> }, >> filename => { >> - description => "The name of the file to create.", >> + description => "The original name of the file.", >> + type => 'string', >> + }, >> + 'new-filename' => { >> + description => "The name of the file to create. Caution: This will be normalized!", >> + maxLength => 255, > > new non optional API parameter would be an ABI break, 7.0 is released, that won't > fly anymore for ~1.9 years ;-) > > Rather, make it optional and fallback to the filename (or whatever makes it > actually backward compatible). Intially I just saw the new non-optional param and ABI break was enough to comment that, but after I took another glance here the new param seems rather bogus in general? So, what's it actual use? Why is the existing `filename` one not enough? It'd be good if such things would be stated in the commit message already.. > >> type => 'string', >> }, >> tmpfilename => { >> @@ -414,7 +420,7 @@ __PACKAGE__->register_method ({ >> my $size = -s $tmpfilename; >> die "temporary file '$tmpfilename' does not exist\n" if !defined($size); >> >> - my $filename = PVE::Storage::normalize_content_filename($param->{filename}); >> + my $filename = PVE::Storage::normalize_content_filename($param->{'new-filename'}); >> >> my $path; >> >> > > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > >