Package org.jclouds.compute.domain

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


    when(serviceContextFactory.createContext((String) any(), (String) any(), (String) any()
        (Iterable<? extends Module>) any(), (Properties) any())).thenReturn(serviceContext);
    when(serviceContext.getComputeService()).thenReturn(computeService);
    when(computeService.templateBuilder()).thenReturn(templateBuilder);
    when(templateBuilder.options((TemplateOptions) any())).thenReturn(templateBuilder);
    when(templateBuilder.build()).thenReturn(template);
   
    // here is a scenario when jt+nn fails once, then the retry is successful
    // and from the dn+tt one node fails, then the retry is successful
    Map<Set<String>, Stack<Integer>> reaction = Maps.newHashMap();
View Full Code Here


    when(serviceContextFactory.createContext((String) any(), (String) any(), (String) any()
        (Iterable<? extends Module>) any(), (Properties) any())).thenReturn(serviceContext);
    when(serviceContext.getComputeService()).thenReturn(computeService);
    when(computeService.templateBuilder()).thenReturn(templateBuilder);
    when(templateBuilder.options((TemplateOptions) any())).thenReturn(templateBuilder);
    when(templateBuilder.build()).thenReturn(template);
   
    // here is a scenario when jt+nn does not fail
    // but the dn+tt one node fails 3, then in the retry fails 2
    // at the end result, the cluster will fail, throwing IOException
View Full Code Here

        Optional<AdminAccess> adminAccess = ToAdminAccess.apply(options);
        if (adminAccess.isPresent()) {
            templateOptions.runScript(adminAccess.get());
        }
        builder = builder.options(templateOptions);
        return builder.build();
    }


    /**
 
View Full Code Here

                    // node. ex. you can connect via ssh publicip
                    Statement bootInstructions = AdminAccess.standard();

                    // to run commands as root, we use the runScript option in the
                    // template.
                    templateBuilder.options(runScript(bootInstructions));

                    NodeMetadata node =
                            getOnlyElement(compute.createNodesInGroup(groupName, 1,
                                    templateBuilder.build()));
                    System.out.printf("<< node %s: %s%n", node.getId(),
View Full Code Here

            // node. ex. you can connect via ssh publicip
            Statement bootInstructions = AdminAccess.standard();

            // to run commands as root, we use the runScript option in the template.
            if(provider.equalsIgnoreCase("virtualbox"))
               templateBuilder.options(overrideLoginUser(loginUser).runScript(bootInstructions));
            else
               templateBuilder.options(runScript(bootInstructions));
           
            NodeMetadata node = getOnlyElement(compute.createNodesInGroup(groupName, 1, templateBuilder.build()));
            System.out.printf("<< node %s: %s%n", node.getId(),
View Full Code Here

            // to run commands as root, we use the runScript option in the template.
            if(provider.equalsIgnoreCase("virtualbox"))
               templateBuilder.options(overrideLoginUser(loginUser).runScript(bootInstructions));
            else
               templateBuilder.options(runScript(bootInstructions));
           
            NodeMetadata node = getOnlyElement(compute.createNodesInGroup(groupName, 1, templateBuilder.build()));
            System.out.printf("<< node %s: %s%n", node.getId(),
                  concat(node.getPrivateAddresses(), node.getPublicAddresses()));
View Full Code Here

      Provider<TemplateBuilder> templateBuilderProvider = createMock(Provider.class);
      TemplateBuilder defaultTemplate = createMock(TemplateBuilder.class);
      GetImageStrategy getImageStrategy = createMock(GetImageStrategy.class);

      expect(templateBuilderProvider.get()).andReturn(defaultTemplate);
      expect(defaultTemplate.options(from)).andReturn(defaultTemplate);
      expect(defaultTemplate.build()).andReturn(null);
      expect(optionsProvider.get()).andReturn(from).atLeastOnce();

      replay(defaultTemplate, defaultLocation, optionsProvider, templateBuilderProvider, getImageStrategy);
View Full Code Here

   @Override
   public Template build() {
      if (nothingChangedExceptOptions()) {
         TemplateBuilder defaultTemplate = defaultTemplateProvider.get();
         if (options != null)
            defaultTemplate.options(options);
         return defaultTemplate.build();
      }

      if (options == null)
         options = optionsProvider.get();
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.