document verify job structs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
5428f5ca29
commit
c4a45ec744
@ -52,15 +52,21 @@ lazy_static! {
|
|||||||
#[derive(Serialize,Deserialize)]
|
#[derive(Serialize,Deserialize)]
|
||||||
/// Verification Job
|
/// Verification Job
|
||||||
pub struct VerificationJobConfig {
|
pub struct VerificationJobConfig {
|
||||||
|
/// unique ID to address this job
|
||||||
pub id: String,
|
pub id: String,
|
||||||
|
/// the datastore ID this verificaiton job affects
|
||||||
pub store: String,
|
pub store: String,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// if not set to false, check the age of the last snapshot verification to filter
|
||||||
|
/// out recent ones, depending on 'outdated_after' configuration.
|
||||||
pub ignore_verified: Option<bool>,
|
pub ignore_verified: Option<bool>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// Reverify snapshots after X days, never if 0. Ignored if 'ignore_verified' is false.
|
||||||
pub outdated_after: Option<i64>,
|
pub outdated_after: Option<i64>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub comment: Option<String>,
|
pub comment: Option<String>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// when to schedule this job in calendar event notation
|
||||||
pub schedule: Option<String>,
|
pub schedule: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,23 +121,33 @@ pub struct VerificationJobConfig {
|
|||||||
#[derive(Serialize,Deserialize)]
|
#[derive(Serialize,Deserialize)]
|
||||||
/// Status of Verification Job
|
/// Status of Verification Job
|
||||||
pub struct VerificationJobStatus {
|
pub struct VerificationJobStatus {
|
||||||
|
/// unique ID to address this job
|
||||||
pub id: String,
|
pub id: String,
|
||||||
|
/// the datastore ID this verificaiton job affects
|
||||||
pub store: String,
|
pub store: String,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// if not set to false, check the age of the last snapshot verification to filter
|
||||||
|
/// out recent ones, depending on 'outdated_after' configuration.
|
||||||
pub ignore_verified: Option<bool>,
|
pub ignore_verified: Option<bool>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// Reverify snapshots after X days, never if 0. Ignored if 'ignore_verified' is false.
|
||||||
pub outdated_after: Option<i64>,
|
pub outdated_after: Option<i64>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub comment: Option<String>,
|
pub comment: Option<String>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// when to schedule this job in calendar event notation
|
||||||
pub schedule: Option<String>,
|
pub schedule: Option<String>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// The timestamp when this job runs the next time.
|
||||||
pub next_run: Option<i64>,
|
pub next_run: Option<i64>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// The state of the last scheduled run, if any
|
||||||
pub last_run_state: Option<String>,
|
pub last_run_state: Option<String>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// The task UPID of the last scheduled run, if any
|
||||||
pub last_run_upid: Option<String>,
|
pub last_run_upid: Option<String>,
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
/// When the last run was finished, combined with UPID.starttime one can calculate the duration
|
||||||
pub last_run_endtime: Option<i64>,
|
pub last_run_endtime: Option<i64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user