Package io.fathom.cloud.services.ImageService

Examples of io.fathom.cloud.services.ImageService.Image


        // }
        // }

        try (TempFile tempImage = imageClient.downloadImage(imageUri, imageMetadata)) {
            log.info("Creating image record");
            Image image = imageService.createImage(projectId, metadata);

            log.info("Uploading image data");
            BlobData blobData = BlobData.build(tempImage.getFile());
            image = imageService.uploadData(image, blobData);
View Full Code Here


        KeyPairData keyPair = buildKeypair();

        List<Long> securityGroupIds = buildSecurityGroups();

        Image image = buildImage();

        return startInstance(image, securityGroupIds, keyPair);
    }
View Full Code Here

    private Image buildImage() throws Exception, CloudException {
        ImageImports.Metadata metadata = imageImports.getImageMetadata(imageUrl);

        List<Image> images = imageService.listImages(project);
        Image image = null;
        for (Image i : images) {
            String imageChecksum = i.getChecksum();
            if (imageChecksum.equalsIgnoreCase(metadata.getChecksum())) {
                image = i;
                break;
            }
        }

        if (image == null) {
            log.info("Importing image from: {}", imageUrl);
            image = imageImports.importImage(project.getId(), imageUrl);
        } else {
            log.info("Found image: {}", image.getName());
        }
        return image;
    }
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        long projectId = 0;
        Image image = imageImports.importImage(projectId, imageUrl);
        log.info("Created image: " + image.getId());
    }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.services.ImageService.Image

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.