public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 0/4] introduce dedcated archive name api type
@ 2024-07-04  8:55 Christian Ebner
  2024-07-04  8:55 ` [pbs-devel] [PATCH proxmox-backup 1/4] datastore: move `ArchiveType` to PBS api types crate Christian Ebner
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Christian Ebner @ 2024-07-04  8:55 UTC (permalink / raw)
  To: pbs-devel

There is currently no dedicated api type for the archive names, given
as input parameters to several methods.
This patches introduce a dedicated type for archive names, in order
to collect the code for checks and eventual mappings into one
location and reduce possible unintentional misuse by passing
incorrect argument values to the functions and methods consuming
the archive names.

As a positive side effect, the mapping now allows also for the server
archive type extensions to be optionally passed as input to several
commands, e.g.
```
proxmox-backup-client restore <snapshot> <name>.pxar.didx <target>
```
is now valid, being equal to
```
proxmox-backup-client restore <snapshot> <name.pxar <target>
```

Note that this patch series currently depends on this patch being
applied beforehand:
https://lists.proxmox.com/pipermail/pbs-devel/2024-July/010059.html

Christian Ebner (4):
  datastore: move `ArchiveType` to PBS api types crate
  api types: introduce `BackupArchiveName` type
  client/server: use dedicated api type for all archive names
  client: drop unused parse_archive_type helper

 pbs-api-types/src/datastore.rs       | 123 +++++++++++++++++++++++++-
 pbs-client/src/backup_reader.rs      |  14 +--
 pbs-client/src/backup_writer.rs      |  24 ++---
 pbs-client/src/tools/mod.rs          |  24 +++--
 pbs-datastore/src/datastore.rs       |   6 +-
 pbs-datastore/src/manifest.rs        |  50 +++++------
 pbs-datastore/src/snapshot_reader.rs |   4 +-
 proxmox-backup-client/src/catalog.rs |  25 +++---
 proxmox-backup-client/src/helper.rs  |   7 +-
 proxmox-backup-client/src/main.rs    | 126 +++++++++++++++------------
 proxmox-backup-client/src/mount.rs   |  33 +++----
 proxmox-file-restore/src/main.rs     |  20 +++--
 src/api2/admin/datastore.rs          |  60 ++++++-------
 src/api2/backup/mod.rs               |   3 +-
 src/api2/reader/mod.rs               |   7 +-
 src/api2/tape/restore.rs             |  10 +--
 src/backup/verify.rs                 |   7 +-
 src/bin/proxmox_backup_debug/diff.rs |  16 ++--
 src/server/pull.rs                   |  20 ++---
 19 files changed, 351 insertions(+), 228 deletions(-)

-- 
2.39.2



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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-07-10  7:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-04  8:55 [pbs-devel] [PATCH proxmox-backup 0/4] introduce dedcated archive name api type Christian Ebner
2024-07-04  8:55 ` [pbs-devel] [PATCH proxmox-backup 1/4] datastore: move `ArchiveType` to PBS api types crate Christian Ebner
2024-07-04  8:55 ` [pbs-devel] [PATCH proxmox-backup 2/4] api types: introduce `BackupArchiveName` type Christian Ebner
2024-07-09  9:37   ` Gabriel Goller
2024-07-09 12:09     ` Christian Ebner
2024-07-04  8:55 ` [pbs-devel] [PATCH proxmox-backup 3/4] client/server: use dedicated api type for all archive names Christian Ebner
2024-07-04  8:55 ` [pbs-devel] [PATCH proxmox-backup 4/4] client: drop unused parse_archive_type helper Christian Ebner
2024-07-10  7:51 ` [pbs-devel] [PATCH proxmox-backup 0/4] introduce dedcated archive name api type Christian Ebner

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