nvazquez commented on code in PR #12802:
URL: https://github.com/apache/cloudstack/pull/12802#discussion_r2963639240
##########
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:
##########
@@ -351,6 +351,21 @@ private UnmanagedInstanceResponse
createUnmanagedInstanceResponse(UnmanagedInsta
if (host != null) {
response.setHostId(host.getUuid());
response.setHostName(host.getName());
+ if (host.getHypervisorType() != null) {
+ response.setHypervisor(host.getHypervisorType().toString());
+ }
+ response.setHypervisorVersion(host.getHypervisorVersion());
+ } else {
+ // In case the unmanaged instance is on an external host
+ if (instance.getHostName() != null) {
+ response.setHostName(instance.getHostName());
+ }
+ if (instance.getHostHypervisorVersion() != null) {
+
response.setHypervisorVersion(instance.getHostHypervisorVersion());
+ }
+ if (instance.getHypervisorType() != null) {
+ response.setHypervisor(instance.getHypervisorType());
+ }
}
Review Comment:
Fixed, actually reusing the one from ApiResponseHelper
--
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]