datastore status: impl empty-status constructor for item type
we can now use it for the error case and will further use it for the can access namespace but not datastore case in a future patch Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -53,18 +53,7 @@ pub fn datastore_status(
|
||||
let datastore = match DataStore::lookup_datastore(&store, Some(Operation::Read)) {
|
||||
Ok(datastore) => datastore,
|
||||
Err(err) => {
|
||||
list.push(DataStoreStatusListItem {
|
||||
store: store.clone(),
|
||||
total: -1,
|
||||
used: -1,
|
||||
avail: -1,
|
||||
history: None,
|
||||
history_start: None,
|
||||
history_delta: None,
|
||||
estimated_full_date: None,
|
||||
error: Some(err.to_string()),
|
||||
gc_status: None,
|
||||
});
|
||||
list.push(DataStoreStatusListItem::empty(store, Some(err.to_string())));
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user