tape: expose basic tape/changer functionality at api2/tape/

This commit is contained in:
Dietmar Maurer
2020-12-08 15:42:50 +01:00
parent 5ba83ed099
commit 5d90860688
9 changed files with 359 additions and 53 deletions

View File

@ -57,6 +57,21 @@ pub fn mtx_unload(
Ok(())
}
/// Run 'mtx transfer'
pub fn mtx_transfer(
path: &str,
from_slot: u64,
to_slot: u64,
) -> Result<(), Error> {
let mut command = std::process::Command::new("mtx");
command.args(&["-f", path, "transfer", &from_slot.to_string(), &to_slot.to_string()]);
run_command(command, None)?;
Ok(())
}
/// Extract the list of online media from MtxStatus
///
/// Returns a HashSet containing all found media Uuid