From e7105ae41acfddbb34d1b96ee2f52be812f8ec78 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 23 Oct 2025 08:51:07 +0200 Subject: [PATCH 1/2] api: cannot update storage pool with empty parameters --- .../api/command/admin/storage/UpdateStoragePoolCmd.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java index f2d7bbeb189e..6f522fe1e8cd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java @@ -153,6 +153,8 @@ public void execute() { if (ObjectUtils.anyNotNull(name, capacityIops, capacityBytes, url, isTagARule, tags) || MapUtils.isNotEmpty(details)) { result = _storageService.updateStoragePool(this); + } else { + result = _storageService.getStoragePool(getId()); } if (enabled != null) { From 94f2ea8edbf07409368f0fc5e6b99b02f6e1078a Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 23 Oct 2025 08:55:45 +0200 Subject: [PATCH 2/2] test: fix storage pool tags is not updated when test is done --- test/integration/smoke/test_direct_download.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/smoke/test_direct_download.py b/test/integration/smoke/test_direct_download.py index 6570bb9f0b3c..e6960163bc22 100644 --- a/test/integration/smoke/test_direct_download.py +++ b/test/integration/smoke/test_direct_download.py @@ -251,7 +251,10 @@ def getCurrentStoragePoolTags(self, poolId): self.apiclient, id=poolId ) - return local_pool[0].tags + if local_pool[0].tags: + return local_pool[0].tags + else: + return "" def updateStoragePoolTags(self, poolId, tags): StoragePool.update(