You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/12/12 23:49:44 UTC

git commit: CS-17074: cloudstack UI - Advanced SG-enabled zone - Zone Wizard - When Advanced option is selected and Security Groups checkbox is checked, hypervisor dropdown will list only KVM option (if KVM is in listHypervisors API response).

Updated Branches:
  refs/heads/master 41dd38c86 -> c8926de01


CS-17074: cloudstack UI - Advanced SG-enabled zone - Zone Wizard - When Advanced option is selected and Security Groups checkbox is checked, hypervisor dropdown will list only KVM option (if KVM is in listHypervisors API response).


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/c8926de0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c8926de0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c8926de0

Branch: refs/heads/master
Commit: c8926de01838d70891425fa630aa57e7a76d852e
Parents: 41dd38c
Author: Jessica Wang <je...@citrix.com>
Authored: Wed Dec 12 14:30:12 2012 -0800
Committer: Jessica Wang <je...@citrix.com>
Committed: Wed Dec 12 14:47:55 2012 -0800

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c8926de0/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 92e2230..0bfcaad 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -370,11 +370,20 @@
 									var array1 = [];
 									
 									var firstOption = "XenServer";
-									if(args.context.zones[0]['network-model']	== "Advanced" && args.context.zones[0]['zone-advanced-sg-enabled'] ==	"on")
+									var nonSupportedHypervisors = {};									
+									if(args.context.zones[0]['network-model']	== "Advanced" && args.context.zones[0]['zone-advanced-sg-enabled'] ==	"on") {
 									  firstOption = "KVM";
+										nonSupportedHypervisors["XenServer"] = 1;  //to developers: comment this line if you need to test Advanced SG-enabled zone with XenServer hypervisor
+										nonSupportedHypervisors["VMware"] = 1;
+										nonSupportedHypervisors["BareMetal"] = 1;
+										nonSupportedHypervisors["Ovm"] = 1;
+									}
 									
 									if(items != null) {
 									  for(var i = 0; i < items.length; i++) {
+										  if(items[i].name in nonSupportedHypervisors)
+											  continue;
+										
 										  if(items[i].name == firstOption)
 											  array1.unshift({id: items[i].name, description: items[i].name});
 											else