proxmox-backup/src/api2/node.rs
Dominik Csapak 431cc7b185 rrd: move creation of serde value into api
there is now a 'extract_cached_data' which just returns
the data of the specified field, and an api function that converts
a list of fields to the correct serde value

this way we do not have to create a serde value in rrd/cache.rs
(makes for a better interface)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-10 13:31:14 +02:00

31 lines
693 B
Rust

use proxmox::api::router::{Router, SubdirMap};
use proxmox::list_subdirs_api_method;
pub mod tasks;
mod time;
pub mod network;
pub mod dns;
mod syslog;
mod journal;
mod services;
mod status;
pub(crate) mod rrd;
pub mod disks;
pub const SUBDIRS: SubdirMap = &[
("disks", &disks::ROUTER),
("dns", &dns::ROUTER),
("journal", &journal::ROUTER),
("network", &network::ROUTER),
("rrd", &rrd::ROUTER),
("services", &services::ROUTER),
("status", &status::ROUTER),
("syslog", &syslog::ROUTER),
("tasks", &tasks::ROUTER),
("time", &time::ROUTER),
];
pub const ROUTER: Router = Router::new()
.get(&list_subdirs_api_method!(SUBDIRS))
.subdirs(SUBDIRS);