move drive config to pbs_config workspace

Also moved the tape type definitions to pbs_api_types.
This commit is contained in:
Dietmar Maurer
2021-09-03 09:10:18 +02:00
parent ccb3b45e18
commit 1ce8e905ea
36 changed files with 323 additions and 357 deletions

View File

@ -524,7 +524,7 @@ pub struct MtxMediaChanger {
impl MtxMediaChanger {
pub fn with_drive_config(drive_config: &LtoTapeDrive) -> Result<Self, Error> {
let (config, _digest) = crate::config::drive::config()?;
let (config, _digest) = pbs_config::drive::config()?;
let changer_config: ScsiTapeChanger = match drive_config.changer {
Some(ref changer) => config.lookup("changer", changer)?,
None => bail!("drive '{}' has no associated changer", drive_config.name),

View File

@ -125,7 +125,7 @@ pub fn mtx_status_to_online_set(status: &MtxStatus, inventory: &Inventory) -> Ha
/// For a single 'changer', or else simply ask all changer devices.
pub fn update_online_status(state_path: &Path, changer: Option<&str>) -> Result<OnlineStatusMap, Error> {
let (config, _digest) = crate::config::drive::config()?;
let (config, _digest) = pbs_config::drive::config()?;
let mut inventory = Inventory::load(state_path)?;