datastore: add backup_ns accessor
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8c74349b08
commit
11ffd737e3
|
@ -7,7 +7,9 @@ use anyhow::{bail, format_err, Error};
|
||||||
|
|
||||||
use proxmox_sys::fs::lock_dir_noblock;
|
use proxmox_sys::fs::lock_dir_noblock;
|
||||||
|
|
||||||
use pbs_api_types::{BackupType, GroupFilter, BACKUP_DATE_REGEX, BACKUP_FILE_REGEX};
|
use pbs_api_types::{
|
||||||
|
BackupNamespace, BackupType, GroupFilter, BACKUP_DATE_REGEX, BACKUP_FILE_REGEX,
|
||||||
|
};
|
||||||
use pbs_config::{open_backup_lockfile, BackupLockGuard};
|
use pbs_config::{open_backup_lockfile, BackupLockGuard};
|
||||||
|
|
||||||
use crate::manifest::{MANIFEST_BLOB_NAME, MANIFEST_LOCK_NAME};
|
use crate::manifest::{MANIFEST_BLOB_NAME, MANIFEST_LOCK_NAME};
|
||||||
|
@ -41,10 +43,17 @@ impl BackupGroup {
|
||||||
&self.group
|
&self.group
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub fn backup_ns(&self) -> &BackupNamespace {
|
||||||
|
&self.group.ns
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn backup_type(&self) -> BackupType {
|
pub fn backup_type(&self) -> BackupType {
|
||||||
self.group.ty
|
self.group.ty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn backup_id(&self) -> &str {
|
pub fn backup_id(&self) -> &str {
|
||||||
&self.group.id
|
&self.group.id
|
||||||
}
|
}
|
||||||
|
@ -295,6 +304,11 @@ impl BackupDir {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub fn backup_ns(&self) -> &BackupNamespace {
|
||||||
|
&self.dir.group.ns
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn backup_type(&self) -> BackupType {
|
pub fn backup_type(&self) -> BackupType {
|
||||||
self.dir.group.ty
|
self.dir.group.ty
|
||||||
|
|
Loading…
Reference in New Issue