DaanHoogland commented on code in PR #7692: URL: https://github.com/apache/cloudstack/pull/7692#discussion_r1282719146
########## api/src/main/java/com/cloud/hypervisor/Hypervisor.java: ########## @@ -75,6 +75,16 @@ public static HypervisorType getType(String hypervisor) { hypervisorTypeMap.getOrDefault(hypervisor.toLowerCase(Locale.ROOT), HypervisorType.None)); } + /** + * Returns the display name of a hypervisor type in case the custom hypervisor is used, + * using the 'hypervisor.custom.display.name' setting. Otherwise, returns hypervisor name + */ + public static String getHypervisorDisplayName(HypervisorType hypervisorType) { + return hypervisorType != Hypervisor.HypervisorType.Custom ? + hypervisorType.toString() : + HypervisorGuru.HypervisorCustomDisplayName.value(); + } Review Comment: this could be an instance method and doesn't have to be static. ```suggestion public String getHypervisorDisplayName() { return ! Hypervisor.HypervisorType.Custom.equals(this) ? this.toString() : HypervisorGuru.HypervisorCustomDisplayName.value(); } ``` -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org