VMware Cloud Community
PavanHCL
Contributor
Contributor

vSAN property values are comming as null after vCenter migration

isDrsEnabled and isHaEnabled values from VsanClusterHealthSummary.getGenericCluster() service call coming as null, after vCenter migration. 

code snipet below for reference:

VsanClusterHealthSummary summary = healthPort.vsanQueryVcClusterHealthSummary(clusterHealthSystem,  clusterObj,  null,  null, false,             fields, true, "defaultView",null); 

       properties.setStatus(summary.getOverallHealth());

        properties.setHealthDescription(summary.getOverallHealthDescription());

       VsanGenericClusterBestPracticeHealth bestPracticeHealth = summary.getGenericCluster();

//bestPracticeHealth is always null       

if (bestPracticeHealth != null) {

            properties.setDrsEnabled(Boolean.valueOf(bestPracticeHealth.isDrsEnabled()));

            properties.setHaEnabled(Boolean.valueOf(bestPracticeHealth.isHaEnabled()));

        } else {

            LOG.debug("Best Practice Health is null on cluster.");

        }

Please let me know if there is any change in the API or suggest if there any other way we can get those values. 

VsanClusterHealthSummary summary = healthPort.vsanQueryVcClusterHealthSummary(clusterHealthSystem, // managed
                                                                                                           // object
                                                                                                           // reference
                clusterObj, // reference to cluster
                null, // VmCreateTimeout
                null, // ObjectUUIDs
                false, // Include Object UUIDs
                fields, // fields
                true, // fetchfromcache
                "defaultView", // perspective
                null); // hosts
 
        properties.setStatus(summary.getOverallHealth());
        properties.setHealthDescription(summary.getOverallHealthDescription());
 
        VsanGenericClusterBestPracticeHealth bestPracticeHealth = summary.getGenericCluster();
 
        if (bestPracticeHealth != null) {
            properties.setDrsEnabled(Boolean.valueOf(bestPracticeHealth.isDrsEnabled()));
            properties.setHaEnabled(Boolean.valueOf(bestPracticeHealth.isHaEnabled()));
        } else {
            LOG.debug("Best Practice Health is null on cluster.");
        }
 
0 Kudos
0 Replies