Examples of templateBuilder()


Examples of org.jclouds.compute.ComputeService.templateBuilder()

    public void start(String id, NodeLauncherConfig cfg) throws Exception {
        JcloudsNodeLauncherConfig config = (JcloudsNodeLauncherConfig) cfg;
        m_currentConfig = config;

        ComputeService computeService = config.getComputeService();
        TemplateBuilder template = computeService.templateBuilder()
                .imageId(config.getImageId())
                .hardwareId(config.getHardwareId())
                .locationId(config.getLocation());

        int[] extraPorts = parseExtraPorts(config.getExtraPorts());
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

      properties.setProperty("oauth.identity", "MOMMA");
      properties.setProperty("oauth.credential", "MiA");

      ComputeService client = requestsSendResponses(ImmutableMap.<HttpRequest, HttpResponse>of(), createModule(),
              properties);
      Template template = client.templateBuilder().build();
      Template toMatch = client.templateBuilder().imageId(template.getImage().getId()).build();
      assertEquals(toMatch.getImage(), template.getImage());
   }

   @Test
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

      properties.setProperty("oauth.credential", "MiA");

      ComputeService client = requestsSendResponses(ImmutableMap.<HttpRequest, HttpResponse>of(), createModule(),
              properties);
      Template template = client.templateBuilder().build();
      Template toMatch = client.templateBuilder().imageId(template.getImage().getId()).build();
      assertEquals(toMatch.getImage(), template.getImage());
   }

   @Test
   public void testTemplateMatch() throws Exception {
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

              .put(LIST_MACHINE_TYPES_REQUEST, LIST_MACHINE_TYPES_RESPONSE)
              .put(LIST_CENTRAL1B_MACHINE_TYPES_REQUEST, LIST_CENTRAL1B_MACHINE_TYPES_RESPONSE)
              .build();

      ComputeService client = requestsSendResponses(requestResponseMap);
      Template template = client.templateBuilder().build();
      Hardware defaultSize = client.templateBuilder().build().getHardware();

      Hardware smallest = client.templateBuilder().smallest().build().getHardware();
      assertEquals(defaultSize, smallest);
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

              .put(LIST_CENTRAL1B_MACHINE_TYPES_REQUEST, LIST_CENTRAL1B_MACHINE_TYPES_RESPONSE)
              .build();

      ComputeService client = requestsSendResponses(requestResponseMap);
      Template template = client.templateBuilder().build();
      Hardware defaultSize = client.templateBuilder().build().getHardware();

      Hardware smallest = client.templateBuilder().smallest().build().getHardware();
      assertEquals(defaultSize, smallest);

      Hardware fastest = client.templateBuilder().fastest().build().getHardware();
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

      ComputeService client = requestsSendResponses(requestResponseMap);
      Template template = client.templateBuilder().build();
      Hardware defaultSize = client.templateBuilder().build().getHardware();

      Hardware smallest = client.templateBuilder().smallest().build().getHardware();
      assertEquals(defaultSize, smallest);

      Hardware fastest = client.templateBuilder().fastest().build().getHardware();
      assertNotNull(fastest);
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

      Hardware defaultSize = client.templateBuilder().build().getHardware();

      Hardware smallest = client.templateBuilder().smallest().build().getHardware();
      assertEquals(defaultSize, smallest);

      Hardware fastest = client.templateBuilder().fastest().build().getHardware();
      assertNotNull(fastest);

      assertEquals(client.listHardwareProfiles().size(), 5);

      Template toMatch = client.templateBuilder()
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

      Hardware fastest = client.templateBuilder().fastest().build().getHardware();
      assertNotNull(fastest);

      assertEquals(client.listHardwareProfiles().size(), 5);

      Template toMatch = client.templateBuilder()
              .imageId(template.getImage().getId())
              .build();
      assertEquals(toMatch.getImage(), template.getImage());
   }
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

    Payload bootScript = newStringPayload(runUrls(clusterSpec.getRunUrlBase(),
      "sun/java/install",
      "apache/zookeeper/install"));
   
    TemplateBuilder templateBuilder = computeService.templateBuilder()
      .options(runScript(bootScript)
      .installPrivateKey(clusterSpec.getPrivateKey())
      .authorizePublicKey(clusterSpec.getPublicKey()));
   
    new TemplateBuilderStrategy().configureTemplateBuilder(clusterSpec,
View Full Code Here

Examples of org.jclouds.compute.ComputeService.templateBuilder()

    Payload bootScript = newStringPayload(runUrls(clusterSpec.getRunUrlBase(),
        "sun/java/install",
        "apache/cassandra/install"));

    TemplateBuilder templateBuilder = computeService.templateBuilder()
        .options(
            runScript(bootScript).installPrivateKey(
                clusterSpec.getPrivateKey()).authorizePublicKey(
                clusterSpec.getPublicKey()));
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.