[Kimchi-devel] [PATCH 1/2 V3] Issue #363: Add new rest api function - getStoragePoolVolume

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Sun Apr 13 16:27:57 UTC 2014


This patch adds new api AJAX method to retrieve specific storage pool
volume information. This method is used in template edit window.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.api.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js
index 8c1030c..a802ce5 100644
--- a/ui/js/src/kimchi.api.js
+++ b/ui/js/src/kimchi.api.js
@@ -744,6 +744,19 @@ var kimchi = {
         });
     },
 
+    getStoragePoolVolume: function(poolName, volumeName, suc, err) {
+        var url = kimchi.url + 'storagepools/' + encodeURIComponent(poolName) + '/storagevolumes/' + encodeURIComponent(volumeName);
+        kimchi.requestJSON({
+            url : url,
+            type : 'GET',
+            contentType : 'application/json',
+            timeout: 2000,
+            dataType : 'json',
+            success : suc,
+            error : err
+        });
+    },
+
     addVMStorage : function(settings, suc, err) {
         var vm = encodeURIComponent(settings['vm']);
         delete settings['vm'];
-- 
1.9.0




More information about the Kimchi-devel mailing list