Examples of ImageImpl


Examples of io.fathom.cloud.image.ImageServiceImpl.ImageImpl

    @Inject
    ImageDataService imageDataService;

    private ImageData findImage(String id) throws CloudException {
        ImageImpl image = imageService.findImage(getProject(), Long.valueOf(id));
        if (image == null) {
            return null;
        }

        return image.getData();
    }
View Full Code Here

Examples of io.fathom.cloud.image.ImageServiceImpl.ImageImpl

    public Response createImage(File file) throws CloudException, IOException {
        if (file == null) {
            throw new IllegalArgumentException("No content supplied");
        }

        ImageImpl image;
        {
            Map<String, String> metadata = extractHeaders();
            if (metadata.containsKey("size")) {
                long size = Long.valueOf(metadata.get(ImageService.METADATA_KEY_SIZE));
                if (size != file.length()) {
                    throw new IllegalArgumentException();
                }
            }
            metadata.put("size", "" + Long.valueOf(file.length()));

            image = imageService.createImage(getProject().getId(), metadata);
        }

        {
            BlobData data = BlobData.build(file);
            image = imageService.uploadData(image, data);
        }

        WrappedImage result = new WrappedImage();
        result.image = toModel(image.getData());

        return Response.status(Status.CREATED).entity(result).type(MediaType.APPLICATION_JSON_TYPE).build();
    }
View Full Code Here

Examples of net.pterodactylus.sone.data.ImageImpl

public class ImageBuilderImpl extends AbstractImageBuilder {

  @Override
  public Image build() throws IllegalStateException {
    validate();
    return randomId ? new ImageImpl() : new ImageImpl(id);
  }
View Full Code Here

Examples of org.apache.kato.hprof.image.ImageImpl

 
  public void testNullConstructor() {
   
    try {
    new ImageImpl(null);
    fail("expected illegal argument exception");
    } catch(IllegalArgumentException iae) {
      ;
    }
   
View Full Code Here

Examples of org.jclouds.compute.domain.internal.ImageImpl

          failedNodes.put(nodeMeta, new Exception("Simulated failing node"));
          LOG.info("{} - Node failing to start: {}", roles, nodeMeta.getId());
        }
      }
      if (failedNodes.size() > 0) {
        Image image = new ImageImpl("ec2", "test", "testId", location, new URI("http://node"),
            userMetadata, new OperatingSystem(null, null, null, null, "op", true), "description",
            null, null, loginCredentials);
        Hardware hardware = new HardwareImpl("ec2", "test", "testId", location, new URI("http://node"),
                userMetadata, new ArrayList<Processor>(), 1, new ArrayList<Volume>(), null);
        Template template = new TemplateImpl(image, hardware, location, TemplateOptions.NONE);
View Full Code Here

Examples of org.jclouds.compute.domain.internal.ImageImpl

      return ImageBuilder.class.cast(super.userMetadata(userMetadata));
   }

   @Override
   public Image build() {
      return new ImageImpl(providerId, name, id, location, uri, userMetadata, tags, operatingSystem, status,
               backendStatus, description, version, defaultLoginCredentials);
   }
View Full Code Here

Examples of org.jclouds.compute.domain.internal.ImageImpl

          failedNodes.put(nodeMeta, new Exception("Simulated failing node"));
          LOG.info("{} - Node failing to start: {}", roles, nodeMeta.getId());
        }
      }
      if (failedNodes.size() > 0) {
        Image image = new ImageImpl("ec2", "test", "testId", location, new URI("http://node"),
            userMetadata, ImmutableSet.<String>of(), new OperatingSystem(null, null, null, null, "op", true),
            "description", null, null, loginCredentials);
        Hardware hardware = new HardwareImpl("ec2", "test", "testId", location, new URI("http://node"),
                userMetadata, ImmutableSet.<String>of(), new ArrayList<Processor>(), 1,
                new ArrayList<Volume>(), null);
View Full Code Here

Examples of org.jclouds.compute.domain.internal.ImageImpl

          failedNodes.put(nodeMeta, new Exception("Simulated failing node"));
          LOG.info("{} - Node failing to start: {}", roles, nodeMeta.getId());
        }
      }
      if (failedNodes.size() > 0) {
        Image image = new ImageImpl("ec2", "test", "testId", location, new URI("http://node"),
            userMetadata, ImmutableSet.<String>of(), new OperatingSystem(null, null, null, null, "op", true),
            "description", null, null, loginCredentials);
        Hardware hardware = new HardwareImpl("ec2", "test", "testId", location, new URI("http://node"),
                userMetadata, ImmutableSet.<String>of(), new ArrayList<Processor>(), 1,
                new ArrayList<Volume>(), null);
View Full Code Here

Examples of org.jclouds.compute.domain.internal.ImageImpl

      return ImageBuilder.class.cast(super.userMetadata(userMetadata));
   }

   @Override
   public Image build() {
      return new ImageImpl(providerId, name, id, location, uri, userMetadata, tags, operatingSystem, status,
               backendStatus, description, version, defaultLoginCredentials);
   }
View Full Code Here

Examples of org.jclouds.compute.domain.internal.ImageImpl

      return ImageBuilder.class.cast(super.userMetadata(userMetadata));
   }

   @Override
   public Image build() {
      return new ImageImpl(providerId, name, id, location, uri, userMetadata, tags, operatingSystem, status,
               backendStatus, description, version, defaultLoginCredentials);
   }
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.