]> git.proxmox.com Git - proxmox-backup.git/commit - src/server/pull.rs
split the namespace out of BackupGroup/Dir api types
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 9 May 2022 13:39:29 +0000 (15:39 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 12 May 2022 07:33:50 +0000 (09:33 +0200)
commit133d718fe4624c7384497ff2d1e4d629fd63d3eb
treef68577483a0053159f65bfa35e46bfdc97a7dfd7
parent1baf9030adbe03cab75245b79d37ed7c6becaccc
split the namespace out of BackupGroup/Dir api types

We decided to go this route because it'll most likely be
safer in the API as we need to explicitly add namespaces
support to the various API endpoints this way.

For example, 'pull' should have 2 namespaces: local and
remote, and the GroupFilter (which would otherwise contain
exactly *one* namespace parameter) needs to be applied for
both sides (to decide what to pull from the remote, and what
to *remove* locally as cleanup).

The *datastore* types still contain the namespace and have a
`.backup_ns()` getter.

Note that the datastore's `Display` implementations are no
longer safe to use as a deserializable string.

Additionally, some datastore based methods now have been
exposed via the BackupGroup/BackupDir types to avoid a
"round trip" in code.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
25 files changed:
examples/download-speed.rs
examples/upload-speed.rs
pbs-api-types/src/datastore.rs
pbs-api-types/src/lib.rs
pbs-client/src/backup_reader.rs
pbs-client/src/backup_writer.rs
pbs-client/src/tools/mod.rs
pbs-datastore/src/backup_info.rs
pbs-datastore/src/datastore.rs
pbs-datastore/src/snapshot_reader.rs
proxmox-backup-client/src/benchmark.rs
proxmox-backup-client/src/catalog.rs
proxmox-backup-client/src/main.rs
proxmox-backup-client/src/mount.rs
proxmox-backup-client/src/snapshot.rs
proxmox-file-restore/src/main.rs
src/api2/admin/datastore.rs
src/api2/backup/environment.rs
src/api2/backup/mod.rs
src/api2/reader/mod.rs
src/api2/tape/backup.rs
src/api2/tape/restore.rs
src/backup/verify.rs
src/server/prune_job.rs
src/server/pull.rs