Examples of PropertySpec


Examples of com.vmware.vim25.PropertySpec

    }

    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

Examples of com.vmware.vim25.PropertySpec

        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

Examples of com.vmware.vim25.PropertySpec

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

    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

Examples of com.vmware.vim25.PropertySpec

        String dcName = ocs.get(0).getPropSet().get(0).getVal().toString();
        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

Examples of com.vmware.vim25.PropertySpec

    }

    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

Examples of com.vmware.vim25.PropertySpec

    }

    public ManagedObjectReference getDvSwitchMor(ManagedObjectReference dvPortGroupMor) throws Exception {
        String dvPortGroupKey = null;
        ManagedObjectReference dvSwitchMor = null;
        PropertySpec pSpec = new PropertySpec();
        pSpec.setType("DistributedVirtualPortgroup");
        pSpec.getPathSet().add("key");
        pSpec.getPathSet().add("config.distributedVirtualSwitch");

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

Examples of com.vmware.vim25.PropertySpec

        // It will give false result if there really does not exist data-center in the inventory, however, I consider
        // this really is not possible in production deployment
        //

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

        ObjectSpec oSpec = new ObjectSpec();
        oSpec.setObj(getRootFolder());
        oSpec.setSkip(false);
        oSpec.getSelectSet().addAll(constructCompleteTraversalSpec());
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

        }
        return (T)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

Examples of com.vmware.vim25.PropertySpec

        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 = getPropCol();
        ManagedObjectReference filterSpecRef = vimPort.createFilter(propertyCollector, spec, true);
View Full Code Here

Examples of com.vmware.vim25.PropertySpec

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