DaanHoogland commented on code in PR #12802:
URL: https://github.com/apache/cloudstack/pull/12802#discussion_r2959122058
##########
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:
new method, willbe usable in
[ApiResponseHelperL5342](https://github.com/apache/cloudstack/pull/12802/changes#diff-2f016edb6fdd628254c594507189d8c184508f58d7fd329e1b2fec17023c374eR5342)
as well.
--
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]