Package com.vmware.vim25

Examples of com.vmware.vim25.PropertySpec


    descriptor.parse(content);
    return descriptor;
  }

  public String getSnapshotDescriptorDatastorePath() throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("VirtualMachine");
    pSpec.getPathSet().add("name");
    pSpec.getPathSet().add("config.files");

      ObjectSpec oSpec = new ObjectSpec();
      oSpec.setObj(_mor);
      oSpec.setSkip(Boolean.FALSE);
View Full Code Here


    return (ManagedObjectReference)_context.getVimClient().getDynamicProperty(
      _mor, "parent");
  }

  public String[] getNetworks() throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Network");
    pSpec.getPathSet().add("name");

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

    if(gcTagKey == 0) {
      gcTagKey = getCustomFieldKey("DistributedVirtualPortgroup", CustomFieldConstants.CLOUD_GC_DVP);
      s_logger.debug("The custom key for dvPortGroup is : " + gcTagKey);
    }

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Network");
    pSpec.getPathSet().add("name");
    pSpec.getPathSet().add("vm");
    pSpec.getPathSet().add(String.format("value[%d]", gcTagKey));

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

    return null;
  }

  public List<ObjectContent> getDatastorePropertiesOnHostDatastoreSystem(String[] propertyPaths) throws Exception {

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

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

  public ManagedObjectReference getVmFolder() throws Exception {
    return (ManagedObjectReference)_context.getVimClient().getDynamicProperty(_mor, "vmFolder");
  }

  public List<ObjectContent> getHostPropertiesOnDatacenterHostFolder(String[] propertyPaths) throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("HostSystem");
    pSpec.getPathSet().addAll(Arrays.asList(propertyPaths));

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

  }

  public List<ObjectContent> getDatastorePropertiesOnDatacenter(String[] propertyPaths) throws Exception {

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

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

      return _context.getService().retrieveProperties(_context.getPropertyCollector(), pfSpecArr);

  }

  public List<ObjectContent> getVmPropertiesOnDatacenterVmFolder(String[] propertyPaths) throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("VirtualMachine");
    pSpec.getPathSet().addAll(Arrays.asList(propertyPaths));

      TraversalSpec dc2VmFolderTraversal = new TraversalSpec();
      dc2VmFolderTraversal.setType("Datacenter");
      dc2VmFolderTraversal.setPath("vmFolder");
      dc2VmFolderTraversal.setName("dc2VmFolderTraversal");
View Full Code Here

  }

  public static Pair<DatacenterMO, String> getOwnerDatacenter(VmwareContext context,
    ManagedObjectReference morEntity) throws Exception {

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Datacenter");
    pSpec.getPathSet().add("name");

      TraversalSpec entityParentTraversal = new TraversalSpec();
      entityParentTraversal.setType("ManagedEntity");
      entityParentTraversal.setPath("parent");
      entityParentTraversal.setName("entityParentTraversal");
View Full Code Here

      return new Pair<DatacenterMO, String>(new DatacenterMO(context, ocs.get(0).getObj()), dcName);
  }


  public ManagedObjectReference getDvPortGroupMor(String dvPortGroupName) throws Exception {
        PropertySpec pSpec = new PropertySpec();
    pSpec.setType("DistributedVirtualPortgroup");
    pSpec.getPathSet().add("name");

    TraversalSpec datacenter2DvPortGroupTraversal = new TraversalSpec();
    datacenter2DvPortGroupTraversal.setType("Datacenter");
    datacenter2DvPortGroupTraversal.setPath("network");
    datacenter2DvPortGroupTraversal.setName("datacenter2DvPortgroupTraversal");
View Full Code Here

  }

  public DVPortgroupConfigInfo getDvPortGroupSpec(String dvPortGroupName) throws Exception {
    DVPortgroupConfigInfo configSpec = null;
    String nameProperty = null;
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("DistributedVirtualPortgroup");
    pSpec.getPathSet().add("name");
    pSpec.getPathSet().add("config");

      TraversalSpec datacenter2DvPortGroupTraversal = new TraversalSpec();
      datacenter2DvPortGroupTraversal.setType("Datacenter");
      datacenter2DvPortGroupTraversal.setPath("network");
      datacenter2DvPortGroupTraversal.setName("datacenter2DvPortgroupTraversal");
View Full Code Here

TOP

Related Classes of com.vmware.vim25.PropertySpec

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.