Package com.vmware.vim25

Examples of com.vmware.vim25.PropertySpec


        }
        return propertyValue;
    }

    private List<ObjectContent> retrieveMoRefProperties(ManagedObjectReference mObj, List<String> props) throws Exception {
        PropertySpec pSpec = new PropertySpec();
        pSpec.setAll(false);
        pSpec.setType(mObj.getType());
        pSpec.getPathSet().addAll(props);

        ObjectSpec oSpec = new ObjectSpec();
        oSpec.setObj(mObj);
        oSpec.setSkip(false);
        PropertyFilterSpec spec = new PropertyFilterSpec();
View Full Code Here


        ObjectSpec oSpec = new ObjectSpec();
        oSpec.setObj(objmor);
        oSpec.setSkip(Boolean.FALSE);
        spec.getObjectSet().add(oSpec);

        PropertySpec pSpec = new PropertySpec();
        pSpec.getPathSet().addAll(Arrays.asList(filterProps));
        pSpec.setType(objmor.getType());
        spec.getPropSet().add(pSpec);

        ManagedObjectReference propertyCollector = this.getPropCol();
        ManagedObjectReference filterSpecRef = vimPort.createFilter(propertyCollector, spec, true);
View Full Code Here

        if (name == null || name.length() == 0) {
            return null;
        }

        // Create PropertySpecs
        PropertySpec pSpec = new PropertySpec();
        pSpec.setType(type);
        pSpec.setAll(false);
        pSpec.getPathSet().add("name");

        ObjectSpec oSpec = new ObjectSpec();
        oSpec.setObj(root);
        oSpec.setSkip(false);
        oSpec.getSelectSet().addAll(constructCompleteTraversalSpec());
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

    return null;
  }
 
  public ObjectContent[] getDatastorePropertiesOnHostDatastoreSystem(String[] propertyPaths) throws Exception {
   
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Datastore");
    pSpec.setPathSet(propertyPaths);
   
      TraversalSpec hostDsSys2DatastoreTraversal = new TraversalSpec();
      hostDsSys2DatastoreTraversal.setType("HostDatastoreSystem");
      hostDsSys2DatastoreTraversal.setPath("datastore");
      hostDsSys2DatastoreTraversal.setName("hostDsSys2DatastoreTraversal");
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

 
  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

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.