mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-02-05 21:57:43 +03:00
api: add some missing sorted macro calls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
5408e30ab1
commit
8721b42e2f
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use proxmox_router::list_subdirs_api_method;
|
use proxmox_router::list_subdirs_api_method;
|
||||||
use proxmox_router::{Router, SubdirMap};
|
use proxmox_router::{Router, SubdirMap};
|
||||||
|
use proxmox_sys::sortable;
|
||||||
|
|
||||||
pub mod datastore;
|
pub mod datastore;
|
||||||
pub mod namespace;
|
pub mod namespace;
|
||||||
@ -9,12 +10,13 @@ pub mod sync;
|
|||||||
pub mod traffic_control;
|
pub mod traffic_control;
|
||||||
pub mod verify;
|
pub mod verify;
|
||||||
|
|
||||||
const SUBDIRS: SubdirMap = &[
|
#[sortable]
|
||||||
|
const SUBDIRS: SubdirMap = &sorted!([
|
||||||
("datastore", &datastore::ROUTER),
|
("datastore", &datastore::ROUTER),
|
||||||
("sync", &sync::ROUTER),
|
("sync", &sync::ROUTER),
|
||||||
("traffic-control", &traffic_control::ROUTER),
|
("traffic-control", &traffic_control::ROUTER),
|
||||||
("verify", &verify::ROUTER),
|
("verify", &verify::ROUTER),
|
||||||
];
|
]);
|
||||||
|
|
||||||
pub const ROUTER: Router = Router::new()
|
pub const ROUTER: Router = Router::new()
|
||||||
.get(&list_subdirs_api_method!(SUBDIRS))
|
.get(&list_subdirs_api_method!(SUBDIRS))
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use proxmox_router::list_subdirs_api_method;
|
use proxmox_router::list_subdirs_api_method;
|
||||||
use proxmox_router::{Router, SubdirMap};
|
use proxmox_router::{Router, SubdirMap};
|
||||||
|
use proxmox_sys::sortable;
|
||||||
|
|
||||||
pub mod access;
|
pub mod access;
|
||||||
pub mod acme;
|
pub mod acme;
|
||||||
@ -16,7 +17,8 @@ pub mod tape_encryption_keys;
|
|||||||
pub mod traffic_control;
|
pub mod traffic_control;
|
||||||
pub mod verify;
|
pub mod verify;
|
||||||
|
|
||||||
const SUBDIRS: SubdirMap = &[
|
#[sortable]
|
||||||
|
const SUBDIRS: SubdirMap = &sorted!([
|
||||||
("access", &access::ROUTER),
|
("access", &access::ROUTER),
|
||||||
("acme", &acme::ROUTER),
|
("acme", &acme::ROUTER),
|
||||||
("changer", &changer::ROUTER),
|
("changer", &changer::ROUTER),
|
||||||
@ -29,7 +31,7 @@ const SUBDIRS: SubdirMap = &[
|
|||||||
("tape-encryption-keys", &tape_encryption_keys::ROUTER),
|
("tape-encryption-keys", &tape_encryption_keys::ROUTER),
|
||||||
("traffic-control", &traffic_control::ROUTER),
|
("traffic-control", &traffic_control::ROUTER),
|
||||||
("verify", &verify::ROUTER),
|
("verify", &verify::ROUTER),
|
||||||
];
|
]);
|
||||||
|
|
||||||
pub const ROUTER: Router = Router::new()
|
pub const ROUTER: Router = Router::new()
|
||||||
.get(&list_subdirs_api_method!(SUBDIRS))
|
.get(&list_subdirs_api_method!(SUBDIRS))
|
||||||
|
@ -503,13 +503,13 @@ pub async fn scan_remote_groups(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[sortable]
|
#[sortable]
|
||||||
const DATASTORE_SCAN_SUBDIRS: SubdirMap = &[
|
const DATASTORE_SCAN_SUBDIRS: SubdirMap = &sorted!([
|
||||||
("groups", &Router::new().get(&API_METHOD_SCAN_REMOTE_GROUPS)),
|
("groups", &Router::new().get(&API_METHOD_SCAN_REMOTE_GROUPS)),
|
||||||
(
|
(
|
||||||
"namespaces",
|
"namespaces",
|
||||||
&Router::new().get(&API_METHOD_SCAN_REMOTE_NAMESPACES),
|
&Router::new().get(&API_METHOD_SCAN_REMOTE_NAMESPACES),
|
||||||
),
|
),
|
||||||
];
|
]);
|
||||||
|
|
||||||
const DATASTORE_SCAN_ROUTER: Router = Router::new()
|
const DATASTORE_SCAN_ROUTER: Router = Router::new()
|
||||||
.get(&list_subdirs_api_method!(DATASTORE_SCAN_SUBDIRS))
|
.get(&list_subdirs_api_method!(DATASTORE_SCAN_SUBDIRS))
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
//! The Proxmox Backup Server API
|
//! The Proxmox Backup Server API
|
||||||
|
|
||||||
|
use proxmox_sys::sortable;
|
||||||
|
|
||||||
pub mod access;
|
pub mod access;
|
||||||
pub mod admin;
|
pub mod admin;
|
||||||
pub mod backup;
|
pub mod backup;
|
||||||
@ -16,7 +18,8 @@ pub mod version;
|
|||||||
|
|
||||||
use proxmox_router::{list_subdirs_api_method, Router, SubdirMap};
|
use proxmox_router::{list_subdirs_api_method, Router, SubdirMap};
|
||||||
|
|
||||||
const SUBDIRS: SubdirMap = &[
|
#[sortable]
|
||||||
|
const SUBDIRS: SubdirMap = &sorted!([
|
||||||
("access", &access::ROUTER),
|
("access", &access::ROUTER),
|
||||||
("admin", &admin::ROUTER),
|
("admin", &admin::ROUTER),
|
||||||
("backup", &backup::ROUTER),
|
("backup", &backup::ROUTER),
|
||||||
@ -28,7 +31,7 @@ const SUBDIRS: SubdirMap = &[
|
|||||||
("status", &status::ROUTER),
|
("status", &status::ROUTER),
|
||||||
("tape", &tape::ROUTER),
|
("tape", &tape::ROUTER),
|
||||||
("version", &version::ROUTER),
|
("version", &version::ROUTER),
|
||||||
];
|
]);
|
||||||
|
|
||||||
pub const ROUTER: Router = Router::new()
|
pub const ROUTER: Router = Router::new()
|
||||||
.get(&list_subdirs_api_method!(SUBDIRS))
|
.get(&list_subdirs_api_method!(SUBDIRS))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user