rafaelweingartner commented on a change in pull request #2340:
CLOUDSTACK-10106: GPU/vGPU Support on VMWare
URL: https://github.com/apache/cloudstack/pull/2340#discussion_r153313840
##########
File path:
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -5101,14 +5209,32 @@ private void fillHostNetworkInfo(VmwareContext
serviceContext, StartupRoutingCom
}
}
- private void fillHostDetailsInfo(VmwareContext serviceContext, Map<String,
String> details) throws Exception {
+ private void fillHostDetailsInfo(final Map<String, String> details) throws
Exception {
VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext());
if (hyperHost.isHAEnabled()) {
details.put("NativeHA", "true");
}
}
+ private void fillHostGpuInfo(final StartupRoutingCommand cmd) throws
Exception {
+ final VmwareContext context = getServiceContext();
+ final VmwareHypervisorHost hyperHost = getHyperHost(context);
+ final HostMO hostMo = new HostMO(context, hyperHost.getMor());
+
+ try {
+ final HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails
= hostMo.getGPUGroupDetails();
+ cmd.setGpuGroupDetails(groupDetails);
+ if (groupDetails != null && !groupDetails.isEmpty()) {
+ cmd.setHostTags("GPU");
+ }
+ } catch (final Exception e) {
Review comment:
Can't we use a more specific exception here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services