mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-06 09:23:02 +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() {
|
||||
match entry.id.media_set_label {
|
||||
None => continue, // not assigned to any pool
|
||||
Some(ref set) => {
|
||||
if set.pool != pool {
|
||||
continue; // belong to another pool
|
||||
}
|
||||
|
||||
if set.unassigned() {
|
||||
list.push(MediaId {
|
||||
Some(ref set) if set.pool == pool => {
|
||||
let id = match set.unassigned() {
|
||||
true => MediaId {
|
||||
label: entry.id.label.clone(),
|
||||
media_set_label: None,
|
||||
})
|
||||
} else {
|
||||
list.push(entry.id.clone());
|
||||
}
|
||||
},
|
||||
false => 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