remove proxmox-rrd-api-types crate, s/RRDTimeFrameResolution/RRDTimeFrame/

Because the types used inside the RRD have other requirements
than the API types:

- other serialization format
- the API may not support all RRD features

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dietmar Maurer authored and Thomas Lamprecht committed 2021-10-13 13:36:02 +02:00
1 parent 426dda0730
commit c68fa58a59
11 files changed
+47 -67

No files matched your search

+29 -1
View File
@@ -424,4 +424,32 @@ pub const NODE_TASKS_LIST_TASKS_RETURN_TYPE: ReturnType = ReturnType {
).schema(),
};
pub use proxmox_rrd_api_types::{RRDMode, RRDTimeFrameResolution};
#[api()]
#[derive(Copy, Clone, Serialize, Deserialize)]
#[serde(rename_all = "UPPERCASE")]
/// RRD consolidation mode
pub enum RRDMode {
/// Maximum
Max,
/// Average
Average,
}
#[api()]
#[derive(Copy, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// RRD time frame
pub enum RRDTimeFrame {
/// Hour
Hour,
/// Day
Day,
/// Week
Week,
/// Month
Month,
/// Year
Year,
/// Decade (10 years)
Decade,
}