Examples of SLF4JLoggingModule


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

         chefConfig.put(ChefProperties.CHEF_VALIDATOR_NAME, validator);
         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.build();
View Full Code Here

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

   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

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

        Properties properties = new Properties();
        ContextBuilder builder = ContextBuilder
                .newBuilder(provider)
                .credentials(identity, credential)
                .modules(ImmutableList.<Module>of(new SLF4JLoggingModule()))
                .overrides(properties);
        if (!Strings.isNullOrEmpty(endpoint)) {
            builder.endpoint(endpoint);
        }
        context = builder.build(BlobStoreContext.class);
View Full Code Here

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

      if ("aws-ec2".equals(spec.getProvider()) && spec.getTemplate().getImageId() != null) {
        enableAWSEC2LazyImageFetching(spec);
      }

      if ("stub".equals(spec.getProvider())) {
        modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(), new DryRunModule());
      } else if ("byon".equals(spec.getProvider()) && !spec.getByonNodes().isEmpty()) {
        overrideApiMetadata = new BYONApiMetadata()
          .toBuilder()
          .defaultModule(BYONComputeServiceContextModule.class)
          .build();

        modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(),
                                          new EnterpriseConfigurationModule(),
                                          new SshjSshClientModule(),
                                          new CacheNodeStoreModule(ImmutableMap.<String,Node>copyOf(spec.getByonNodes())));
      } else {
        modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(),
            new EnterpriseConfigurationModule(), new SshjSshClientModule());
      }
    }
View Full Code Here

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

                        S3ProxyConstants.PROPERTY_VIRTUAL_HOST));

        ContextBuilder builder = ContextBuilder
                .newBuilder(provider)
                .credentials(identity, credential)
                .modules(ImmutableList.<Module>of(new SLF4JLoggingModule()))
                .overrides(properties);
        if (endpoint != null) {
            builder = builder.endpoint(endpoint);
        }
        BlobStoreContext context = builder.build(BlobStoreContext.class);
View Full Code Here

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

         @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

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

@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

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

               }
               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

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

         protected LoadingCache<String, Set<FirewallRule>> getFirewallRulesByVirtualMachine(
            GetFirewallRulesByVirtualMachine getFirewallRules) {
            return CacheBuilder.newBuilder().build(getFirewallRules);
         }
      };
      adapter = Guice.createInjector(module, new SLF4JLoggingModule()).getInstance(
            CloudStackComputeServiceAdapter.class);

      keyPairName = prefix + "-adapter-test-keypair";
      keyPair = ComputeTestUtils.setupKeyPair();
View Full Code Here

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

@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
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.