mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-28 20:00:13 +00:00
config: factor out method to get the absolute datastore path
removable datastores will have a PBS-managed mountpoint as path, direct access to the field needs to be replaced with a helper that can account for this. Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
cba72020dd
commit
7bffb9fe92
@ -357,6 +357,11 @@ impl DataStoreConfig {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the absolute path to the datastore content.
|
||||
pub fn absolute_path(&self) -> String {
|
||||
self.path.clone()
|
||||
}
|
||||
|
||||
pub fn get_maintenance_mode(&self) -> Option<MaintenanceMode> {
|
||||
self.maintenance_mode.as_ref().and_then(|str| {
|
||||
MaintenanceMode::deserialize(proxmox_schema::de::SchemaDeserializer::new(
|
||||
|
Loading…
Reference in New Issue
Block a user