Package com.cloud.hypervisor.vmware.mo

Examples of com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO


            String fileName, String poolUuid, String exceptFileName)
                    throws Exception{
        long size = 0;
        ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost, poolUuid);
        DatastoreMO dsMo = new DatastoreMO(context, morDs);
        HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
        String datastorePath = "[" + dsMo.getName() + "]";
        HostDatastoreBrowserSearchSpec searchSpec = new HostDatastoreBrowserSearchSpec();
        FileQueryFlags fqf = new FileQueryFlags();
        fqf.setFileSize(true);
        fqf.setFileOwner(true);
        fqf.setModification(true);
        searchSpec.setDetails(fqf);
        searchSpec.setSearchCaseInsensitive(false);
        searchSpec.getMatchPattern().add(fileName);
        ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.
                searchDatastoreSubFolders(datastorePath, searchSpec);
        for(HostDatastoreBrowserSearchResults result : results){
            if (result != null) {
                List<FileInfo> info = result.getFile();
                for (FileInfo fi : info) {
View Full Code Here


    private long getVMSnapshotChainSize(VmwareContext context, VmwareHypervisorHost hyperHost,
            String fileName, ManagedObjectReference morDs, String exceptFileName)
                    throws Exception{
        long size = 0;
        DatastoreMO dsMo = new DatastoreMO(context, morDs);
        HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
        String datastorePath = "[" + dsMo.getName() + "]";
        HostDatastoreBrowserSearchSpec searchSpec = new HostDatastoreBrowserSearchSpec();
        FileQueryFlags fqf = new FileQueryFlags();
        fqf.setFileSize(true);
        fqf.setFileOwner(true);
        fqf.setModification(true);
        searchSpec.setDetails(fqf);
        searchSpec.setSearchCaseInsensitive(false);
        searchSpec.getMatchPattern().add(fileName);
        ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.searchDatastoreSubFolders(datastorePath, searchSpec);
        for (HostDatastoreBrowserSearchResults result : results) {
            if (result != null) {
                List<FileInfo> info = result.getFile();
                for (FileInfo fi : info) {
                    if (exceptFileName != null && fi.getPath().contains(exceptFileName)) {
View Full Code Here

            String fileName, String poolUuid, String exceptFileName)
                    throws Exception{
        long size = 0;
        ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost, poolUuid);
        DatastoreMO dsMo = new DatastoreMO(context, morDs);
        HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
        String datastorePath = "[" + dsMo.getName() + "]";
        HostDatastoreBrowserSearchSpec searchSpec = new HostDatastoreBrowserSearchSpec();
        FileQueryFlags fqf = new FileQueryFlags();
        fqf.setFileSize(true);
        fqf.setFileOwner(true);
        fqf.setModification(true);
        searchSpec.setDetails(fqf);
        searchSpec.setSearchCaseInsensitive(false);
        searchSpec.getMatchPattern().add(fileName);
        ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.
                searchDatastoreSubFolders(datastorePath, searchSpec);
        for(HostDatastoreBrowserSearchResults result : results){
            if (result != null) {
                List<FileInfo> info = result.getFile();
                for (FileInfo fi : info) {
View Full Code Here

    private long getVMSnapshotChainSize(VmwareContext context, VmwareHypervisorHost hyperHost,
            String fileName, ManagedObjectReference morDs, String exceptFileName)
                    throws Exception{
        long size = 0;
        DatastoreMO dsMo = new DatastoreMO(context, morDs);
        HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
        String datastorePath = "[" + dsMo.getName() + "]";
        HostDatastoreBrowserSearchSpec searchSpec = new HostDatastoreBrowserSearchSpec();
        FileQueryFlags fqf = new FileQueryFlags();
        fqf.setFileSize(true);
        fqf.setFileOwner(true);
        fqf.setModification(true);
        searchSpec.setDetails(fqf);
        searchSpec.setSearchCaseInsensitive(false);
        searchSpec.getMatchPattern().add(fileName);
        ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.
                searchDatastoreSubFolders(datastorePath, searchSpec);
        for(HostDatastoreBrowserSearchResults result : results){
            if (result != null) {
                List<FileInfo> info = result.getFile();
                for (FileInfo fi : info) {
View Full Code Here

TOP

Related Classes of com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO

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.