Examples of SLF4JLoggingModule


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

    public synchronized ComputeService getJcloudsComputeService() {
        if (jcloudsComputeService == null) {
            String username = awsCredentialsProvider.getCredentials().getAWSAccessKeyId();
            String password = awsCredentialsProvider.getCredentials().getAWSSecretKey();
            ComputeServiceContext jcloudsContext = ContextBuilder.newBuilder("ec2").credentials(username, password)
                    .modules(ImmutableSet.<Module>of(new SLF4JLoggingModule(), new JschSshClientModule()))
                    .buildView(ComputeServiceContext.class);

            this.jcloudsComputeService = jcloudsContext.getComputeService();
        }
View Full Code Here

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

   ComputeServiceContext context;

   @BeforeClass
   public void setUp() {
      context = ContextBuilder.newBuilder("virtualbox").modules(
               ImmutableSet.<Module> of(new SLF4JLoggingModule(), new SshjSshClientModule())).build(
               ComputeServiceContext.class);
   }
View Full Code Here

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

      // Create a new context that uses the generated token to perform the API
      // calls
      AbiquoContext tokenContext = ContextBuilder.newBuilder(new AbiquoApiMetadata()) //
            .endpoint(endpoint) //
            .credentials("token", token) //
            .modules(ImmutableSet.<Module> of(new SLF4JLoggingModule())) //
            .overrides(props) //
            .build(AbiquoContext.class);

      try {
         // Perform a call to get the logged user and verify the identity
View Full Code Here

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

      // Create a new context that uses the generated token to perform the API
      // calls
      AbiquoContext tokenContext = ContextBuilder.newBuilder(new AbiquoApiMetadata()) //
            .endpoint(endpoint) //
            .credentials("token", token) //
            .modules(ImmutableSet.<Module> of(new SLF4JLoggingModule())) //
            .overrides(props) //
            .build(AbiquoContext.class);

      // Perform a call to get the logged user. It should fail
      try {
View Full Code Here

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

      String token = null;

      AbiquoContext context = ContextBuilder.newBuilder(new AbiquoApiMetadata()) //
            .endpoint(endpoint) //
            .credentials(identity, credential) //
            .modules(ImmutableSet.<Module> of(new SLF4JLoggingModule())) //
            .build(AbiquoContext.class);

      try {
         // Create a request to authenticate to the API and generate the token
         HttpRequest request = HttpRequest.builder().method("GET").endpoint(URI.create(endpoint)).build();
View Full Code Here

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

      view.utils().credentialStore().put("image#" + templateId, loginCredentials);
   }

   @Override
   protected LoggingModule getLoggingModule() {
      return new SLF4JLoggingModule();
   }
View Full Code Here

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

      String username = args[0];
      String apiKey = args[1];

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

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

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

      }

      // 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

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

      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

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

      properties.setProperty(PROPERTY_EC2_CC_AMI_QUERY, "");
      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
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.