move drive config to pbs_config workspace
Also moved the tape type definitions to pbs_api_types.
This commit is contained in:
@ -11,6 +11,11 @@ use proxmox::{
|
||||
},
|
||||
};
|
||||
|
||||
use pbs_config::drive::{
|
||||
complete_drive_name,
|
||||
complete_changer_name,
|
||||
};
|
||||
|
||||
use proxmox_backup::{
|
||||
api2::{
|
||||
self,
|
||||
@ -20,16 +25,7 @@ use proxmox_backup::{
|
||||
},
|
||||
tape::{
|
||||
complete_changer_path,
|
||||
drive::{
|
||||
media_changer,
|
||||
},
|
||||
},
|
||||
config::{
|
||||
self,
|
||||
drive::{
|
||||
complete_drive_name,
|
||||
complete_changer_name,
|
||||
}
|
||||
drive::media_changer,
|
||||
},
|
||||
};
|
||||
|
||||
@ -232,7 +228,7 @@ async fn get_status(
|
||||
rpcenv: &mut dyn RpcEnvironment,
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let (config, _digest) = config::drive::config()?;
|
||||
let (config, _digest) = pbs_config::drive::config()?;
|
||||
|
||||
param["name"] = lookup_changer_name(¶m, &config)?.into();
|
||||
|
||||
@ -295,7 +291,7 @@ pub async fn transfer(
|
||||
rpcenv: &mut dyn RpcEnvironment,
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let (config, _digest) = config::drive::config()?;
|
||||
let (config, _digest) = pbs_config::drive::config()?;
|
||||
|
||||
param["name"] = lookup_changer_name(¶m, &config)?.into();
|
||||
|
||||
|
@ -10,21 +10,16 @@ use proxmox::{
|
||||
},
|
||||
};
|
||||
|
||||
use proxmox_backup::{
|
||||
api2::{
|
||||
self,
|
||||
types::{
|
||||
DRIVE_NAME_SCHEMA,
|
||||
},
|
||||
},
|
||||
tape::complete_drive_path,
|
||||
config::drive::{
|
||||
complete_drive_name,
|
||||
complete_changer_name,
|
||||
complete_lto_drive_name,
|
||||
},
|
||||
use pbs_api_types::DRIVE_NAME_SCHEMA;
|
||||
|
||||
use pbs_config::drive::{
|
||||
complete_drive_name,
|
||||
complete_changer_name,
|
||||
complete_lto_drive_name,
|
||||
};
|
||||
|
||||
use proxmox_backup::{api2, tape::complete_drive_path};
|
||||
|
||||
pub fn drive_commands() -> CommandLineInterface {
|
||||
|
||||
let cmd_def = CliCommandMap::new()
|
||||
|
@ -16,7 +16,6 @@ use pbs_datastore::Kdf;
|
||||
use pbs_datastore::paperkey::{PaperkeyFormat, generate_paper_key};
|
||||
|
||||
use proxmox_backup::{
|
||||
config,
|
||||
api2::{
|
||||
self,
|
||||
types::{
|
||||
@ -208,7 +207,7 @@ async fn restore_key(
|
||||
rpcenv: &mut dyn RpcEnvironment,
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let (config, _digest) = config::drive::config()?;
|
||||
let (config, _digest) = pbs_config::drive::config()?;
|
||||
param["drive"] = crate::extract_drive_name(&mut param, &config)?.into();
|
||||
|
||||
if !tty::stdin_isatty() {
|
||||
|
@ -10,18 +10,14 @@ use proxmox::{
|
||||
},
|
||||
};
|
||||
|
||||
use pbs_api_types::{
|
||||
MEDIA_POOL_NAME_SCHEMA, CHANGER_NAME_SCHEMA, MediaStatus, MediaListEntry,
|
||||
MediaContentListFilter,
|
||||
};
|
||||
use pbs_config::drive::complete_changer_name;
|
||||
|
||||
use proxmox_backup::{
|
||||
api2::{
|
||||
self,
|
||||
types::{
|
||||
MEDIA_POOL_NAME_SCHEMA,
|
||||
CHANGER_NAME_SCHEMA,
|
||||
MediaStatus,
|
||||
MediaListEntry,
|
||||
},
|
||||
tape::media::MediaContentListFilter,
|
||||
},
|
||||
config::drive::complete_changer_name,
|
||||
api2,
|
||||
tape::{
|
||||
complete_media_label_text,
|
||||
complete_media_uuid,
|
||||
|
Reference in New Issue
Block a user