2019-01-23 12:05:32 +00:00
|
|
|
use failure::*;
|
|
|
|
use serde_json::{json, Value};
|
|
|
|
|
2019-11-21 13:36:28 +00:00
|
|
|
use proxmox::api::{ApiHandler, ApiMethod, Router, RpcEnvironment};
|
|
|
|
use proxmox::api::schema::ObjectSchema;
|
|
|
|
|
2019-05-09 05:44:09 +00:00
|
|
|
use crate::api2::types::*;
|
2019-01-23 12:05:32 +00:00
|
|
|
|
2019-01-26 13:50:37 +00:00
|
|
|
fn get_network_config(
|
|
|
|
_param: Value,
|
|
|
|
_info: &ApiMethod,
|
2019-06-07 11:10:56 +00:00
|
|
|
_rpcenv: &mut dyn RpcEnvironment,
|
2019-01-26 13:50:37 +00:00
|
|
|
) -> Result<Value, Error> {
|
2019-01-23 12:05:32 +00:00
|
|
|
|
|
|
|
Ok(json!({}))
|
|
|
|
}
|
|
|
|
|
2019-11-21 08:36:41 +00:00
|
|
|
pub const ROUTER: Router = Router::new()
|
|
|
|
.get(
|
|
|
|
&ApiMethod::new(
|
|
|
|
&ApiHandler::Sync(&get_network_config),
|
|
|
|
&ObjectSchema::new(
|
|
|
|
"Read network configuration.",
|
|
|
|
&[ ("node", false, &NODE_SCHEMA) ],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|