mirror of
https://git.proxmox.com/git/proxmox
synced 2025-07-26 05:17:40 +00:00
rename pbs-systemd to proxmox-systemd
This commit is contained in:
parent
1eb2dd5dac
commit
3d428713c5
@ -16,5 +16,5 @@ serde = { version = "1.0", features = ["derive"] }
|
|||||||
|
|
||||||
proxmox = { version = "0.13.3", default-features = false, features = [ "api-macro" ] }
|
proxmox = { version = "0.13.3", default-features = false, features = [ "api-macro" ] }
|
||||||
|
|
||||||
pbs-systemd = { path = "../pbs-systemd" }
|
proxmox-systemd = { path = "../proxmox-systemd" }
|
||||||
pbs-tools = { path = "../pbs-tools" }
|
pbs-tools = { path = "../pbs-tools" }
|
||||||
|
@ -25,25 +25,25 @@ pub const JOB_ID_SCHEMA: Schema = StringSchema::new("Job ID.")
|
|||||||
|
|
||||||
pub const SYNC_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
pub const SYNC_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
||||||
"Run sync job at specified schedule.")
|
"Run sync job at specified schedule.")
|
||||||
.format(&ApiStringFormat::VerifyFn(pbs_systemd::time::verify_calendar_event))
|
.format(&ApiStringFormat::VerifyFn(proxmox_systemd::time::verify_calendar_event))
|
||||||
.type_text("<calendar-event>")
|
.type_text("<calendar-event>")
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
pub const GC_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
pub const GC_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
||||||
"Run garbage collection job at specified schedule.")
|
"Run garbage collection job at specified schedule.")
|
||||||
.format(&ApiStringFormat::VerifyFn(pbs_systemd::time::verify_calendar_event))
|
.format(&ApiStringFormat::VerifyFn(proxmox_systemd::time::verify_calendar_event))
|
||||||
.type_text("<calendar-event>")
|
.type_text("<calendar-event>")
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
pub const PRUNE_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
pub const PRUNE_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
||||||
"Run prune job at specified schedule.")
|
"Run prune job at specified schedule.")
|
||||||
.format(&ApiStringFormat::VerifyFn(pbs_systemd::time::verify_calendar_event))
|
.format(&ApiStringFormat::VerifyFn(proxmox_systemd::time::verify_calendar_event))
|
||||||
.type_text("<calendar-event>")
|
.type_text("<calendar-event>")
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
pub const VERIFICATION_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
pub const VERIFICATION_SCHEDULE_SCHEMA: Schema = StringSchema::new(
|
||||||
"Run verify job at specified schedule.")
|
"Run verify job at specified schedule.")
|
||||||
.format(&ApiStringFormat::VerifyFn(pbs_systemd::time::verify_calendar_event))
|
.format(&ApiStringFormat::VerifyFn(proxmox_systemd::time::verify_calendar_event))
|
||||||
.type_text("<calendar-event>")
|
.type_text("<calendar-event>")
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ use proxmox::api::{
|
|||||||
schema::{Schema, StringSchema, ApiStringFormat, Updater},
|
schema::{Schema, StringSchema, ApiStringFormat, Updater},
|
||||||
};
|
};
|
||||||
|
|
||||||
use pbs_systemd::time::{parse_calendar_event, parse_time_span, CalendarEvent, TimeSpan};
|
use proxmox_systemd::time::{parse_calendar_event, parse_time_span, CalendarEvent, TimeSpan};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
PROXMOX_SAFE_ID_FORMAT,
|
PROXMOX_SAFE_ID_FORMAT,
|
||||||
|
@ -109,7 +109,7 @@ impl std::str::FromStr for UPID {
|
|||||||
let worker_id = if cap["wid"].is_empty() {
|
let worker_id = if cap["wid"].is_empty() {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
let wid = pbs_systemd::unescape_unit(&cap["wid"])?;
|
let wid = proxmox_systemd::unescape_unit(&cap["wid"])?;
|
||||||
Some(wid)
|
Some(wid)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ impl std::fmt::Display for UPID {
|
|||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
|
|
||||||
let wid = if let Some(ref id) = self.worker_id {
|
let wid = if let Some(ref id) = self.worker_id {
|
||||||
pbs_systemd::escape_unit(id, false)
|
proxmox_systemd::escape_unit(id, false)
|
||||||
} else {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user