tape: rename CHANGER_ID_SCHEMA to CHANGER_NAME_SCHEMA
This commit is contained in:
parent
49c965a497
commit
7e1d4712b8
@ -7,7 +7,7 @@ use crate::{
|
|||||||
config,
|
config,
|
||||||
api2::types::{
|
api2::types::{
|
||||||
PROXMOX_CONFIG_DIGEST_SCHEMA,
|
PROXMOX_CONFIG_DIGEST_SCHEMA,
|
||||||
CHANGER_ID_SCHEMA,
|
CHANGER_NAME_SCHEMA,
|
||||||
LINUX_DRIVE_PATH_SCHEMA,
|
LINUX_DRIVE_PATH_SCHEMA,
|
||||||
DriveListEntry,
|
DriveListEntry,
|
||||||
ScsiTapeChanger,
|
ScsiTapeChanger,
|
||||||
@ -25,7 +25,7 @@ use crate::{
|
|||||||
input: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
schema: LINUX_DRIVE_PATH_SCHEMA,
|
schema: LINUX_DRIVE_PATH_SCHEMA,
|
||||||
@ -67,7 +67,7 @@ pub fn create_changer(
|
|||||||
input: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -145,7 +145,7 @@ pub fn list_changers(
|
|||||||
input: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
schema: LINUX_DRIVE_PATH_SCHEMA,
|
schema: LINUX_DRIVE_PATH_SCHEMA,
|
||||||
@ -195,7 +195,7 @@ pub fn update_changer(
|
|||||||
input: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -9,7 +9,7 @@ use crate::{
|
|||||||
api2::types::{
|
api2::types::{
|
||||||
PROXMOX_CONFIG_DIGEST_SCHEMA,
|
PROXMOX_CONFIG_DIGEST_SCHEMA,
|
||||||
DRIVE_NAME_SCHEMA,
|
DRIVE_NAME_SCHEMA,
|
||||||
CHANGER_ID_SCHEMA,
|
CHANGER_NAME_SCHEMA,
|
||||||
CHANGER_DRIVE_ID_SCHEMA,
|
CHANGER_DRIVE_ID_SCHEMA,
|
||||||
LINUX_DRIVE_PATH_SCHEMA,
|
LINUX_DRIVE_PATH_SCHEMA,
|
||||||
DriveListEntry,
|
DriveListEntry,
|
||||||
@ -34,7 +34,7 @@ use crate::{
|
|||||||
schema: LINUX_DRIVE_PATH_SCHEMA,
|
schema: LINUX_DRIVE_PATH_SCHEMA,
|
||||||
},
|
},
|
||||||
changer: {
|
changer: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
"changer-drive-id": {
|
"changer-drive-id": {
|
||||||
@ -168,7 +168,7 @@ pub enum DeletableProperty {
|
|||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
changer: {
|
changer: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
"changer-drive-id": {
|
"changer-drive-id": {
|
||||||
|
@ -9,7 +9,7 @@ use proxmox::list_subdirs_api_method;
|
|||||||
use crate::{
|
use crate::{
|
||||||
config,
|
config,
|
||||||
api2::types::{
|
api2::types::{
|
||||||
CHANGER_ID_SCHEMA,
|
CHANGER_NAME_SCHEMA,
|
||||||
ScsiTapeChanger,
|
ScsiTapeChanger,
|
||||||
TapeDeviceInfo,
|
TapeDeviceInfo,
|
||||||
MtxStatusEntry,
|
MtxStatusEntry,
|
||||||
@ -33,7 +33,7 @@ use crate::{
|
|||||||
input: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
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: {
|
input: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
from: {
|
from: {
|
||||||
description: "Source slot number",
|
description: "Source slot number",
|
||||||
|
@ -15,7 +15,7 @@ pub const DRIVE_NAME_SCHEMA: Schema = StringSchema::new("Drive Identifier.")
|
|||||||
.max_length(32)
|
.max_length(32)
|
||||||
.schema();
|
.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)
|
.format(&PROXMOX_SAFE_ID_FORMAT)
|
||||||
.min_length(3)
|
.min_length(3)
|
||||||
.max_length(32)
|
.max_length(32)
|
||||||
@ -70,7 +70,7 @@ pub struct VirtualTapeDrive {
|
|||||||
schema: LINUX_DRIVE_PATH_SCHEMA,
|
schema: LINUX_DRIVE_PATH_SCHEMA,
|
||||||
},
|
},
|
||||||
changer: {
|
changer: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
"changer-drive-id": {
|
"changer-drive-id": {
|
||||||
@ -94,7 +94,7 @@ pub struct LinuxTapeDrive {
|
|||||||
#[api(
|
#[api(
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
schema: SCSI_CHANGER_PATH_SCHEMA,
|
schema: SCSI_CHANGER_PATH_SCHEMA,
|
||||||
|
@ -14,7 +14,7 @@ use proxmox_backup::{
|
|||||||
api2::{
|
api2::{
|
||||||
self,
|
self,
|
||||||
types::{
|
types::{
|
||||||
CHANGER_ID_SCHEMA,
|
CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tape::{
|
tape::{
|
||||||
@ -152,7 +152,7 @@ fn scan_for_changers(
|
|||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -188,7 +188,7 @@ fn get_config(
|
|||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
schema: CHANGER_ID_SCHEMA,
|
schema: CHANGER_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user