tape: rename CHANGER_ID_SCHEMA to CHANGER_NAME_SCHEMA

This commit is contained in:
Dietmar Maurer 2020-12-13 09:22:08 +01:00
parent 49c965a497
commit 7e1d4712b8
5 changed files with 17 additions and 17 deletions

View File

@ -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,
},
},
},

View File

@ -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": {

View File

@ -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<Vec<MtxStatusEntry>, Error> {
input: {
properties: {
name: {
schema: CHANGER_ID_SCHEMA,
schema: CHANGER_NAME_SCHEMA,
},
from: {
description: "Source slot number",

View File

@ -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,

View File

@ -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,
},
},
},