diff --git a/src/api2/config/changer.rs b/src/api2/config/changer.rs index 6501aa23..789bfbfc 100644 --- a/src/api2/config/changer.rs +++ b/src/api2/config/changer.rs @@ -7,7 +7,7 @@ use crate::{ config, api2::types::{ PROXMOX_CONFIG_DIGEST_SCHEMA, - CHANGER_ID_SCHEMA, + CHANGER_NAME_SCHEMA, LINUX_DRIVE_PATH_SCHEMA, DriveListEntry, ScsiTapeChanger, @@ -25,7 +25,7 @@ use crate::{ input: { properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, path: { schema: LINUX_DRIVE_PATH_SCHEMA, @@ -67,7 +67,7 @@ pub fn create_changer( input: { properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, }, }, @@ -145,7 +145,7 @@ pub fn list_changers( input: { properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, path: { schema: LINUX_DRIVE_PATH_SCHEMA, @@ -195,7 +195,7 @@ pub fn update_changer( input: { properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, }, }, diff --git a/src/api2/config/drive.rs b/src/api2/config/drive.rs index 4aade027..54601795 100644 --- a/src/api2/config/drive.rs +++ b/src/api2/config/drive.rs @@ -9,7 +9,7 @@ use crate::{ api2::types::{ PROXMOX_CONFIG_DIGEST_SCHEMA, DRIVE_NAME_SCHEMA, - CHANGER_ID_SCHEMA, + CHANGER_NAME_SCHEMA, CHANGER_DRIVE_ID_SCHEMA, LINUX_DRIVE_PATH_SCHEMA, DriveListEntry, @@ -34,7 +34,7 @@ use crate::{ schema: LINUX_DRIVE_PATH_SCHEMA, }, changer: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, optional: true, }, "changer-drive-id": { @@ -168,7 +168,7 @@ pub enum DeletableProperty { optional: true, }, changer: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, optional: true, }, "changer-drive-id": { diff --git a/src/api2/tape/changer.rs b/src/api2/tape/changer.rs index 720fcd80..f9653d44 100644 --- a/src/api2/tape/changer.rs +++ b/src/api2/tape/changer.rs @@ -9,7 +9,7 @@ use proxmox::list_subdirs_api_method; use crate::{ config, api2::types::{ - CHANGER_ID_SCHEMA, + CHANGER_NAME_SCHEMA, ScsiTapeChanger, TapeDeviceInfo, MtxStatusEntry, @@ -33,7 +33,7 @@ use crate::{ input: { properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, }, }, @@ -103,7 +103,7 @@ pub async fn get_status(name: String) -> Result, Error> { input: { properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, from: { description: "Source slot number", diff --git a/src/api2/types/tape/drive.rs b/src/api2/types/tape/drive.rs index 82552fb1..be7dcf5c 100644 --- a/src/api2/types/tape/drive.rs +++ b/src/api2/types/tape/drive.rs @@ -15,7 +15,7 @@ pub const DRIVE_NAME_SCHEMA: Schema = StringSchema::new("Drive Identifier.") .max_length(32) .schema(); -pub const CHANGER_ID_SCHEMA: Schema = StringSchema::new("Tape Changer Identifier.") +pub const CHANGER_NAME_SCHEMA: Schema = StringSchema::new("Tape Changer Identifier.") .format(&PROXMOX_SAFE_ID_FORMAT) .min_length(3) .max_length(32) @@ -70,7 +70,7 @@ pub struct VirtualTapeDrive { schema: LINUX_DRIVE_PATH_SCHEMA, }, changer: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, optional: true, }, "changer-drive-id": { @@ -94,7 +94,7 @@ pub struct LinuxTapeDrive { #[api( properties: { name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, path: { schema: SCSI_CHANGER_PATH_SCHEMA, diff --git a/src/bin/proxmox_tape/changer.rs b/src/bin/proxmox_tape/changer.rs index c218c0f7..54a0f9a2 100644 --- a/src/bin/proxmox_tape/changer.rs +++ b/src/bin/proxmox_tape/changer.rs @@ -14,7 +14,7 @@ use proxmox_backup::{ api2::{ self, types::{ - CHANGER_ID_SCHEMA, + CHANGER_NAME_SCHEMA, }, }, tape::{ @@ -152,7 +152,7 @@ fn scan_for_changers( optional: true, }, name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, }, }, @@ -188,7 +188,7 @@ fn get_config( optional: true, }, name: { - schema: CHANGER_ID_SCHEMA, + schema: CHANGER_NAME_SCHEMA, }, }, },