Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.TemplateBuilder.imageId()


              + iaasInfo.getName());
    }

    TemplateBuilder templateBuilder = iaasInfo.getComputeService()
        .templateBuilder();
    templateBuilder.imageId(iaasInfo.getImage());
        if(!(iaasInfo instanceof IaasProvider)) {
           templateBuilder.locationId(iaasInfo.getType());
        }
       
        // to avoid creation of template objects in each and every time, we
View Full Code Here


        if (locationId != null) {
            builder.locationId(locationId);
        }
        if (imageId != null) {
            builder.imageId(imageId);
        }
        if (hardwareId != null) {
            builder.hardwareId(hardwareId);
        }
View Full Code Here

      } catch (Exception ex) {
         // Expected path
      }

      // A second call using the imageId will fallback to the GetImageStrategy and populate the image in the cache.
      assertNotNull(templateBuilder.imageId(image.getId()).build());

      // The third call will succeed, as the previous one should have populated the image in the cache.
      templateBuilder.imageId(null); // Clear all criteria
      Template template = templateBuilder.osNameMatches(image.getOperatingSystem().getName()).build();
      assertEquals(template.getImage().getId(), image.getId());
View Full Code Here

      // A second call using the imageId will fallback to the GetImageStrategy and populate the image in the cache.
      assertNotNull(templateBuilder.imageId(image.getId()).build());

      // The third call will succeed, as the previous one should have populated the image in the cache.
      templateBuilder.imageId(null); // Clear all criteria
      Template template = templateBuilder.osNameMatches(image.getOperatingSystem().getName()).build();
      assertEquals(template.getImage().getId(), image.getId());

      // Verify this is called only once, as the third call will already find the image in the cache
      verify(getImageStrategy);
View Full Code Here

      }
      if (locationId != null) {
         builder.locationId(locationId);
      }
      if (imageId != null) {
         builder.imageId(imageId);
      }
      if (hardwareId != null) {
         builder.hardwareId(hardwareId);
      }
View Full Code Here

        if (locationId != null) {
            builder.locationId(locationId);
        }
        if (imageId != null) {
            builder.imageId(imageId);
        }
        if (hardwareId != null) {
            builder.hardwareId(hardwareId);
        }
View Full Code Here

      TemplateBuilder templateBuilder = context.getComputeService().templateBuilder();
      //templateBuilder.minDisk(15d);
      //templateBuilder.hardwareId("cpu=1,memory=4096,disk=100,type=SAN");
      //templateBuilder.hardwareId("cpu=1,memory=4096,disk=100,type=LOCAL");
      templateBuilder.imageId("CENTOS_6_64");
      //templateBuilder.osFamily(OsFamily.CENTOS);
      //templateBuilder.imageId("7bcd78dc-eb11-4e1b-8d93-111c62ed5fd1");
      //templateBuilder.locationId("dal01");
      //templateBuilder.minRam(8192);
View Full Code Here

        if (locationId != null) {
            builder.locationId(locationId);
        }
        if (imageId != null) {
            builder.imageId(imageId);
        }
        if (hardwareId != null) {
            builder.hardwareId(hardwareId);
        }
View Full Code Here

              .modules(ImmutableSet.of(new SLF4JLoggingModule(),
                      new SshjSshClientModule()))
              .build(ComputeServiceContext.class);

      TemplateBuilder templateBuilder = context.getComputeService().templateBuilder();
      templateBuilder.imageId("CENTOS_6_64");
      templateBuilder.locationId("dal01");

      Template template = templateBuilder.build();
      // test passing custom options
      SoftLayerTemplateOptions options = template.getOptions().as(SoftLayerTemplateOptions.class);
View Full Code Here

      } catch (Exception ex) {
         // Expected path
      }

      // A second call using the imageId will fallback to the GetImageStrategy and populate the image in the cache.
      assertNotNull(templateBuilder.imageId(image.getId()).build());

      // The third call will succeed, as the previous one should have populated the image in the cache.
      templateBuilder.imageId(null); // Clear all criteria
      Template template = templateBuilder.osNameMatches(image.getOperatingSystem().getName()).build();
      assertEquals(template.getImage().getId(), image.getId());
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.