Examples of images()


Examples of com.gistlabs.mechanize.document.AbstractDocument.images()

  public void testFollowingAnAbsoluteLink() {
    addPageRequest("http://www.test.com",
        newHtml("Test Page", "<img src=\"test.png\"/>"));
   
    AbstractDocument page = agent().get("http://www.test.com");
    Image image = page.images().find("*[src='test.png']");
    assertEquals("http://www.test.com/test.png", image.getAbsoluteSrc());
  }
}
View Full Code Here

Examples of com.google.api.services.compute.Compute.images()

        try {
            Storage storage = gccStackUtil.buildStorage((GccCredential) stack.getCredential(), stack);
            Compute compute = gccStackUtil.buildCompute((GccCredential) stack.getCredential(), stack.getName());
            GccTemplate template = (GccTemplate) stack.getTemplate();
            GccCredential credential = (GccCredential) stack.getCredential();
            ImageList list = compute.images().list(credential.getProjectId()).execute();
            Long time = new Date().getTime();
            if (!containsSpecificImage(list)) {
                try {
                    Bucket bucket = new Bucket();
                    bucket.setName(credential.getProjectId() + time);
View Full Code Here

Examples of com.google.api.services.compute.Compute.images()

                Image image = new Image();
                image.setName(GccImageType.DEBIAN_HACK.getImageName());
                Image.RawDisk rawDisk = new Image.RawDisk();
                rawDisk.setSource(String.format("http://storage.googleapis.com/%s/%s", credential.getProjectId() + time, TAR_NAME));
                image.setRawDisk(rawDisk);
                Compute.Images.Insert ins1 = compute.images().insert(credential.getProjectId(), image);
                ins1.execute();
            }
        } catch (IOException e) {
            LOGGER.error(String.format("Error occurs on %s stack under the setup", stack.getId()), e);
            throw new InternalServerException(e.getMessage());
View Full Code Here

Examples of com.nirima.docker.client.DockerClient.images()

        List<Container> containers = dockerClient.containers().finder().allContainers(false).list();

        if (ami == null)
            return containers.size();

        List<Image> images = dockerClient.images().finder().allImages(true).filter(ami).list();
        LOGGER.log(Level.INFO, "Images found: " + images);

        if (images.size() == 0) {
            LOGGER.log(Level.INFO, "Pulling image " + ami + " since one was not found.  This may take awhile...");
            Identifier amiId = Identifier.fromCompoundString(ami);
View Full Code Here

Examples of com.woorea.openstack.glance.Glance.images()

      // Creating a new image
      Image newImage = new Image();
      newImage.setDiskFormat("raw");
      newImage.setContainerFormat("bare");
      newImage.setName("os-java-glance-test");
      newImage = glance.images().create(newImage).execute();

      // Uploading image
      ImageUpload uploadImage = new ImageUpload(newImage);
      uploadImage.setInputStream(new ByteArrayInputStream(IMAGE_CONTENT.getBytes()));
      glance.images().upload(newImage.getId(), uploadImage).execute();
View Full Code Here

Examples of com.woorea.openstack.glance.Glance.images()

      newImage = glance.images().create(newImage).execute();

      // Uploading image
      ImageUpload uploadImage = new ImageUpload(newImage);
      uploadImage.setInputStream(new ByteArrayInputStream(IMAGE_CONTENT.getBytes()));
      glance.images().upload(newImage.getId(), uploadImage).execute();

      // Downloading the image and displaying the image content
      try {
        byte[] imgContent = new byte[IMAGE_CONTENT.length()];
        ImageDownload downloadImage = glance.images().download(newImage.getId()).execute();
View Full Code Here

Examples of com.woorea.openstack.glance.Glance.images()

      glance.images().upload(newImage.getId(), uploadImage).execute();

      // Downloading the image and displaying the image content
      try {
        byte[] imgContent = new byte[IMAGE_CONTENT.length()];
        ImageDownload downloadImage = glance.images().download(newImage.getId()).execute();
        downloadImage.getInputStream().read(imgContent, 0, imgContent.length);
        System.out.println(new String(imgContent));
      } catch (IOException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of com.woorea.openstack.glance.Glance.images()

        System.out.println(new String(imgContent));
      } catch (IOException e) {
        e.printStackTrace();
      }

      Images images = glance.images().list(false).execute();

      for (Image image : images) {
        System.out.println(glance.images().show(image.getId()).execute());
      }
View Full Code Here

Examples of com.woorea.openstack.glance.Glance.images()

      }

      Images images = glance.images().list(false).execute();

      for (Image image : images) {
        System.out.println(glance.images().show(image.getId()).execute());
      }

      glance.images().delete(newImage.getId()).execute();
    }
  }
View Full Code Here

Examples of com.woorea.openstack.glance.Glance.images()

      for (Image image : images) {
        System.out.println(glance.images().show(image.getId()).execute());
      }

      glance.images().delete(newImage.getId()).execute();
    }
  }

}
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.