Package org.jclouds.logging.slf4j.config

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


   @Test
   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.imageId("CENTOS_6_64");
View Full Code Here


               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

@Test
public class JschSshClientModuleTest {

   public void testConfigureBindsClient() throws UnknownHostException {

      Injector i = Guice.createInjector(new JschSshClientModule(), new SLF4JLoggingModule());
      SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
      SshClient connection = factory.create(HostAndPort.fromParts("localhost", 22), LoginCredentials.builder().user("username")
            .password("password").build());
      assert connection instanceof JschSshClient;
   }
View Full Code Here

         @Override
         protected void configure() {
            bindProperties(binder(), props);
         }

      }, new SLF4JLoggingModule());
      SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
      SshjSshClient ssh = SshjSshClient.class.cast(factory.create(HostAndPort.fromParts("localhost", 22), LoginCredentials
            .builder().user("username").password("password").build()));
      return ssh;
   }
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

@Test
public class SshjSshClientModuleTest {

   public void testConfigureBindsClient() {

      Injector i = Guice.createInjector(new SshjSshClientModule(), new SLF4JLoggingModule());
      SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
      SshClient connection = factory.create(HostAndPort.fromParts("localhost", 22), LoginCredentials.builder().user("username")
            .password("password").build());
      assert connection instanceof SshjSshClient;
   }
View Full Code Here

               }
               throw new RuntimeException("command " + command + " not stubbed");
            }
         };
      } else {
         Injector i = Guice.createInjector(new SshjSshClientModule(), 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

    protected RestContext<CloudStackClient, CloudStackAsyncClient> newCloudStackContext(Provider provider) {
        Properties overrides = new Properties();
        overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
        return ContextBuilder.newBuilder(new CloudStackApiMetadata())
            .endpoint(provider.getEndpoint().get())
            .modules(ImmutableSet.of(new SLF4JLoggingModule()))
            .credentials(provider.getAccessKey(), provider.getSecretKey())
            .overrides(overrides)
            .build(CloudStackApiMetadata.CONTEXT_TOKEN);
    }
View Full Code Here

        checkArgument(provider.getEndpoint().isPresent(), "please specify an endpoint for this provider");
        Properties overrides = new Properties();
        overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
        return ContextBuilder.newBuilder(new CloudStackApiMetadata())
            .endpoint(provider.getEndpoint().get())
            .modules(ImmutableSet.<Module>of(new SLF4JLoggingModule()))
            .credentials(provider.getAccessKey(), provider.getSecretKey())
            .overrides(overrides)
            .build(CloudStackApiMetadata.CONTEXT_TOKEN);
    }
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.