Package org.jclouds.compute.extensions

Examples of org.jclouds.compute.extensions.ImageExtension


      if (!service.getImageExtension().isPresent()) {
         System.out.print("Provider " + service.getContext().unwrap().getProviderMetadata().getId()
                  + " does not currently provide image creation support.");
         return null;
      }
      ImageExtension imageExtension = service.getImageExtension().get();
      ImageTemplate imageTemplate = imageExtension.buildImageTemplateFromNode(imageName, id);
      ListenableFuture<Image> imageFuture = imageExtension.createImage(imageTemplate);
      Image image = imageFuture.get();
      System.out.println("Successfully created image:" + image.getId());
      return null;
   }
View Full Code Here


            .put(createTemplate, createTemplateResponse)
            .put(createAsyncJobResult, createAsyncJobResultResponse)
            .put(getTemplate, getTemplateResponse)
            .build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("temp-template-ignore", "3239ade9-fd25-405c-8eda-59f0313a3fb0");
     
      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "3dc6ce25-a6cf-4d60-a664-3499993b511b");
   }
View Full Code Here

      requestResponseMap.put(keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess);
      requestResponseMap.put(serverDetail, serverDetailResponse).build();
      requestResponseMap.put(createImage, createImageResponse).build();
      requestResponseMap.put(getImage, getImageResponse).build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "az-1.region-a.geo-1/71752");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f5736d2a2");
   }
View Full Code Here

                       .addFormParam("Action", "DescribeImages")
                       .addFormParam("ImageId.1", "ami-be3adfd7").build());

      requestResponseMap.put(describeImageRequest, describeImagesResponse);

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "us-east-1/i-2baa5550");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "us-east-1/ami-be3adfd7");
   }
View Full Code Here

            .put(createTemplate, createTemplateResponse)
            .put(createAsyncJobResult, createAsyncJobResultResponse)
            .put(getTemplate, getTemplateResponse)
            .build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("temp-template-ignore", "3239ade9-fd25-405c-8eda-59f0313a3fb0");
     
      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "3dc6ce25-a6cf-4d60-a664-3499993b511b");
   }
View Full Code Here

      requestResponseMap.put(initialAuth, responseWithAuth);
      requestResponseMap.put(getServerDetail, getServerResponse).build();
      requestResponseMap.put(createImage, createImageResponse).build();
      requestResponseMap.put(getImage, getImageResponse).build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "1234");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "2");
   }
View Full Code Here

      requestResponseMap.put(keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess);
      requestResponseMap.put(serverDetail, serverDetailResponse).build();
      requestResponseMap.put(createImage, createImageResponse).build();
      requestResponseMap.put(getImage, getImageResponse).build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "az-1.region-a.geo-1/71752");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f5736d2a2");
   }
View Full Code Here

                       .addFormParam("Action", "DescribeImages")
                       .addFormParam("ImageId.1", "ami-be3adfd7").build());

      requestResponseMap.put(describeImageRequest, describeImagesResponse);

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "us-east-1/i-2baa5550");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "us-east-1/ami-be3adfd7");
   }
View Full Code Here

      requestResponseMap.put(initialAuth, responseWithAuth);
      requestResponseMap.put(getServerDetail, getServerResponse).build();
      requestResponseMap.put(createImage, createImageResponse).build();
      requestResponseMap.put(getImage, getImageResponse).build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "1234");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "2");
   }
View Full Code Here

      requestResponseMap.put(keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess);
      requestResponseMap.put(serverDetail, serverDetailResponse).build();
      requestResponseMap.put(createImage, createImageResponse).build();
      requestResponseMap.put(getImage, getImageResponse).build();

      ImageExtension apiThatCreatesImage = requestsSendResponses(requestResponseMap.build()).getImageExtension().get();
     
      ImageTemplate newImageTemplate = apiThatCreatesImage.buildImageTemplateFromNode("test", "az-1.region-a.geo-1/71752");

      Image image = Futures.getUnchecked(apiThatCreatesImage.createImage(newImageTemplate));
      assertEquals(image.getId(), "az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f5736d2a2");
   }
View Full Code Here

TOP

Related Classes of org.jclouds.compute.extensions.ImageExtension

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.