api: list tape backup jobs with scheduling status
This commit is contained in:
1 parent
1860208560
commit
7690a8e7bd
2 files changed
+73
-3
No files matched your search
@@ -22,6 +22,7 @@ use crate::api2::types::{
|
||||
MEDIA_POOL_NAME_SCHEMA,
|
||||
SINGLE_LINE_COMMENT_SCHEMA,
|
||||
SYNC_SCHEDULE_SCHEMA,
|
||||
JobScheduleStatus,
|
||||
};
|
||||
|
||||
lazy_static! {
|
||||
@@ -81,6 +82,26 @@ pub struct TapeBackupJobConfig {
|
||||
pub schedule: Option<String>,
|
||||
}
|
||||
|
||||
#[api(
|
||||
properties: {
|
||||
config: {
|
||||
type: TapeBackupJobConfig,
|
||||
},
|
||||
status: {
|
||||
type: JobScheduleStatus,
|
||||
},
|
||||
},
|
||||
)]
|
||||
#[serde(rename_all="kebab-case")]
|
||||
#[derive(Serialize,Deserialize)]
|
||||
/// Status of Tape Backup Job
|
||||
pub struct TapeBackupJobStatus {
|
||||
#[serde(flatten)]
|
||||
pub config: TapeBackupJobConfig,
|
||||
#[serde(flatten)]
|
||||
pub status: JobScheduleStatus,
|
||||
}
|
||||
|
||||
fn init() -> SectionConfig {
|
||||
let obj_schema = match TapeBackupJobConfig::API_SCHEMA {
|
||||
Schema::Object(ref obj_schema) => obj_schema,
|
||||
|
||||
Reference in new issue
Block a user