src/api2/types.rs: define BLOCKDEVICE_NAME_SCHEMA

This commit is contained in:
Dietmar Maurer
2020-06-07 07:15:15 +02:00
parent fa2bdc1309
commit 9069debcd8
4 changed files with 16 additions and 9 deletions

View File

@ -11,7 +11,7 @@ use crate::tools::disks::{
get_disks, get_smart_data,
};
use crate::api2::types::NODE_SCHEMA;
use crate::api2::types::{NODE_SCHEMA, BLOCKDEVICE_NAME_SCHEMA};
#[api(
protected: true,
@ -72,8 +72,7 @@ pub fn list_disks(
schema: NODE_SCHEMA,
},
disk: {
description: "Block device name.",
type: String,
schema: BLOCKDEVICE_NAME_SCHEMA,
},
healthonly: {
description: "If true returns only the health status.",