move disks api to /node/<node>/disks

This commit is contained in:
Dietmar Maurer
2020-06-06 14:43:36 +02:00
parent 7fa2779559
commit ce8e3de401
3 changed files with 10 additions and 2 deletions

View File

@ -10,8 +10,10 @@ mod journal;
mod services;
mod status;
mod rrd;
pub mod disks;
pub const SUBDIRS: SubdirMap = &[
("disks", &disks::ROUTER),
("dns", &dns::ROUTER),
("journal", &journal::ROUTER),
("network", &network::ROUTER),

View File

@ -11,10 +11,15 @@ use crate::tools::disks::{
get_disks, get_smart_data,
};
use crate::api2::types::NODE_SCHEMA;
#[api(
protected: true,
input: {
properties: {
node: {
schema: NODE_SCHEMA,
},
skipsmart: {
description: "Skip smart checks.",
type: bool,
@ -63,6 +68,9 @@ pub fn list_disks(
protected: true,
input: {
properties: {
node: {
schema: NODE_SCHEMA,
},
disk: {
description: "Block device name.",
type: String,