Package io.fathom.cloud.services

Examples of io.fathom.cloud.services.ImageKey


            image = imageService.findImage(project, instance.getImageId());
            if (image == null) {
                throw new IllegalStateException("Cannot find image: " + instance.getImageId());
            }

            ImageKey imageKey = image.getUniqueKey();

            if (!host.hasImage(imageKey)) {
                // TODO: Support side-load

                BlobData imageData = imageService.getImageBlob(image);
View Full Code Here


    public void uploadImage(ImageKey imageId, BlobData imageData) throws IOException, CloudException {
        // TODO: Support side-load
        // TODO: Move to script
        // TODO: Delete tempImageId on fail

        ImageKey tempImageId = new ImageKey(UUID.randomUUID().toString());

        try (Sftp sftp = buildSftp()) {
            sftp.mkdirs(getImageTmpdir().getSshPath());

            try (RemoteTempFile tar = sftp.buildRemoteTemp()) {
View Full Code Here

            return data.getId();
        }

        @Override
        public ImageKey getUniqueKey() {
            return new ImageKey(BaseEncoding.base16().encode(data.getImageChecksum().toByteArray()));
        }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.services.ImageKey

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.