You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2025/11/03 14:25:16 UTC

(cloudstack) branch 4.20 updated: api/test: fix storage pool update with only id (#11897)

This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new d53b6dbda42 api/test: fix storage pool update with only id (#11897)
d53b6dbda42 is described below

commit d53b6dbda42f56c6f67f4452647e93f4b7ad35a8
Author: Wei Zhou <we...@apache.org>
AuthorDate: Mon Nov 3 15:25:09 2025 +0100

    api/test: fix storage pool update with only id (#11897)
---
 .../cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java   | 2 ++
 test/integration/smoke/test_direct_download.py                       | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

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 f2d7bbeb189..6f522fe1e8c 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 class UpdateStoragePoolCmd extends BaseCmd {
         if (ObjectUtils.anyNotNull(name, capacityIops, capacityBytes, url, isTagARule, tags) ||
                 MapUtils.isNotEmpty(details)) {
             result = _storageService.updateStoragePool(this);
+        } else {
+            result = _storageService.getStoragePool(getId());
         }
 
         if (enabled != null) {
diff --git a/test/integration/smoke/test_direct_download.py b/test/integration/smoke/test_direct_download.py
index 6570bb9f0b3..e6960163bc2 100644
--- a/test/integration/smoke/test_direct_download.py
+++ b/test/integration/smoke/test_direct_download.py
@@ -251,7 +251,10 @@ class TestDirectDownloadTemplates(cloudstackTestCase):
             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(