cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] nitin-maharana commented on a change in pull request #2340: CLOUDSTACK-10106: GPU/vGPU Support on VMWare
Date Thu, 01 Jan 1970 00:00:00 GMT
nitin-maharana commented on a change in pull request #2340: CLOUDSTACK-10106: GPU/vGPU Support
on VMWare
URL: https://github.com/apache/cloudstack/pull/2340#discussion_r153443468
 
 

 ##########
 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:
   Sure. I will modify this.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message