datastore: move list_backup_groups into Datastore impl

Having that as static method in BackupInfo makes zero sense and just
complicates call sites, which need to extract the base_path from the
store manually upfront.

Mark old fn as deprecated so that we can do the move in a separate
step.

It's also planned to add an Iterator impl for this to allow more
efficient usage in the future.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-04-15 09:03:13 +02:00
parent bdfa637058
commit c90dbb5c7b
2 changed files with 34 additions and 1 deletions

View File

@ -369,6 +369,7 @@ impl BackupInfo {
Ok(files)
}
#[deprecated = "move to datastore"]
pub fn list_backup_groups(base_path: &Path) -> Result<Vec<BackupGroup>, Error> {
let mut list = Vec::new();