api-types: add namespace to BackupGroup
Make it easier by adding an helper accepting either group or directory 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
42103c467d
commit
8c74349b08
@ -2,7 +2,7 @@ use std::io::Write;
|
||||
|
||||
use anyhow::Error;
|
||||
|
||||
use pbs_api_types::{Authid, BackupType};
|
||||
use pbs_api_types::{Authid, BackupNamespace, BackupType};
|
||||
use pbs_client::{BackupReader, HttpClient, HttpClientOptions};
|
||||
|
||||
pub struct DummyWriter {
|
||||
@ -37,9 +37,13 @@ async fn run() -> Result<(), Error> {
|
||||
client,
|
||||
None,
|
||||
"store2",
|
||||
BackupType::Host,
|
||||
"elsa",
|
||||
backup_time,
|
||||
&(
|
||||
BackupNamespace::root(),
|
||||
BackupType::Host,
|
||||
"elsa".to_string(),
|
||||
backup_time,
|
||||
)
|
||||
.into(),
|
||||
true,
|
||||
)
|
||||
.await?;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use anyhow::Error;
|
||||
|
||||
use pbs_api_types::{Authid, BackupType};
|
||||
use pbs_api_types::{Authid, BackupNamespace, BackupType};
|
||||
use pbs_client::{BackupWriter, HttpClient, HttpClientOptions};
|
||||
|
||||
async fn upload_speed() -> Result<f64, Error> {
|
||||
@ -21,9 +21,13 @@ async fn upload_speed() -> Result<f64, Error> {
|
||||
client,
|
||||
None,
|
||||
datastore,
|
||||
BackupType::Host,
|
||||
"speedtest",
|
||||
backup_time,
|
||||
&(
|
||||
BackupNamespace::root(),
|
||||
BackupType::Host,
|
||||
"speedtest".to_string(),
|
||||
backup_time,
|
||||
)
|
||||
.into(),
|
||||
false,
|
||||
true,
|
||||
)
|
||||
|
Reference in New Issue
Block a user