Examples of FormatInfo


Examples of com.cloud.storage.template.Processor.FormatInfo

            Map<String, Object> params = new HashMap<String, Object>();
            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor qcow2Processor = new QCOW2Processor();
            qcow2Processor.configure("QCOW2 Processor", params);
            FormatInfo info = qcow2Processor.process(templatePath, null,
                    tmplName);

            TemplateLocation loc = new TemplateLocation(_storage, templatePath);
            loc.create(1, true, tmplName);
            loc.addFormat(info);
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor qcow2Processor = new QCOW2Processor();

            qcow2Processor.configure("QCOW2 Processor", params);

            FormatInfo info = qcow2Processor.process(tmpltPath, null,
                    cmd.getUniqueName());

            TemplateLocation loc = new TemplateLocation(_storage, tmpltPath);
            loc.create(1, true, cmd.getUniqueName());
            loc.addFormat(info);
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

        }

        for (ImageFormat format : ImageFormat.values()) {
            String ext = _props.getProperty(format.getFileExtension());
            if (ext != null) {
                FormatInfo info = new FormatInfo();
                info.format = format;
                info.filename = _props.getProperty(format.getFileExtension() + ".filename");
                if( info.filename == null ) {
                    continue;
                }
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

    }

    protected FormatInfo deleteFormat(ImageFormat format) {
        Iterator<FormatInfo> it = _formats.iterator();
        while (it.hasNext()) {
            FormatInfo info = it.next();
            if (info.format == format) {
                it.remove();
                _props.remove(format.getFileExtension());
                _props.remove(format.getFileExtension() + ".filename");
                _props.remove(format.getFileExtension() + ".size");
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

    String imgPath = templatePath + File.separator + templateName + "." + ImageFormat.RAW.getFileExtension();
    if (!_storage.exists(imgPath)) {
      s_logger.debug("Unable to find raw image:" + imgPath);
      return null;
    }
        FormatInfo info = new FormatInfo();
        info.format = ImageFormat.RAW;
        info.filename = templateName + "." + ImageFormat.RAW.getFileExtension();
        info.size = _storage.getSize(imgPath);
        info.virtualSize = info.size;
        s_logger.debug("Process raw image " + info.filename + " successfully");
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

            Map<String, Object> params = new HashMap<String, Object>();
            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor qcow2Processor = new QCOW2Processor();
            qcow2Processor.configure("QCOW2 Processor", params);
            FormatInfo info = qcow2Processor.process(templatePath, null,
                    tmplName);

            TemplateLocation loc = new TemplateLocation(_storage, templatePath);
            loc.create(1, true, tmplName);
            loc.addFormat(info);
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor qcow2Processor = new QCOW2Processor();

            qcow2Processor.configure("QCOW2 Processor", params);

            FormatInfo info = qcow2Processor.process(tmpltPath, null,
                    cmd.getUniqueName());

            TemplateLocation loc = new TemplateLocation(_storage, tmpltPath);
            loc.create(1, true, cmd.getUniqueName());
            loc.addFormat(info);
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

            Map<String, Object> params = new HashMap<String, Object>();
            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor qcow2Processor = new QCOW2Processor();
            qcow2Processor.configure("QCOW2 Processor", params);
            FormatInfo info = qcow2Processor.process(templatePath, null, tmplName);

            TemplateLocation loc = new TemplateLocation(_storage, templatePath);
            loc.create(1, true, tmplName);
            loc.addFormat(info);
            loc.save();
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor qcow2Processor = new QCOW2Processor();

            qcow2Processor.configure("QCOW2 Processor", params);

            FormatInfo info = qcow2Processor.process(tmpltPath, null, cmd.getUniqueName());

            TemplateLocation loc = new TemplateLocation(_storage, tmpltPath);
            loc.create(1, true, cmd.getUniqueName());
            loc.addFormat(info);
            loc.save();
View Full Code Here

Examples of com.cloud.storage.template.Processor.FormatInfo

            Map<String, Object> params = new HashMap<String, Object>();
            params.put(StorageLayer.InstanceConfigKey, _storage);
            Processor processor = new VhdProcessor();

            processor.configure("Vhd Processor", params);
            FormatInfo info = processor.process(destPath, null, templateUuid);

            TemplateLocation loc = new TemplateLocation(_storage, destPath);
            loc.create(1, true, templateUuid);
            loc.addFormat(info);
            loc.save();
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.