Skip to content

Commit 0af15e4

Browse files
author
Jessica Wang
committed
CLOUDSTACK-8047: UI > zone wizard > add primary storage step: (zone-wide-primary-storage) fix a bug that failed to get cluster's hypervisor value if previous step (e.g. add host step) has ever failed.
1 parent be38b97 commit 0af15e4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ui/scripts/zoneWizard.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4458,8 +4458,16 @@
44584458
array1.push("&scope=" + todb(args.data.primaryStorage.scope));
44594459

44604460
//zone-wide-primary-storage is supported only for KVM and VMWare
4461-
if (args.data.primaryStorage.scope == "zone") {
4462-
array1.push("&hypervisor=" + todb(args.data.cluster.hypervisor)); //hypervisor type of the hosts in zone that will be attached to this storage pool. KVM, VMware supported as of now.
4461+
if (args.data.primaryStorage.scope == "zone") { //hypervisor type of the hosts in zone that will be attached to this storage pool. KVM, VMware supported as of now.
4462+
if(args.data.cluster.hypervisor != undefined) {
4463+
array1.push("&hypervisor=" + todb(args.data.cluster.hypervisor));
4464+
} else if(args.data.returnedCluster.hypervisortype != undefined) {
4465+
array1.push("&hypervisor=" + todb(args.data.returnedCluster.hypervisortype));
4466+
} else {
4467+
cloudStack.dialog.notice({
4468+
message: "Error: args.data.cluster.hypervisor is undefined. So is args.data.returnedCluster.hypervisortype (zone-wide-primary-storage)"
4469+
});
4470+
}
44634471
}
44644472

44654473
var server = args.data.primaryStorage.server;

0 commit comments

Comments
 (0)