make datastore BackupGroup/Dir ctors private

And use the api-types for their contents.

These are supposed to be instances for a datastore, the pure
specifications are the ones in pbs_api_types which should be
preferred in crates like clients which do not need to deal
with the datastore directly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2022-04-19 10:38:46 +02:00
parent 38aa71fcc8
commit db87d93efc
24 changed files with 440 additions and 408 deletions

View File

@ -8,7 +8,6 @@ use std::path::{Path, PathBuf};
use anyhow::{bail, format_err, Error};
use endian_trait::Endian;
use pbs_datastore::backup_info::BackupDir;
use proxmox_sys::fs::read_subdir;
use proxmox_io::{ReadExt, WriteExt};
@ -682,7 +681,7 @@ impl MediaCatalog {
);
}
if let Err(err) = snapshot.parse::<BackupDir>() {
if let Err(err) = snapshot.parse::<pbs_api_types::BackupDir>() {
bail!(
"register_snapshot failed: unable to parse snapshot '{}' - {}",
snapshot,