Package com.cloud.storage.template

Examples of com.cloud.storage.template.S3TemplateDownloader


            } else {
                // for s3 and swift, we skip post download step and just set
                // status to trigger callback.
                td.setStatus(Status.POST_DOWNLOAD_FINISHED);
                // set template size for S3
                S3TemplateDownloader std = (S3TemplateDownloader) td;
                long size = std.totalBytes;
                DownloadJob dnld = jobs.get(jobId);
                dnld.setTemplatesize(size);
                dnld.setTemplatePhysicalSize(size);
                dnld.setTmpltPath(std.getDownloadLocalPath()); // update template path to include file name.
            }
            dj.cleanup();
            break;
        default:
            break;
View Full Code Here


            throw new CloudRuntimeException("URI is incorrect: " + url);
        }
        TemplateDownloader td;
        if ((uri != null) && (uri.getScheme() != null)) {
            if (uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https")) {
                td = new S3TemplateDownloader(s3, url, installPathPrefix, new Completion(jobId), maxTemplateSizeInBytes, user, password, proxy,
                        resourceType);
            } else {
                throw new CloudRuntimeException("Scheme is not supported " + url);
            }
        } else {
View Full Code Here

            } else {
                // for s3 and swift, we skip post download step and just set
                // status to trigger callback.
                td.setStatus(Status.POST_DOWNLOAD_FINISHED);
                // set template size for S3
                S3TemplateDownloader std = (S3TemplateDownloader)td;
                long size = std.totalBytes;
                DownloadJob dnld = jobs.get(jobId);
                dnld.setTemplatesize(size);
                dnld.setTemplatePhysicalSize(size);
                dnld.setTmpltPath(std.getDownloadLocalPath()); // update template path to include file name.
            }
            dj.cleanup();
            break;
        default:
            break;
View Full Code Here

            throw new CloudRuntimeException("URI is incorrect: " + url);
        }
        TemplateDownloader td;
        if ((uri != null) && (uri.getScheme() != null)) {
            if (uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https")) {
                td = new S3TemplateDownloader(s3, url, installPathPrefix, new Completion(jobId), maxTemplateSizeInBytes, user, password, proxy, resourceType);
            } else {
                throw new CloudRuntimeException("Scheme is not supported " + url);
            }
        } else {
            throw new CloudRuntimeException("Unable to download from URL: " + url);
View Full Code Here

            } else {
                // for s3 and swift, we skip post download step and just set
                // status to trigger callback.
                td.setStatus(Status.POST_DOWNLOAD_FINISHED);
                // set template size for S3
                S3TemplateDownloader std = (S3TemplateDownloader) td;
                long size = std.totalBytes;
                DownloadJob dnld = jobs.get(jobId);
                dnld.setTemplatesize(size);
                dnld.setTemplatePhysicalSize(size);
                dnld.setTmpltPath(std.getDownloadLocalPath()); // update template path to include file name.
            }
            dj.cleanup();
            break;
        default:
            break;
View Full Code Here

            throw new CloudRuntimeException("URI is incorrect: " + url);
        }
        TemplateDownloader td;
        if ((uri != null) && (uri.getScheme() != null)) {
            if (uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https")) {
                td = new S3TemplateDownloader(s3, url, installPathPrefix, new Completion(jobId), maxTemplateSizeInBytes, user, password, proxy,
                        resourceType);
            } else {
                throw new CloudRuntimeException("Scheme is not supported " + url);
            }
        } else {
View Full Code Here

TOP

Related Classes of com.cloud.storage.template.S3TemplateDownloader

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.