public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] api types: add missing conf to blob archive name mapping
Date: Tue, 26 Nov 2024 13:24:19 +0100	[thread overview]
Message-ID: <20241126122419.235890-1-c.ebner@proxmox.com> (raw)

Commit addfae26 ("api types: introduce `BackupArchiveName` type")
introduced a dedicated archive name api type to add rust type
checking and bundle helpers to the api type. Since this, the backup
archive name to server archive name mapping is handled by its parser.

This however did not cover the `.conf` extension used for VM config
files. Add the missing `.conf` to `.conf.blob` to the match statement
and the test cases.

Fixes: addfae26 ("api types: introduce `BackupArchiveName` type")
Reported-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 pbs-api-types/src/datastore.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index 4927f3724..688b7dd03 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -1833,6 +1833,7 @@ impl BackupArchiveName {
             Some("ppxar") => ArchiveType::DynamicIndex,
             Some("pcat1") => ArchiveType::DynamicIndex,
             Some("img") => ArchiveType::FixedIndex,
+            Some("conf") => ArchiveType::Blob,
             Some("json") => ArchiveType::Blob,
             Some("key") => ArchiveType::Blob,
             Some("log") => ArchiveType::Blob,
@@ -1910,6 +1911,8 @@ mod tests {
             "/valid/rsa-encrypted.key.blob",
             "/valid/archive-name.log",
             "/valid/archive-name.log.blob",
+            "/valid/qemu-server.conf",
+            "/valid/qemu-server.conf.blob",
         ];
 
         for archive_name in valid_archive_names {
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


             reply	other threads:[~2024-11-26 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 12:24 Christian Ebner [this message]
2024-11-26 12:32 ` [pbs-devel] applied: " Fabian Grünbichler
2024-11-26 12:35 ` [pbs-devel] " Thomas Lamprecht
2024-11-26 12:41   ` Fabian Grünbichler
2024-11-26 12:48   ` Christian Ebner
2024-11-26 12:52     ` 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=20241126122419.235890-1-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal