1 use proxmox
::api
::{api, cli::*, ApiHandler, RpcEnvironment}
;
5 use proxmox_backup
::api2
;
11 schema
: OUTPUT_FORMAT
,
17 /// Show node configuration
18 fn get_node_config(param
: Value
, rpcenv
: &mut dyn RpcEnvironment
) -> Result
<Value
, Error
> {
20 let output_format
= get_output_format(¶m
);
22 let info
= &api2
::node
::config
::API_METHOD_GET_NODE_CONFIG
;
23 let mut data
= match info
.handler
{
24 ApiHandler
::Sync(handler
) => (handler
)(param
, info
, rpcenv
)?
,
28 let options
= default_table_format_options();
29 format_and_print_result_full(&mut data
, &info
.returns
, &output_format
, &options
);
34 pub fn node_commands() -> CommandLineInterface
{
35 let cmd_def
= CliCommandMap
::new()
38 CliCommand
::new(&API_METHOD_GET_NODE_CONFIG
),
42 CliCommand
::new(&api2
::node
::config
::API_METHOD_UPDATE_NODE_CONFIG
)
43 .fixed_param("node", String
::from("localhost"))