Package com.vmware.vim25

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


  @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

    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

  @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

  @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

  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

    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

  @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

  @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 host2DatastoreTraversal = new TraversalSpec();
      host2DatastoreTraversal.setType("HostSystem");
      host2DatastoreTraversal.setPath("datastore");
      host2DatastoreTraversal.setName("host2DatastoreTraversal");
View Full Code Here

  }

  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

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.