Examples of PropertySpec


Examples of com.vmware.vim.binding.vim.vApp.PropertySpec

    * if all are matched, do nothing.
    */
   private void updateInRecoveryProperty() {
      PropertyInfo[] current = cms.getVAppConfig().getProperty();
      int index = -1;
      PropertySpec propSpec = null;
      if (current != null) {
         index = InRecoveryPropertyDefinition.find(current);
      }
      if (index == -1) {
         //not found, should add this property
         propSpec = new PropertySpecImpl();
         PropertyInfo prop = InRecoveryPropertyDefinition.getProp();
         prop.setKey(current == null ? 0 : current.length);
         propSpec.setInfo(prop);
         propSpec.setOperation(Operation.add);
      } else if (!InRecoveryPropertyDefinition.match(current[index])) {
         //not match the latest definition, update
         propSpec = new PropertySpecImpl();
         PropertyInfo prop = InRecoveryPropertyDefinition.getProp();
         prop.setKey(index);
         propSpec.setInfo(prop);
         propSpec.setOperation(Operation.edit);
      }
      if (propSpec != null) {
         final ConfigSpec config = new ConfigSpecImpl();
         VmConfigSpec spec = new VmConfigSpecImpl();
         spec.setProperty(new PropertySpec[]{propSpec});
View Full Code Here

Examples of com.vmware.vim.binding.vmodl.query.PropertyCollector.PropertySpec

    * which designates an arrival of a new event.
    *
    * @return FilterSpec
    */
   private FilterSpec createEventPFS() {
      PropertySpec propSpec = new PropertySpec();
      propSpec.setAll(false);
      propSpec.setPathSet(new String[] { "latestPage" });
      propSpec.setType(MoUtil.getTypeName(eventHistoryCollectorMoRef));

      ObjectSpec objSpec = new ObjectSpec();
      objSpec.setObj(eventHistoryCollectorMoRef);
      objSpec.setSkip(false);
      objSpec.setSelectSet(new SelectionSpec[] { });
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

 
  public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR: " + _mor.get_value() + ", properties: " + new Gson().toJson(propertyPaths));
   
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("VirtualMachine");
    pSpec.setPathSet(propertyPaths);
   
      TraversalSpec host2VmTraversal = new TraversalSpec();
      host2VmTraversal.setType("HostSystem");
      host2VmTraversal.setPath("vm");
      host2VmTraversal.setName("host2VmTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

  @Override
  public ObjectContent[] getDatastorePropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target MOR: " + _mor.get_value() + ", properties: " + new Gson().toJson(propertyPaths));

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Datastore");
    pSpec.setPathSet(propertyPaths);
   
      TraversalSpec host2DatastoreTraversal = new TraversalSpec();
      host2DatastoreTraversal.setType("HostSystem");
      host2DatastoreTraversal.setPath("datastore");
      host2DatastoreTraversal.setName("host2DatastoreTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

    assert(hostNetMo != null);
    hostNetMo.removePortGroup(portGroupName);
  }
 
  public ManagedObjectReference getNetworkMor(String portGroupName) throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Network");
    pSpec.setPathSet(new String[] {"summary.name"});
   
      TraversalSpec host2NetworkTraversal = new TraversalSpec();
      host2NetworkTraversal.setType("HostSystem");
      host2NetworkTraversal.setPath("network");
      host2NetworkTraversal.setName("host2NetworkTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

  @Override
  public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR: " + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("VirtualMachine");
    pSpec.getPathSet().addAll(Arrays.asList(propertyPaths));

      TraversalSpec host2VmFolderTraversal = new TraversalSpec();
      host2VmFolderTraversal.setType("HostSystem");
      host2VmFolderTraversal.setPath("vm");
      host2VmFolderTraversal.setName("host2VmFolderTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

  @Override
  public ObjectContent[] getDatastorePropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target MOR: " + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Datastore");
        pSpec.getPathSet().addAll(Arrays.asList(propertyPaths));

      TraversalSpec cluster2DatastoreTraversal = new TraversalSpec();
      cluster2DatastoreTraversal.setType("ClusterComputeResource");
      cluster2DatastoreTraversal.setPath("datastore");
      cluster2DatastoreTraversal.setName("cluster2DatastoreTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

  private ObjectContent[] getHostPropertiesOnCluster(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() on Host properties. target MOR: " + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("HostSystem");
        pSpec.getPathSet().addAll(Arrays.asList(propertyPaths));

      TraversalSpec cluster2HostTraversal = new TraversalSpec();
      cluster2HostTraversal.setType("ClusterComputeResource");
      cluster2HostTraversal.setPath("host");
      cluster2HostTraversal.setName("cluster2HostTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

    assert(hostNetMo != null);
    hostNetMo.removePortGroup(portGroupName);
  }

  public ManagedObjectReference getNetworkMor(String portGroupName) throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Network");
    pSpec.getPathSet().add("summary.name");

      TraversalSpec host2NetworkTraversal = new TraversalSpec();
      host2NetworkTraversal.setType("HostSystem");
      host2NetworkTraversal.setPath("network");
      host2NetworkTraversal.setName("host2NetworkTraversal");
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

  @Override
    public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR: " + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("VirtualMachine");
    pSpec.getPathSet().addAll(Arrays.asList(propertyPaths));

      TraversalSpec host2VmTraversal = new TraversalSpec();
      host2VmTraversal.setType("HostSystem");
      host2VmTraversal.setPath("vm");
      host2VmTraversal.setName("host2VmTraversal");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.