Examples of PropertySpec


Examples of com.vmware.vim25.PropertySpec

    public Pair<DatacenterMO, String> getOwnerDatacenter() throws Exception {
        if (_ownerDc != null)
            return _ownerDc;

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

        TraversalSpec folderParentTraversal = new TraversalSpec();
        folderParentTraversal.setType("Folder");
        folderParentTraversal.setPath("parent");
        folderParentTraversal.setName("folderParentTraversal");
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

    public 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

    }

    public Pair<DatastoreMO, String> getOwnerDatastore(String dsFullPath) throws Exception {
        String dsName = DatastoreFile.getDatastoreNameFromPath(dsFullPath);

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

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

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

Examples of com.vmware.vim25.PropertySpec

    public ManagedObjectReference getParentMor() throws Exception {
        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

Examples of com.vmware.vim25.PropertySpec

        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

Examples of com.vmware.vim25.PropertySpec

        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

Examples of com.vmware.vim25.PropertySpec

  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
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.