mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-07 22:59:25 +00:00
tape inventory: code cleanup listing media assigned to a pool
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7792507a12
commit
0b160cfdec
@ -262,21 +262,17 @@ impl Inventory {
|
|||||||
|
|
||||||
for entry in self.map.values() {
|
for entry in self.map.values() {
|
||||||
match entry.id.media_set_label {
|
match entry.id.media_set_label {
|
||||||
None => continue, // not assigned to any pool
|
Some(ref set) if set.pool == pool => {
|
||||||
Some(ref set) => {
|
let id = match set.unassigned() {
|
||||||
if set.pool != pool {
|
true => MediaId {
|
||||||
continue; // belong to another pool
|
|
||||||
}
|
|
||||||
|
|
||||||
if set.unassigned() {
|
|
||||||
list.push(MediaId {
|
|
||||||
label: entry.id.label.clone(),
|
label: entry.id.label.clone(),
|
||||||
media_set_label: None,
|
media_set_label: None,
|
||||||
})
|
},
|
||||||
} else {
|
false => entry.id.clone(),
|
||||||
list.push(entry.id.clone());
|
};
|
||||||
}
|
list.push(id);
|
||||||
}
|
}
|
||||||
|
_ => continue, // not assigned to any pool or belongs to another pool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user