Skip to content

Commit 782bf82

Browse files
author
Jessica Wang
committed
CLOUDSTACK-2029: UI - zone wizard - primary storage step - scope dropdown - show zone-wide option when hypervisor is VMware or KVM.
1 parent e883526 commit 782bf82

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

ui/scripts/zoneWizard.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,26 +1233,21 @@
12331233
if(selectedHypervisorObj == null) {
12341234
return;
12351235
}
1236-
1237-
// ZWPS is supported only for KVM as the hypervisor
1238-
if(selectedHypervisorObj.hypervisortype != "KVM"){
1239-
var scope=[];
1240-
scope.push({ id: 'cluster', description: _l('label.cluster') });
1241-
//scope.push({ id: 'host', description: _l('label.host') });
1242-
args.response.success({data: scope});
1243-
}
1244-
1245-
else {
1246-
var scope=[];
1247-
scope.push({ id: 'zone', description: _l('label.zone.wide') });
1248-
scope.push({ id: 'cluster', description: _l('label.cluster') });
1249-
// scope.push({ id: 'host', description: _l('label.host') });
1250-
args.response.success({data: scope});
1251-
}
1252-
1253-
}
1254-
1255-
},
1236+
1237+
//zone-wide-primary-storage is supported only for KVM and VMWare
1238+
if(selectedHypervisorObj.hypervisortype == "KVM" || selectedHypervisorObj.hypervisortype == "VMware"){
1239+
var scope=[];
1240+
scope.push({ id: 'zone', description: _l('label.zone.wide') });
1241+
scope.push({ id: 'cluster', description: _l('label.cluster') });
1242+
args.response.success({data: scope});
1243+
}
1244+
else {
1245+
var scope=[];
1246+
scope.push({ id: 'cluster', description: _l('label.cluster') });
1247+
args.response.success({data: scope});
1248+
}
1249+
}
1250+
},
12561251

12571252
protocol: {
12581253
label: 'label.protocol',
@@ -3514,6 +3509,11 @@
35143509
array1.push("&name=" + todb(args.data.primaryStorage.name));
35153510
array1.push("&scope=" + todb(args.data.primaryStorage.scope));
35163511

3512+
//zone-wide-primary-storage is supported only for KVM and VMWare
3513+
if(args.data.primaryStorage.scope == "zone") {
3514+
array1.push("&hypervisor=" + todb(args.data.returnedCluster.hypervisortype)); //hypervisor type of the hosts in zone that will be attached to this storage pool. KVM, VMware supported as of now.
3515+
}
3516+
35173517
var server = args.data.primaryStorage.server;
35183518
var url = null;
35193519
if (args.data.primaryStorage.protocol == "nfs") {

0 commit comments

Comments
 (0)