api-types: introduce BackupType enum and Group/Dir api types
The type is a real enum. All are API types and implement Display and FromStr. The ordering is the same as it is in pbs-datastore. Also, they are now flattened into a few structs instead of being copied manually. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
33eb23d57e
commit
988d575dbb
@ -441,7 +441,7 @@ pub fn list_content(
|
||||
for (store, snapshot) in media_catalog_snapshot_list(status_path, &media_id)? {
|
||||
let backup_dir: BackupDir = snapshot.parse()?;
|
||||
|
||||
if let Some(ref backup_type) = filter.backup_type {
|
||||
if let Some(backup_type) = filter.backup_type {
|
||||
if backup_dir.group().backup_type() != backup_type {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user