api2/types/tape/drive: add changer_drivenum
so that an api user can see which drive belongs to which drivenum of a changer for ones with multiple drives Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
8b1174f50a
commit
d8792b88ef
@ -134,6 +134,7 @@ pub fn list_changers(
|
|||||||
name: changer.name,
|
name: changer.name,
|
||||||
path: changer.path.clone(),
|
path: changer.path.clone(),
|
||||||
changer: None,
|
changer: None,
|
||||||
|
changer_drivenum: None,
|
||||||
vendor: None,
|
vendor: None,
|
||||||
model: None,
|
model: None,
|
||||||
serial: None,
|
serial: None,
|
||||||
|
@ -127,6 +127,7 @@ pub fn list_drives(
|
|||||||
name: drive.name,
|
name: drive.name,
|
||||||
path: drive.path.clone(),
|
path: drive.path.clone(),
|
||||||
changer: drive.changer,
|
changer: drive.changer,
|
||||||
|
changer_drivenum: drive.changer_drive_id,
|
||||||
vendor: None,
|
vendor: None,
|
||||||
model: None,
|
model: None,
|
||||||
serial: None,
|
serial: None,
|
||||||
|
@ -166,6 +166,7 @@ pub fn list_changers(
|
|||||||
name: changer.name,
|
name: changer.name,
|
||||||
path: changer.path.clone(),
|
path: changer.path.clone(),
|
||||||
changer: None,
|
changer: None,
|
||||||
|
changer_drivenum: None,
|
||||||
vendor: None,
|
vendor: None,
|
||||||
model: None,
|
model: None,
|
||||||
serial: None,
|
serial: None,
|
||||||
|
@ -82,6 +82,7 @@ pub struct LinuxTapeDrive {
|
|||||||
|
|
||||||
#[api()]
|
#[api()]
|
||||||
#[derive(Serialize,Deserialize)]
|
#[derive(Serialize,Deserialize)]
|
||||||
|
#[serde(rename_all = "kebab-case")]
|
||||||
/// Drive list entry
|
/// Drive list entry
|
||||||
pub struct DriveListEntry {
|
pub struct DriveListEntry {
|
||||||
/// Drive name
|
/// Drive name
|
||||||
@ -91,6 +92,9 @@ pub struct DriveListEntry {
|
|||||||
/// Associated changer device
|
/// Associated changer device
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub changer: Option<String>,
|
pub changer: Option<String>,
|
||||||
|
/// Drive number in associated changer device
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
|
pub changer_drivenum: Option<u64>,
|
||||||
/// Vendor (autodetected)
|
/// Vendor (autodetected)
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub vendor: Option<String>,
|
pub vendor: Option<String>,
|
||||||
|
Loading…
Reference in New Issue
Block a user