diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 9f535a21..a19eec8b 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -244,10 +244,12 @@ fn acl_commands() -> CommandLineInterface { } )] /// Network device list. -fn list_network_devices(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result { +fn list_network_devices(mut param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result { 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 { +fn pending_network_changes(mut param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result { + 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",