Package org.jclouds.logging.slf4j.config

Examples of org.jclouds.logging.slf4j.config.SLF4JLoggingModule


               throw new RuntimeException("command " + command + " not stubbed");
            }

         };
      } else {
         Injector i = Guice.createInjector(new JschSshClientModule(), new SLF4JLoggingModule());
         SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
         SshClient connection;
         if (Strings.emptyToNull(sshKeyFile) != null) {
            connection = factory.create(HostAndPort.fromParts(sshHost, port), LoginCredentials.builder().user(sshUser)
                  .privateKey(Files.toString(new File(sshKeyFile), Charsets.UTF_8)).build());
View Full Code Here


       Injector i = Guice.createInjector(module(), new AbstractModule() {
         @Override
         protected void configure() {
            bindProperties(binder(), props);
         }
      }, new SLF4JLoggingModule());
      SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
      JschSshClient ssh = JschSshClient.class.cast(factory.create(HostAndPort.fromParts("localhost", 22), LoginCredentials
            .builder().user("username").password("password").build()));
      return ssh;
   }
View Full Code Here

   private void run() throws Exception {
      Properties overrides = new Properties();
      overrides.put(AWSEC2Constants.PROPERTY_EC2_AMI_QUERY, "owner-id=" + arguments.getAmiOwner() + ";state=available;image-type=machine");

      ImmutableSet<Module> modules = ImmutableSet.<Module>of(
         new SLF4JLoggingModule(), // OverThere uses SLF4J so we will as well
         new BouncyCastleCryptoModule() // needed to decrypt the password from EC2
      );
      context = ContextBuilder.newBuilder("aws-ec2")
         .credentials(arguments.getIdentity(), arguments.getCredential())
         .overrides(overrides)
View Full Code Here

        long scriptTimeout = TimeUnit.MILLISECONDS.convert(20, TimeUnit.MINUTES);
        properties.setProperty(TIMEOUT_SCRIPT_COMPLETE, scriptTimeout + "");

        // example of injecting a ssh implementation
        Iterable<Module> modules =
                ImmutableSet.<Module>of(new SshjSshClientModule(), new SLF4JLoggingModule(),
                        new EnterpriseConfigurationModule());

        ContextBuilder builder =
                ContextBuilder.newBuilder(provider).credentials(identity, credential).modules(modules)
                        .overrides(properties);
View Full Code Here

            chefConfig
                    .put(ChefProperties.CHEF_VALIDATOR_CREDENTIAL, credentialForClient(validator));

            ContextBuilder builder = ContextBuilder.newBuilder(new ChefApiMetadata()) //
                    .credentials(client, credentialForClient(client)) //
                    .modules(ImmutableSet.<Module>of(new SLF4JLoggingModule())) //
                    .overrides(chefConfig); //

            System.out.printf(">> initializing %s%n", builder.getApiMetadata());

            ChefContext context = builder.buildView(ChefContext.class);
View Full Code Here

      properties.setProperty(TIMEOUT_SCRIPT_COMPLETE, scriptTimeout + "");

      // example of injecting a ssh implementation
      Iterable<Module> modules = ImmutableSet.<Module> of(
            new SshjSshClientModule(),
            new SLF4JLoggingModule(),
            new EnterpriseConfigurationModule());

      ContextBuilder builder = ContextBuilder.newBuilder(provider)
                                             .credentials(identity, credential)
                                             .modules(modules)
View Full Code Here

   }

   public CreateTenantAndUser(String endpoint, String tenantName, String userName, String password) {
      System.out.format("%s%n", this.getClass().getName());

      Iterable<Module> modules = ImmutableSet.<Module>of(new SLF4JLoggingModule());

      String provider = "openstack-keystone";
      String identity = tenantName + ":"  + userName;

      keystoneApi = ContextBuilder.newBuilder(provider)
View Full Code Here

      }

      // example of injecting a ssh implementation
      Iterable<Module> modules = ImmutableSet.<Module> of(
            new SshjSshClientModule(),
            new SLF4JLoggingModule(),
            new EnterpriseConfigurationModule(),
            // This is extended stuff you might inject!!
            new ConfigureMinecraftDaemon());

      ContextBuilder builder = ContextBuilder.newBuilder(provider)
View Full Code Here

      // The provider configures jclouds To use the Rackspace Cloud (US)
      // To use the Rackspace Cloud (UK) set the system property or default value to "rackspace-cloudservers-uk"
      String provider = System.getProperty("provider.cs", "rackspace-cloudservers-us");

      // This module is responsible for enabling logging
      Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule());

      nova = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .modules(modules) // don't forget to add the modules to your context!
            .buildApi(NovaApi.class);
View Full Code Here

   public void testLaunchClusterWithMinDisk() throws RunNodesException {
      int numNodes = 1;
      final String name = "node";

      ComputeServiceContext context = ContextBuilder.newBuilder("softlayer").credentials(identity, credential)
              .modules(ImmutableSet.of(new SLF4JLoggingModule(),
                      new SshjSshClientModule()))
              .build(ComputeServiceContext.class);

      TemplateBuilder templateBuilder = context.getComputeService().templateBuilder();
      //templateBuilder.minDisk(15d);
View Full Code Here

TOP

Related Classes of org.jclouds.logging.slf4j.config.SLF4JLoggingModule

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.