[Kimchi-devel] [WIP 1/2] UI: add list Host Devices API

shaohef at linux.vnet.ibm.com shaohef at linux.vnet.ibm.com
Sun Mar 23 23:31:05 UTC 2014


From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>

This API is used to get the Devices of Host.

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

diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js
index 4310435..d6d7c4b 100644
--- a/ui/js/src/kimchi.api.js
+++ b/ui/js/src/kimchi.api.js
@@ -706,6 +706,18 @@ var kimchi = {
         });
     },
 
+    listHostDevices: function(cap, suc, err) {
+        parameters = cap && "?_cap=" + cap
+        kimchi.requestJSON({
+            url : kimchi.url + 'host/devices' + parameters,
+            type : 'GET',
+            contentType : 'application/json',
+            dataType : 'json',
+            success : suc,
+            error : err
+        });
+    },
+
     getStorageServers: function(type, suc, err) {
         var url = kimchi.url + 'storageservers?_target_type=' + type;
         kimchi.requestJSON({
-- 
1.8.5.3




More information about the Kimchi-devel mailing list