diff --git a/src/api2/tape/drive.rs b/src/api2/tape/drive.rs index 6ad1136c..be85373b 100644 --- a/src/api2/tape/drive.rs +++ b/src/api2/tape/drive.rs @@ -26,7 +26,7 @@ use crate::{ #[api( input: { properties: { - name: { + drive: { schema: DRIVE_ID_SCHEMA, }, slot: { @@ -38,18 +38,18 @@ use crate::{ )] /// Load media via changer from slot pub fn load_slot( - name: String, + drive: String, slot: u64, _param: Value, ) -> Result<(), Error> { let (config, _digest) = config::drive::config()?; - let drive: LinuxTapeDrive = config.lookup("linux", &name)?; + let drive_config: LinuxTapeDrive = config.lookup("linux", &drive)?; - let changer: ScsiTapeChanger = match drive.changer { + let changer: ScsiTapeChanger = match drive_config.changer { Some(ref changer) => config.lookup("changer", changer)?, - None => bail!("drive '{}' has no associated changer", name), + None => bail!("drive '{}' has no associated changer", drive), }; let drivenum = 0; diff --git a/src/bin/proxmox_tape/drive.rs b/src/bin/proxmox_tape/drive.rs index 799840bd..fb06afac 100644 --- a/src/bin/proxmox_tape/drive.rs +++ b/src/bin/proxmox_tape/drive.rs @@ -280,7 +280,7 @@ fn update_linux_drive( #[api( input: { properties: { - name: { + drive: { schema: DRIVE_ID_SCHEMA, }, slot: {