cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [14/50] [abbrv] git commit: updated refs/heads/marvin-refactor to 5ce2643
Date Sat, 30 Mar 2013 16:56:27 GMT
Zone wide primary storage is not supported for Xenserver as the Hypervisor but for KVM only


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

Branch: refs/heads/marvin-refactor
Commit: 83a603991a031de8e9510390ceb4401e8be2a653
Parents: 6ea290f
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Fri Mar 29 20:45:44 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Sat Mar 30 22:21:53 2013 +0530

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83a60399/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 53f1684..51c956d 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1186,15 +1186,31 @@
                     label: 'label.scope',
                     select: function(args) {
 
-            var scope = [
-                        { id: 'zone', description: _l('label.zone.wide') },
-                        { id: 'cluster', description: _l('label.cluster') },
-                        { id: 'host', description: _l('label.host') }
-                      ];
-
-                      args.response.success({
-                        data: scope
-                      });
+             var selectedHypervisorObj = {
+                hypervisortype: $.isArray(args.context.zones[0].hypervisor) ?
+                  // We want the cluster's hypervisor type
+                  args.context.zones[0].hypervisor[1] : args.context.zones[0].hypervisor
+              };
+
+              if(selectedHypervisorObj == null) {
+                return;
+              }
+
+                // ZWPS not supported for Xenserver
+             if(selectedHypervisorObj.hypervisortype == "XenServer"){
+                       var scope=[];
+                       scope.push({ id: 'cluster', description: _l('label.cluster') });
+                       scope.push({ id: 'host', description: _l('label.host') });
+                       args.response.success({data: scope});
+                    }
+
+              else {
+                       var scope=[];
+                       scope.push({ id: 'zone', description: _l('label.zone.wide') });
+                       scope.push({ id: 'cluster', description: _l('label.cluster') });
+                       scope.push({ id: 'host', description: _l('label.host') });
+                       args.response.success({data: scope});
+                    }
 
                 }
 


Mime
View raw message