diff --git a/ui/jsp/cluster.jsp b/ui/jsp/cluster.jsp
index 2b43d0f2042..a2bbb403614 100644
--- a/ui/jsp/cluster.jsp
+++ b/ui/jsp/cluster.jsp
@@ -181,6 +181,7 @@
diff --git a/ui/jsp/host.jsp b/ui/jsp/host.jsp
index eb111c00503..1b0a38e3532 100644
--- a/ui/jsp/host.jsp
+++ b/ui/jsp/host.jsp
@@ -897,6 +897,7 @@
diff --git a/ui/jsp/pod.jsp b/ui/jsp/pod.jsp
index e2c8025cbd6..7163a255741 100644
--- a/ui/jsp/pod.jsp
+++ b/ui/jsp/pod.jsp
@@ -326,6 +326,7 @@
diff --git a/ui/jsp/resource.jsp b/ui/jsp/resource.jsp
index f8685c87a92..1da0e78cdf5 100644
--- a/ui/jsp/resource.jsp
+++ b/ui/jsp/resource.jsp
@@ -657,6 +657,7 @@
diff --git a/ui/jsp/zone.jsp b/ui/jsp/zone.jsp
index c19a836321a..ded16b403ff 100644
--- a/ui/jsp/zone.jsp
+++ b/ui/jsp/zone.jsp
@@ -598,6 +598,7 @@
diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js
index 5d109fe415d..9860dce8616 100644
--- a/ui/scripts/cloud.core.pod.js
+++ b/ui/scripts/cloud.core.pod.js
@@ -484,7 +484,7 @@ function initAddPrimaryStorageButton($button, currentPageInRightPanel, $leftmenu
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#pool_cluster"), $thisDialog.find("#pool_cluster_errormsg"), false); //required, reset error text
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
- if (protocol == "nfs") {
+ if (protocol == "nfs" || protocol == "vmfs") {
isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg"));
} else {
isValid &= validateString("Target IQN", $thisDialog.find("#add_pool_iqn"), $thisDialog.find("#add_pool_iqn_errormsg"));
@@ -514,6 +514,11 @@ function initAddPrimaryStorageButton($button, currentPageInRightPanel, $leftmenu
if(path.substring(0,1)!="/")
path = "/" + path;
url = nfsURL(server, path);
+ } else if (protocol == "vmfs") {
+ var path = trim($thisDialog.find("#add_pool_path").val());
+ if(path.substring(0,1)!="/")
+ path = "/" + path;
+ url = vmfsURL(server, path);
} else {
var iqn = trim($thisDialog.find("#add_pool_iqn").val());
if(iqn.substring(0,1)!="/")
@@ -658,7 +663,16 @@ function nfsURL(server, path) {
else
url = server + path;
return url;
-}
+}
+
+function vmfsURL(server, path) {
+ var url;
+ if(server.indexOf("://")==-1)
+ url = "vmfs://" + server + path;
+ else
+ url = server + path;
+ return url;
+}
function iscsiURL(server, iqn, lun) {
var url;
@@ -678,7 +692,11 @@ function bindEventHandlerToDialogAddPool($dialogAddPool) {
else if ($(this).val() == "nfs") {
$dialogAddPool.find("#add_pool_path_container").show();
$dialogAddPool.find("#add_pool_iqn_container,#add_pool_lun_container").hide();
- }
+ }
+ else if ($(this).val() == "vmfs") {
+ $dialogAddPool.find("#add_pool_path_container").show();
+ $dialogAddPool.find("#add_pool_iqn_container,#add_pool_lun_container").hide();
+ }
});
}
diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js
index fe1d90d24dc..a7edb395465 100644
--- a/ui/scripts/cloud.core.resource.js
+++ b/ui/scripts/cloud.core.resource.js
@@ -1096,7 +1096,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
- if (protocol == "nfs") {
+ if (protocol == "nfs" || protocol == "vmfs") {
isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg"));
} else {
isValid &= validateString("Target IQN", $thisDialog.find("#add_pool_iqn"), $thisDialog.find("#add_pool_iqn_errormsg"));
@@ -1135,6 +1135,11 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
if(path.substring(0,1)!="/")
path = "/" + path;
url = nfsURL(server, path);
+ } else if(protocol == "vmfs") {
+ var path = trim($thisDialog.find("#add_pool_path").val());
+ if(path.substring(0,1)!="/")
+ path = "/" + path;
+ url = vmfsURL(server, path);
} else {
var iqn = trim($thisDialog.find("#add_pool_iqn").val());
if(iqn.substring(0,1)!="/")
diff --git a/ui/scripts/cloud.core.zone.js b/ui/scripts/cloud.core.zone.js
index ba9132a26b4..2d7eda1304c 100644
--- a/ui/scripts/cloud.core.zone.js
+++ b/ui/scripts/cloud.core.zone.js
@@ -1189,7 +1189,7 @@ function initAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
- if (protocol == "nfs") {
+ if (protocol == "nfs" || protocol == "vmfs") {
isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg"));
} else {
isValid &= validateString("Target IQN", $thisDialog.find("#add_pool_iqn"), $thisDialog.find("#add_pool_iqn_errormsg"));
@@ -1227,6 +1227,11 @@ function initAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
if(path.substring(0,1)!="/")
path = "/" + path;
url = nfsURL(server, path);
+ } else if (protocol == "vmfs") {
+ var path = trim($thisDialog.find("#add_pool_path").val());
+ if(path.substring(0,1)!="/")
+ path = "/" + path;
+ url = vmfsURL(server, path);
} else {
var iqn = trim($thisDialog.find("#add_pool_iqn").val());
if(iqn.substring(0,1)!="/")