5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-02-26 21:57:33 +03:00

api types: drop unused config type helpers for sync direction

Jobs for both sync directions are now stored using the same `sync`
config section type, so drop the outdated helpers.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Christian Ebner 2024-11-25 18:40:12 +01:00 committed by Thomas Lamprecht
parent e066bd7207
commit e9dfb83131

View File

@ -519,23 +519,6 @@ impl std::fmt::Display for SyncDirection {
}
}
impl SyncDirection {
pub fn as_config_type_str(&self) -> &'static str {
match self {
SyncDirection::Pull => "sync",
SyncDirection::Push => "sync-push",
}
}
pub fn from_config_type_str(config_type: &str) -> Result<Self, anyhow::Error> {
match config_type {
"sync" => Ok(SyncDirection::Pull),
"sync-push" => Ok(SyncDirection::Push),
_ => bail!("invalid config type for sync job"),
}
}
}
pub const RESYNC_CORRUPT_SCHEMA: Schema =
BooleanSchema::new("If the verification failed for a local snapshot, try to pull it again.")
.schema();