Package com.vmware.vim.binding.vim

Examples of com.vmware.vim.binding.vim.ClusterComputeResource


   @Override
   public void modifyHASettings(RestartPriority restartPriority, IsolationResponse isolationResponse,
         VmMonitoringState vmMonitoringState) throws Exception {
      AuAssert.check(VcContext.isInTaskSession());

      ClusterComputeResource cluster = MoUtil.getManagedObject(getResourcePool().getVcCluster().getMoRef());
      DasVmSettings dasVmSettings = null;
      boolean found = false;
      DasVmConfigInfo[] dasVmConfig = cluster.getConfiguration().getDasVmConfig();
      if (dasVmConfig != null) {
         for (DasVmConfigInfo iter : dasVmConfig) {
            if (iter.getKey().equals(getMoRef())) {
               found = true;
               dasVmSettings = iter.getDasSettings();
               break;
            }
         }
      }

      if (dasVmSettings == null) {
         dasVmSettings = new DasVmSettingsImpl();
      }
      if (restartPriority != null) {
         dasVmSettings.setRestartPriority(restartPriority.name());
      }
      if (isolationResponse != null) {
         dasVmSettings.setIsolationResponse(isolationResponse.name());
      }

      VmToolsMonitoringSettings vmToolsMonitoringSettings = dasVmSettings.getVmToolsMonitoringSettings();
      if (vmToolsMonitoringSettings == null) {
         // Use the default settings for VmToolsMonitoringSettings
         vmToolsMonitoringSettings = cluster.getConfiguration().getDasConfig().getDefaultVmSettings().getVmToolsMonitoringSettings();
         dasVmSettings.setVmToolsMonitoringSettings(vmToolsMonitoringSettings);
      }

      if (vmMonitoringState != null) {
         vmToolsMonitoringSettings.setVmMonitoring(vmMonitoringState.name());
View Full Code Here


   @Override
   public VcTask disableDrs() throws Exception {
      AuAssert.check(VcContext.isInTaskSession());

      ClusterComputeResource cluster = MoUtil.getManagedObject(getResourcePool().getVcCluster().getMoRef());
      boolean found = false;
      DrsVmConfigInfo[] drsVmConfig = cluster.getConfiguration().getDrsVmConfig();
      if (drsVmConfig != null) {
         for (DrsVmConfigInfo iter : drsVmConfig) {
            if (iter.getKey().equals(getMoRef())) {
               found = true;
               break;
View Full Code Here

         rpStack.addFirst(rp);
         rp = (ResourcePool)parent;
      }
      // Path is encoded as: [cluster]/path/to/rpName
      StringBuffer pathBuf = new StringBuffer();
      ClusterComputeResource cluster = MoUtil.getManagedObject(rp.getOwner());
      pathBuf.append('[').append(MoUtil.fromURLString(cluster.getName())).append(']');
      for (ResourcePool r : rpStack) {
         pathBuf.append("/").append(MoUtil.fromURLString(r.getName()));
      }
      return pathBuf.toString();
   }
View Full Code Here

   }

   @Override
   protected void update(ManagedObject mo) throws Exception {
      AuAssert.check(this.moRef.equals(mo._getRef()));
      ClusterComputeResource cluster = (ClusterComputeResource) mo;
      name = cluster.getName();
      summary = checkReady(cluster.getSummary());
      parent = checkReady(cluster.getParent());
      host = checkReady(cluster.getHost());
      network = checkReady(cluster.getNetwork());
      datastore = checkReady(cluster.getDatastore());
      sharedNetwork = getSharedNetworkInt();
      sharedDatastore = getSharedDatastoreInt();
      ConfigInfoEx configEx =
            (ConfigInfoEx) checkReady(cluster.getConfigurationEx());
      config = VcClusterConfig.create(configEx);
      // Update the transient dasVmConfigInfo
      vmConfigInfo = configEx.getDasVmConfig();
      haDrsIncompatReasonsForRBQual =
            VcClusterConfig.skipHADRSCheck() ? new ArrayList<String>() : config
                  .getHADRSIncompatReasons(false); // Lenient check for a minimal set of config
      haDrsIncompatReasonsForAlert =
            VcClusterConfig.skipHADRSCheck() ? new ArrayList<String>() : config
                  .getHADRSIncompatReasons(true); // Strict check, alert on each config problem
      updateRP(checkReady(cluster.getResourcePool()));
   }
View Full Code Here

   @Override
   public VcTask reconfigure(final ConfigSpecEx spec,
         final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         public VcTask body() throws Exception {
            final ClusterComputeResource cluster = getManagedObject();
            return new VcTask(TaskType.ReconfigCluster, cluster.reconfigureEx(
                  spec, true), callback);
         }
      });
      return task;
   }
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.vim.ClusterComputeResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.