move disks api to /node/<node>/disks
This commit is contained in:
parent
7fa2779559
commit
ce8e3de401
|
@ -8,7 +8,6 @@ mod subscription;
|
|||
pub mod types;
|
||||
pub mod version;
|
||||
pub mod pull;
|
||||
pub mod disks;
|
||||
|
||||
use proxmox::api::router::SubdirMap;
|
||||
use proxmox::api::Router;
|
||||
|
@ -21,7 +20,6 @@ pub const SUBDIRS: SubdirMap = &[
|
|||
("admin", &admin::ROUTER),
|
||||
("backup", &backup::ROUTER),
|
||||
("config", &config::ROUTER),
|
||||
("disks", &disks::ROUTER),
|
||||
("nodes", &NODES_ROUTER),
|
||||
("pull", &pull::ROUTER),
|
||||
("reader", &reader::ROUTER),
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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,
|
Loading…
Reference in New Issue