Package com.vmware.vim25

Examples of com.vmware.vim25.ChoiceOption


                                }
                            }

                            if (s_logger.isTraceEnabled())
                                s_logger.trace("These are the choices we can have just in case");
                            ChoiceOption choice = question.getChoice();
                            if (choice != null) {
                                for (ElementDescription info : choice.getChoiceInfo()) {
                                    if (s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here


                                            ". Message id : " + msgId + ". Message text : " + msgText + ", for safe operation we will automatically decline it.");
                                    vmMo.answerVM(question.getId(), "1");
                                }
                            }

                            ChoiceOption choice = question.getChoice();
                            if (choice != null) {
                                for (ElementDescription info : choice.getChoiceInfo()) {
                                    if (s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here

                                            ". Message id : " + msgId + ". Message text : " + msgText + ", for safe operation we will automatically decline it.");
                                    vmMo.answerVM(question.getId(), "1");
                                }
                            }

                            ChoiceOption choice = question.getChoice();
                            if (choice != null) {
                                for (ElementDescription info : choice.getChoiceInfo()) {
                                    if (s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here

                                            + ", for safe operation we will automatically decline it.");
                                    vmMo.answerVM(question.getId(), "1");
                                }
                            }

                            ChoiceOption choice = question.getChoice();
                            if(choice != null) {
                                for(ElementDescription info : choice.getChoiceInfo()) {
                                    if(s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here

                                            + ", for safe operation we will automatically decline it.");
                                    vmMo.answerVM(question.getId(), "1");
                                }
                            }

                            ChoiceOption choice = question.getChoice();
                            if (choice != null) {
                                for (ElementDescription info : choice.getChoiceInfo()) {
                                    if (s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here

                                            + ", for safe operation we will automatically decline it.");
                                    vmMo.answerVM(question.getId(), "1");
                                }
                            }

                            ChoiceOption choice = question.getChoice();
                            if(choice != null) {
                                for(ElementDescription info : choice.getChoiceInfo()) {
                                    if(s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here

                                            + ", for safe operation we will automatically decline it.");
                                    vmMo.answerVM(question.getId(), "1");
                                }
                            }

                            ChoiceOption choice = question.getChoice();
                            if (choice != null) {
                                for (ElementDescription info : choice.getChoiceInfo()) {
                                    if (s_logger.isTraceEnabled()) {
                                        s_logger.trace("Choice option key: " + info.getKey());
                                        s_logger.trace("Choice option label: " + info.getLabel());
                                    }
                                }
View Full Code Here

    // When we break cluster hosts into individual hosts used in our resource allocator,
    // we will have to populate ComputeResourceSummary by ourselves here
    //
    HostHardwareSummary hardwareSummary = getHostHardwareSummary();
   
    ComputeResourceSummary resourceSummary = new ComputeResourceSummary();
   
    // TODO: not sure how hyper-threading is counted in VMware
    short totalCores = (short)(hardwareSummary.getNumCpuCores()*hardwareSummary.getNumCpuPkgs());
    resourceSummary.setNumCpuCores(totalCores);
   
    // Note: memory here is in Byte unit
    resourceSummary.setTotalMemory(hardwareSummary.getMemorySize());
   
    // Total CPU is based on socket x core x Mhz
    int totalCpu = hardwareSummary.getCpuMhz() * totalCores;
    resourceSummary.setTotalCpu(totalCpu);

    HostListSummaryQuickStats stats = getHostQuickStats();
    if(stats.getOverallCpuUsage() == null || stats.getOverallMemoryUsage() == null)
      throw new Exception("Unable to get valid overal CPU/Memory usage data, host may be disconnected");
   
    resourceSummary.setEffectiveCpu(totalCpu - stats.getOverallCpuUsage());
   
    // Note effective memory is in MB unit
    resourceSummary.setEffectiveMemory(hardwareSummary.getMemorySize()/(1024*1024) - stats.getOverallMemoryUsage());
   
      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostHardwareSummary() done");
     
    return resourceSummary;
View Full Code Here

    ManagedObjectReference[] datastores = (ManagedObjectReference[])serviceUtil.getDynamicProperty(
      _mor, "datastore");
    List<ManagedObjectReference> l = new ArrayList<ManagedObjectReference>();
    if(datastores != null) {
      for(ManagedObjectReference mor : datastores) {
        DatastoreSummary summary = (DatastoreSummary)serviceUtil.getDynamicProperty(mor, "summary");
        if(summary.getType().equalsIgnoreCase("VMFS") && !summary.getMultipleHostAccess())
          l.add(mor);
      }
    }
    return l.toArray(new ManagedObjectReference[1]);
  }
View Full Code Here

    List<Pair<ManagedObjectReference, String>> dsList = new ArrayList<Pair<ManagedObjectReference, String>>();
   
    ObjectContent[] ocs = getDatastorePropertiesOnHyperHost(new String[] { "name", "summary" });
    if(ocs != null) {
      for(ObjectContent oc : ocs) {
        DatastoreSummary dsSummary = (DatastoreSummary)VmwareHelper.getPropValue(oc, "summary");
        if(dsSummary.getMultipleHostAccess() == false && dsSummary.isAccessible() && dsSummary.getType().equalsIgnoreCase("vmfs")) {
          ManagedObjectReference morDs = oc.getObj();
          String name = (String)VmwareHelper.getPropValue(oc, "name");
         
          dsList.add(new Pair<ManagedObjectReference, String>(morDs, name));
        }
View Full Code Here

TOP

Related Classes of com.vmware.vim25.ChoiceOption

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.