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/b7b8fdc4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b7b8fdc4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b7b8fdc4 Branch: refs/heads/marvin_refactor Commit: b7b8fdc457398865cbf66d662223c4a914e453eb Parents: fae09fe Author: Pranav Saxena <[email protected]> Authored: Fri Mar 29 20:45:44 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Sun Mar 31 22:06:01 2013 +0530 ---------------------------------------------------------------------- ui/scripts/zoneWizard.js | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7b8fdc4/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}); + } }
