public static VcClusterConfig create(ConfigInfoEx config) {
DasConfigInfo dasConfig = config.getDasConfig();
DrsConfigInfo drsConfig = config.getDrsConfig();
DasVmSettings vmSettings = dasConfig.getDefaultVmSettings();
VmToolsMonitoringSettings toolsSettings =
vmSettings.getVmToolsMonitoringSettings();
DasAdmissionControlPolicy pol = dasConfig.getAdmissionControlPolicy();
AdmCtlPolType polType = AdmCtlPolType.getInstance(pol);
FailoverResourcesAdmissionControlPolicy resAdmCtlPol =
(pol instanceof FailoverResourcesAdmissionControlPolicy
? (FailoverResourcesAdmissionControlPolicy) pol
: null);
VmHAConfig defaultVmHAConfig = new VmHAConfig("Cluster VM default setting",
DasConfigInfo.VmMonitoringState.valueOf(dasConfig.getVmMonitoring()),
toolsSettings.getFailureInterval(),
toolsSettings.getMaxFailures(),
toolsSettings.getMaxFailureWindow(),
toolsSettings.getMinUpTime());
return new VcClusterConfig(dasConfig.getEnabled(),
dasConfig.getAdmissionControlEnabled(),
defaultVmHAConfig,
DasConfigInfo.ServiceState.valueOf(dasConfig.getHostMonitoring()),
polType,