src/bin/proxmox-backup-manager.rs: fix node parameter handling
This commit is contained in:
parent
6830608855
commit
76227a6acd
|
@ -244,10 +244,12 @@ fn acl_commands() -> CommandLineInterface {
|
|||
}
|
||||
)]
|
||||
/// Network device list.
|
||||
fn list_network_devices(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, Error> {
|
||||
fn list_network_devices(mut param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, Error> {
|
||||
|
||||
let output_format = get_output_format(¶m);
|
||||
|
||||
param["node"] = "localhost".into();
|
||||
|
||||
let info = &api2::node::network::API_METHOD_LIST_NETWORK_DEVICES;
|
||||
let mut data = match info.handler {
|
||||
ApiHandler::Sync(handler) => (handler)(param, info, rpcenv)?,
|
||||
|
@ -306,7 +308,8 @@ fn list_network_devices(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result
|
|||
|
||||
#[api()]
|
||||
/// Show pending configuration changes (diff)
|
||||
fn pending_network_changes(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, Error> {
|
||||
fn pending_network_changes(mut param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, Error> {
|
||||
param["node"] = "localhost".into();
|
||||
|
||||
let info = &api2::node::network::API_METHOD_LIST_NETWORK_DEVICES;
|
||||
let _data = match info.handler {
|
||||
|
@ -329,12 +332,10 @@ fn network_commands() -> CommandLineInterface {
|
|||
.insert(
|
||||
"list",
|
||||
CliCommand::new(&API_METHOD_LIST_NETWORK_DEVICES)
|
||||
.fixed_param("node", String::from("localhost"))
|
||||
)
|
||||
.insert(
|
||||
"changes",
|
||||
CliCommand::new(&API_METHOD_PENDING_NETWORK_CHANGES)
|
||||
.fixed_param("node", String::from("localhost"))
|
||||
)
|
||||
.insert(
|
||||
"update",
|
||||
|
|
Loading…
Reference in New Issue