From 44b65b4ec790e120e16c7dea27d0747f5692d80b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 15 Jan 2020 16:11:44 +0100 Subject: [PATCH] api/datastore: do not allow updating path for now It's a bit dangerous as it points to all the saved backups, so they would be seemingly lost after updating the path. Follow our logic from other products, e.g. in PVE we do not allow to update the backing path/location of a storage either for similar reasons. Signed-off-by: Thomas Lamprecht --- src/api2/config/datastore.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs index 23eca29f..a0149ba3 100644 --- a/src/api2/config/datastore.rs +++ b/src/api2/config/datastore.rs @@ -108,10 +108,6 @@ pub fn read_datastore(name: String) -> Result { optional: true, schema: SINGLE_LINE_COMMENT_SCHEMA, }, - path: { - optional: true, - schema: datastore::DIR_NAME_SCHEMA, - }, digest: { optional: true, schema: PROXMOX_CONFIG_DIGEST_SCHEMA, @@ -147,7 +143,6 @@ pub fn update_datastore( data.comment = Some(comment); } } - if let Some(path) = path { data.path = path; } config.set_data(&name, "datastore", &data)?;