api2/tape/changer: add drive state to changer status output

if we can find the drive in the config and it has a state

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-02-18 15:40:27 +01:00
committed by Dietmar Maurer
parent 41e66bfaf6
commit 8be48ddfc7
2 changed files with 25 additions and 0 deletions

View File

@ -129,4 +129,7 @@ pub struct MtxStatusEntry {
/// The slot the drive was loaded from
#[serde(skip_serializing_if="Option::is_none")]
pub loaded_slot: Option<u64>,
/// The current state of the drive
#[serde(skip_serializing_if="Option::is_none")]
pub state: Option<String>,
}