sureshanaparti commented on code in PR #12952:
URL: https://github.com/apache/cloudstack/pull/12952#discussion_r3028849134
##########
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java:
##########
@@ -315,11 +315,11 @@ public void setUpdated(Date updated) {
public static final List<Pair<Hypervisor.HypervisorType, CPU.CPUArch>>
hypervisorList = Arrays.asList(
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.arm64),
- new Pair<>(Hypervisor.HypervisorType.VMware, null),
- new Pair<>(Hypervisor.HypervisorType.XenServer, null),
- new Pair<>(Hypervisor.HypervisorType.Hyperv, null),
- new Pair<>(Hypervisor.HypervisorType.LXC, null),
- new Pair<>(Hypervisor.HypervisorType.Ovm3, null)
+ new Pair<>(Hypervisor.HypervisorType.VMware,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.XenServer,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.Hyperv,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.LXC,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.Ovm3,
CPU.CPUArch.getDefault())
Review Comment:
ok @weizhouapache, how about replacing `hypervisorType.second() == null ?
CPU.CPUArch.amd64.getType() : hypervisorType.second().getType()` at
https://github.com/apache/cloudstack/blob/e2497cfc4df7daa13167ad2cf12e2eed782b0558/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java#L837
maybe, move it to method and use the same here and in
_getHypervisorArchKey()_
private getCPUArchType(CPU.CPUArch arch) {
if (arch == null) {
return CPU.CPUArch.amd64.getType();
}
return arch.getType();
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]